summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webgl/conformance-1.0.3
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/webgl/conformance-1.0.3
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/webgl/conformance-1.0.3')
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/00_test_list.txt6
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/CONFORMANCE_RULES.txt132
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/README.md77
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/00_readme.txt13
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/00_test_list.txt18
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/00_test_list.txt10
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html92
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html121
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-disabled-vertex-attrib.html102
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html84
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-matrix-attributes.html159
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html112
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html154
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib.html120
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer-offsets.html183
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer.html156
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/00_test_list.txt11
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/buffer-bind-test.html89
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html82
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html96
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/element-array-buffer-delete-recreate.html92
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-copies-indices.html75
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-crash-with-buffer-sub-data.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-large-buffer.html79
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-verifies-too-many-indices.html73
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-with-resized-buffer.html130
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation.html140
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/00_test_list.txt15
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/buffer-offscreen-test.html101
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/buffer-preserve-test.html89
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/canvas-test.html214
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/canvas-zero-size.html66
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html98
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/draw-webgl-to-canvas-test.html101
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html227
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html139
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html140
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/framebuffer-bindings-unaffected-on-resize.html108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html172
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/texture-bindings-unaffected-on-resize.html89
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html130
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/viewport-unchanged-upon-resize.html115
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/00_test_list.txt17
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html568
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html132
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-attributes-alpha-depth-stencil-antialias.html358
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html58
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-creation.html58
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html80
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html189
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html308
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-lost.html373
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html95
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html95
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-type-test.html76
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html90
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/methods.html238
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/premultiplyalpha-test.html268
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resource-sharing-test.html66
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-child-with-worker.html78
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-upon-reload-child.html77
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-worker.js4
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/00_test_list.txt34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html79
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html422
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-blend-minmax.html247
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html243
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html413
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-shader-texture-lod.html293
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-texture-filter-anisotropic.html192
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/get-extension.html122
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-element-index-uint.html448
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-standard-derivatives.html354
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-linear.html55
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-canvas.html56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image-data.html57
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image.html56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-video.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float.html293
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-linear.html58
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-canvas.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image-data.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-video.html66
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float.html352
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object-bufferData.html217
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object.html659
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html422
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html387
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html635
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-size-limit.html248
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-renderer-info.html127
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-shaders.html166
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-depth-texture.html338
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-draw-buffers.html734
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-shared-resources.html863
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/00_test_list.txt11
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/00_test_list.txt18
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/README.md18
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-d3d11-compiler-error.html119
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-dx-variable-bug.html119
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/array-of-struct-with-int-first-position.html164
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/compare-loop-index-to-uniform.html89
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/complex-glsl-does-not-crash.html215
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-in-loop.html163
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-optimization.html111
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/constant-precision-qualifier.html101
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/essl3-shaders-with-webgl1.html136
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/floored-division-accuracy.html97
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/fragcoord-linking-bug.html116
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/long-expressions-should-not-crash.html159
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/modulo-arithmetic-accuracy.html97
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/multiplication-assignment.html82
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/nested-functions-should-not-crash.html112
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index.html104
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/temp-expressions-should-not-crash.html123
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/uniforms-should-not-lose-values.html104
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/00_test_list.txt14
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec2.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec3.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec4.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec2.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec3.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec4.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat2.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat3.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat4.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-corner-cases.html218
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-index.html99
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec2.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec3.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec4.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/00_test_list.txt36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-abs.html68
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-acos.html118
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-asin.html118
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan-xy.html121
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan.html118
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-ceil.html76
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-float.html79
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-gentype.html82
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cos.html122
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cross.html76
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-distance.html111
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-dot.html113
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-faceforward.html91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-floor.html75
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-fract.html73
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-length.html110
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-float.html75
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-gentype.html75
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-float.html75
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-gentype.html75
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-float.html77
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-gentype.html77
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-float.html76
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-gentype.html79
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-normalize.html82
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-reflect.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sign.html76
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sin.html119
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-float.html120
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-gentype.html81
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-float.html75
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-gentype.html75
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/00_test_list.txt65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_float.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec2_vec2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec3_vec3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec4_vec4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_int_to_float.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec2_to_vec2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec3_to_vec3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec4_to_vec4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/construct_struct.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_float.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec2_vec2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec3_vec3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec4_vec4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_int_float.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec2_vec2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec3_vec3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec4_vec4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_int_float.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec2_vec2.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec3_vec3.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec4_vec4.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than_equal.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than_equal.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_float.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec2_vec2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec3_vec3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec4_vec4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_int_float.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec2_vec2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec3_vec3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec4_vec4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_float.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec2_vec2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec3_vec3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec4_vec4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_int_float.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec2_vec2.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec3_vec3.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec4_vec4.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/00_test_list.txt3
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/float_literal.vert.html76
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/literal_precision.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/overflow_leak.vert.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/matrices/00_test_list.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat3-construction.html95
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat4-to-mat3.html94
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/00_test_list.txt106
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/attrib-location-length-limits.html107
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/boolean_precision.html95
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/embedded-struct-definitions-forbidden.html64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/empty_main.vert.html56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/expression-list-in-declarator-initializer.html89
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/gl_position_unset.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-function-nodes.html158
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-long-variable-names.html249
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-vertex-branch.html151
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/include.vs4
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html195
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii-comments.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii.vert.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/re-compile-re-link.html175
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-precision-format-obeyed.html108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-struct-scope.html254
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html274
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-varying-packing-restrictions.html211
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-define.html59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-identifier.frag.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-define.html59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-identifier.frag.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-_webgl-identifier.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.frag.html64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html158
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-uniform.html168
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-array.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-struct.vert.html64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-clipvertex.vert.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-assignment.html66
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-conditional-assignment.html225
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping-negative.html67
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping.html70
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.frag.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.vert.html64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-define-line-continuation.frag.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx-no-ext.frag.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx.frag.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-do-loop.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-error-directive.html74
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-explicit-int-cast.vert.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-float-return-value.frag.html69
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-loop.html108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-scoping.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-frag-depth.frag.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-recursion.frag.html70
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-scoped-struct.html65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-functional-scoping.html64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glcolor.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-1.frag.html64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-symbol.frag.html64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html151
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-hex-int-constant-macro.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-implicit-vec3-to-vec4-cast.vert.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-include.vert.html64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-int-return-value.frag.html67
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-invalid-identifier.frag.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec2-return-value.frag.html67
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec3-return-value.frag.html67
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec4-return-value.frag.html67
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-limited-indexing.frag.html77
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-long-line.html91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-ascii-error.frag.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html721
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-precision.frag.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-preprocessor-whitespace.html87
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-quoted-error.frag.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-reserved-words.html289
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-short-circuiting-operators.html182
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-similar-uniform-array-names.html132
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-too-many-uniforms.html146
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-undefined-preprocessor-symbol.frag.html64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-uniform-in-loop-condition.vert.html65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec2-return-value.frag.html69
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec3-return-value.frag.html69
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-return-value.frag.html69
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-vec3-vec4-conditional.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.frag.html64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.vert.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-120.vert.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-130.vert.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-webgl-identifier.vert.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-while-loop.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-without-precision.frag.html60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-constant-expression-loop-conditions.html146
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-invariance.html353
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-uniforms.html110
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-varyings.html103
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-missing-varyings.html97
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-name-conflicts.html106
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-uniform-structs.html312
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-varyings.html126
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shared.html175
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-equals.html180
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-mixed-array-declarators.html92
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-exceeds-maximum.html78
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names.html95
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-under-maximum.html74
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-specifiers-in-uniforms.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-unary-operators.html91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-global-initializers.html88
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-initializers.html145
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/uniform-location-length-limits.html109
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/00_test_list.txt8
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_field.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_function.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_struct.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_variable.vert.html59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_field.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_function.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_struct.vert.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_variable.vert.html59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/00_test_list.txt4
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2d-bias.html126
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dlod.html134
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dproj.html141
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dprojlod.html165
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/00_test_list.txt6
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord-xy-values.html209
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord.html108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragdata-and-fragcolor.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-frontfacing.html109
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-pointcoord.html164
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/glsl-built-ins.html123
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/00_test_list.txt5
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-max-texture-dimensions.html132
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-min-attribs.html109
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-min-textures.html104
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-min-uniforms.html128
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/00_test_list.txt14
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/bad-arguments-test.html120
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/boolean-argument-conversion.html138
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/delayed-drawing.html87
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/error-reporting.html98
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html127
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/instanceof-test.html113
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html200
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/is-object.html101
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html112
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html449
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/shader-precision-format.html160
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/type-conversion-test.html174
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/uninitialized-test.html196
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/webgl-specific.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/00_test_list.txt58
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/README.md53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-A.js86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B1.js78
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B2.js171
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B3.js85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B4.js88
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-C.js136
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-D_G.js252
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-G_I.js141
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-L_S.js139
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-S_V.js229
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/constants.html374
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/getContext.html61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/methods.html203
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-A.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B1.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B2.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B3.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B4.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-C.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-D_G.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-G_I.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-L_S.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-S_V.html86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI.js430
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/webGLArrays.html188
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bindBuffer.html71
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html96
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bindFramebufferLeaveNonZero.html52
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferData.html89
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferDataBadArgs.html81
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubData.html140
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html96
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2D.html132
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2DBadArgs.html111
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2D.html144
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2DBadArgs.html113
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/deleteBufferBadArgs.html67
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html137
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html307
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawElements.html145
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html211
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/isTests.html84
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/isTestsBadArgs.html110
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/readPixels.html65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/readPixelsBadArgs.html126
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2D.html88
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DBadArgs.html108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTML.html161
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTMLBadArgs.html74
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2D.html93
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html112
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html174
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs.html106
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrix.html92
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrixBadArgs.html166
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformf.html97
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfArrayLen1.html123
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfBadArgs.html128
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformi.html97
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformiBadArgs.html124
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html144
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html120
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointer.html108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointerBadArgs.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/glsl/arrayOutOfBounds.html281
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/glsl/uniformOutOfBounds.html219
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/unit.css66
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/unit.js951
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/util.js1286
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/00_test_list.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_frag_xvary_ref.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_vert_xvary_ref.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_frag_xvary_ref.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_vert_xvary_ref.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_frag_xvary_ref.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_vert_xvary_ref.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary_ref.frag111
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_vert_xvary_ref.vert58
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_frag_xvary_ref.frag147
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_vert_xvary_ref.vert73
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_frag_xvary_ref.frag183
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_vert_xvary_ref.vert89
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_001_to_004.html105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_frag_ref.frag45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_vert.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_vert_ref.vert46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_frag_ref.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_vert.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_001_to_004.html105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_frag_ref.frag45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_vert.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_vert_ref.vert46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_frag_ref.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_vert.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/array_001_to_006.html223
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_empty_array_float_frag.frag45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_empty_array_float_vert.vert44
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_uniform_array_float_frag.frag45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_uniform_array_float_vert.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/initfunc_empty_array_float_frag.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/initfunc_empty_array_float_vert.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary_ref.frag110
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_vert_xvary_ref.vert57
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_frag_xvary_ref.frag146
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_vert_xvary_ref.vert71
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_frag_xvary_ref.frag182
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_vert_xvary_ref.vert86
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_009_to_012.html105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvary_ref.frag72
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary_ref.frag88
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvary_ref.vert73
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary.vert46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary_ref.vert85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvary_ref.frag132
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary.frag49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary_ref.frag150
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvary_ref.vert133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary.vert51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary_ref.vert150
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvary_ref.frag178
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary.frag54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary_ref.frag203
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvary_ref.vert178
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary.vert56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary_ref.vert202
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/input.run.txt3
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_001_to_008.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_009_to_016.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxCombinedTextureImageUnits_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxCombinedTextureImageUnits_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxDrawBuffers_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxDrawBuffers_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxFragmentUniformVectors_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxFragmentUniformVectors_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxTextureImageUnits_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxTextureImageUnits_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVaryingVectors_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVaryingVectors_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexAttribs_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexAttribs_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexTextureImageUnits_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexTextureImageUnits_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexUniformVectors_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexUniformVectors_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/input.run.txt3
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/DepthRange_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/DepthRange_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html115
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CG_Data_Types_frag.frag45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CG_Standard_Library_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectBuiltInOveride_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectComma_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstFolding1_vert.vert53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstFolding2_vert.vert438
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstruct_vert.vert54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension10_V100_frag.frag43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension1_V100_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension4_V100_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFull_vert.vert671
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFuncOverload_frag.frag44
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFuncOverload_vert.vert54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFunction1_vert.vert53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectModule_frag.frag81
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse1_frag.frag68
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse2_frag.frag153
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse2_vert.vert166
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParseTest1_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParseTest_frag.frag43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess5_frag.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess8_frag.frag132
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess9_frag.frag49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle1_frag.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle1_vert.vert34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle2_frag.frag56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle2_vert.vert34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle3_frag.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectVersion_V100_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/DuplicateVersion1_V100_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/FunctionParam_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Include_Preprocessor_Directive_frag.frag29
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Low_Level_Assembly_Reserved_Words_frag.frag44
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Main_Parameters_vert.vert29
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/ParseTest3_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/ParseTest4_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Permissive_Constant_Conversions_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Permissive_Scalar_Vector_Expressions_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/TernaryOp_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Texture_Rectangle_Samplers_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array10_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array11_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array1_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array2_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array3_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array4_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array5_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array6_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array7_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array8_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array9_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute1_vert.vert31
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute2_vert.vert31
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute_vert.vert29
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/break_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_017_to_024.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_025_to_032.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_033_to_040.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_041_to_048.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_049_to_056.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_057_to_064.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_065_to_072.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_073_to_080.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_081_to_088.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_089_to_096.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_097_to_104.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_105_to_112.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_113_to_120.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_121_to_128.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_129_to_136.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_137_to_144.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_145_to_152.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_153_to_160.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_161_to_168.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_169_to_176.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_177_to_178.html73
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma1_vert.vert33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma2_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma2_vert.vert33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma3_vert.vert34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comment_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional1_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional2_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional3_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constFunc_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor1_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor2_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor3_V100_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/continue_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType10_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType11_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType12_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType13_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType19_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType1_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType2_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType3_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType4_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType5_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType6_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType7_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType8_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType9_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/default.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/default.vert32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dowhile_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec2_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec3_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec4_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension2_V100_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension3_V100_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension5_V100_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension6_V100_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension7_V100_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension8_V100_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension9_V100_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float2_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float3_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float4_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly1_vert.vert29
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly2_vert.vert29
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly3_vert.vert29
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly4_vert.vert29
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly_vert.vert29
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function10_frag.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function1_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function2_V100_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function3_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function4_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function6_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function7_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function8_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function9_frag.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec2_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec3_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec4_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier1_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier2_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier3_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/if1_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/if2_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment1_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment2_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment3_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment4_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment6_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/input.run.txt24
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main1_vert.vert28
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main2_vert.vert29
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main3_vert.vert29
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/matrix_V100_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/normal_vert.vert30
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser10_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser1_vert.vert30
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser3_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser4_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser5_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser6_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser7_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser8_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser9_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess0_frag.frag80
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess10_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess1_frag.frag81
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess2_frag.frag77
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess3_frag.frag60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess4_frag.frag77
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess6_frag.frag54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess7_frag.frag68
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/scoping1_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/scoping2_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct10_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct11_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct1_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct2_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct3_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct4_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct5_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct6_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct7_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct8_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct9_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle1_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle2_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle3_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/typecast_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/uniform1_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/uniform_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying1_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying2_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying3_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vector_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/version2_V100_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/version3_V100_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertexOnly2_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertexOnly_frag.frag42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertex_vert.vert30
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while1_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while2_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/built_in_varying_array_out_of_bounds_001_to_001.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/gl_Color_array_index_out_of_bounds_frag.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_frag_xvary_ref.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_vert_xvary_ref.vert42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_frag_xvary_ref.frag42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_vert_xvary_ref.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_frag_xvary_ref.frag43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_vert_xvary_ref.vert44
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_frag_xvary_yconstquarter.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_frag_xvary_yconstquarter_ref.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_vert_xvary_yconstquarter.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_vert_xvary_yconstquarter_ref.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_frag_xvary_yconstquarter.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_frag_xvary_yconstquarter_ref.frag42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_vert_xvary_yconstquarter.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_vert_xvary_yconstquarter_ref.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_frag_xvary_yconstquarter.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_frag_xvary_yconstquarter_ref.frag44
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_vert_xvary_yconstquarter.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_vert_xvary_yconstquarter_ref.vert45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_001_to_008.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_009_to_010.html103
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_break_frag.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_break_vert.vert45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_continue_frag.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_continue_vert.vert50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_break_frag.frag52
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_break_vert.vert52
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_continue_frag.frag61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_continue_vert.vert61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/input.run.txt3
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/nested_if_else_frag.frag57
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/nested_if_else_vert.vert57
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_frag_xvary_ref.frag70
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_vert_xvary_ref.vert50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_frag_xvary_ref.frag74
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_vert_xvary_ref.vert50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_frag_xvary_ref.frag74
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_vert_xvary_ref.vert50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_001_to_002.html79
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_frag_xvaryyconst.frag47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_frag_xvaryyconst_ref.frag49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_vert_xvaryyconst.vert46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_vert_xvaryyconst_ref.vert50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_001_to_001.html66
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_textured.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_textured.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/expected.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_frag_xvary_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_vert_xvary_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_frag_xvary_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_vert_xvary_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_frag_xvary_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_vert_xvary_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_001_to_002.html91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_cond_frag.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_cond_frag_ref.frag44
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf_ref.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf_ref.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf_ref.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf_ref.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf_ref.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf_ref.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_frag_xvaryyone.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_frag_xvaryyone_ref.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_vert_xvaryyone.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_vert_xvaryyone_ref.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf_ref.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf_ref.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird_ref.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird_ref.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_009_to_012.html105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_frag_ref.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_frag_ref.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_frag_ref.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/input.run.txt3
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_009_to_012.html105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvary_ref.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvaryneg.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvaryneg_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvary_ref.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvaryneg.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvaryneg_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvary_ref.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvaryneg.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvaryneg_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvary_ref.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvaryneg.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvaryneg_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvary_ref.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvaryneg.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvaryneg_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvary_ref.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvaryneg.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvaryneg_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/input.run.txt3
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_009_to_012.html105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvaryneg.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvaryneg_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvaryneg.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvaryneg_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvaryneg.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvaryneg_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvaryneg.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvaryneg_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvaryneg.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvaryneg_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvaryneg.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvaryneg_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/input.run.txt3
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_frag_nvaryiconst.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_frag_nvaryiconst_ref.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_vert_nvaryiconst.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_vert_nvaryiconst_ref.vert42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_frag_nvaryiconst.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_frag_nvaryiconst_ref.frag47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_vert_nvaryiconst.vert46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_vert_nvaryiconst_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_frag_nvaryiconst.frag47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_frag_nvaryiconst_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_vert_nvaryiconst.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_vert_nvaryiconst_ref.vert48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_frag_xvary_ref.frag44
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_vert_xvary_ref.vert45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_frag_xvary_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_vert_xvary_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_frag_xvary_ref.frag52
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_vert_xvary_ref.vert53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_frag_xvary_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_vert_xvary_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_frag_xvary_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_vert_xvary_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_frag_xvary_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_vert_xvary_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/array_float_frag.frag102
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/array_float_vert.vert103
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_array_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_array_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_frag.frag65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_vert.vert65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_array_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_array_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_empty_frag.frag65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_empty_vert.vert65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_array_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_array_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_frag.frag65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_vert.vert65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_array_frag.frag85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_array_vert.vert85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_empty_frag.frag59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_empty_vert.vert59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_frag.frag108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_vert.vert108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_frag.frag108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_vert.vert108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_frag.frag108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_vert.vert108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_frag.frag129
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_vert.vert129
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_frag.frag102
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_vert.vert102
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_frag.frag85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_vert.vert85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_array_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_array_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_empty_frag.frag65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_empty_vert.vert65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_array_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_array_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_empty_frag.frag65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_empty_vert.vert65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_array_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_array_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_empty_frag.frag65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_empty_vert.vert65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_array_frag.frag85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_array_vert.vert85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_empty_frag.frag59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_empty_vert.vert59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_001_to_008.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_009_to_016.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_017_to_024.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_033_to_040.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_041_to_048.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_057_to_064.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_065_to_072.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_073_to_080.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_081_to_088.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_089_to_096.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_097_to_104.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_105_to_112.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_113_to_120.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_121_to_126.html203
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/input.run.txt17
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_array_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_array_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_empty_frag.frag65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_empty_vert.vert65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_array_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_array_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_empty_frag.frag65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_empty_vert.vert65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_array_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_array_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_empty_frag.frag65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_empty_vert.vert65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_array_frag.frag85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_array_vert.vert85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_empty_frag.frag59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_empty_vert.vert59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_frag.frag108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_vert.vert108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_frag.frag108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_vert.vert108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_frag.frag108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_vert.vert108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_frag.frag129
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_vert.vert129
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_frag.frag102
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_vert.vert102
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_frag.frag85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_vert.vert85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_frag.frag141
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_vert.vert141
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_frag.frag145
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_vert.vert145
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_frag.frag141
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_vert.vert141
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_frag.frag145
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_vert.vert145
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_frag.frag141
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_vert.vert141
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_frag.frag145
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_vert.vert145
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_frag.frag135
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_vert.vert135
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_frag.frag136
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_vert.vert136
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_float_frag.frag59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_float_vert.vert59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_struct_frag.frag83
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_struct_vert.vert87
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_frag.frag108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_vert.vert108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_frag.frag108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_vert.vert108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_frag.frag108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_vert.vert108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_frag.frag129
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_vert.vert129
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_frag.frag91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_frag.frag102
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_vert.vert102
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_frag.frag85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_vert.vert85
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/void_empty_empty_void_empty_frag.frag49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/void_empty_empty_void_empty_vert.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_001_to_003.html104
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_w_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_xy_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_xy_frag_ref.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag_ref.frag42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html66
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_frag_ref.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_frag_ref.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_frag_ref.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_frag_ref.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_frag_xvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_vert_xvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_frag_xvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_vert_xvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_frag_xvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_vert_xvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_frag_xvary.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_frag_xvary_ref.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_vert_xvary.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_vert_xvary_ref.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_frag_xvary.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_frag_xvary_ref.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_vert_xvary.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_vert_xvary_ref.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_frag_xvary.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_frag_xvary_ref.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_vert_xvary.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_vert_xvary_ref.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_frag_ref.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_frag_ref.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_frag_ref.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_frag_ref.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/input.run.txt3
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_009_to_012.html105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary01.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary01_ref.frag53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary_ref.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary01.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary01_ref.vert54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary_ref.vert51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary01.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary01_ref.frag53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary_ref.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary01.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary01_ref.vert54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary_ref.vert51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary01.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary01_ref.frag53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary_ref.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary01.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary01_ref.vert54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary_ref.vert51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/input.run.txt3
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_009_to_012.html105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary01.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary01_ref.frag56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary_ref.frag53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary01.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary01_ref.vert57
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary_ref.vert52
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary01.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary01_ref.frag56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary_ref.frag53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary01.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary01_ref.vert57
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary_ref.vert54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary01.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary01_ref.frag56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary_ref.frag53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary01.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary01_ref.vert57
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary_ref.vert54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat2_frag.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat2_vert.vert50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat3_frag.frag54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat3_vert.vert54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat4_frag.frag56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat4_vert.vert56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_copy_frag.frag73
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_copy_vert.vert72
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_frag.frag70
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_vert.vert69
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_copy_frag.frag83
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_copy_vert.vert83
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_frag.frag80
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_vert.vert79
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_copy_frag.frag95
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_copy_vert.vert94
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_frag.frag92
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/input.run.txt7
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_2vec2_frag.frag43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_2vec2_vert.vert45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_4float_frag.frag43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_4float_vert.vert45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_copy_frag.frag73
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_copy_vert.vert72
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_float_frag.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_float_vert.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_frag.frag70
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_vert.vert69
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_3vec3_frag.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_3vec3_vert.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_9float_frag.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_9float_vert.vert50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_copy_frag.frag83
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_copy_vert.vert82
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_float_frag.frag59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_float_vert.vert59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_frag.frag80
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_vert.vert79
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_16float_frag.frag74
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_16float_vert.vert71
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_4vec4_frag.frag76
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_4vec4_vert.vert73
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_copy_frag.frag95
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_copy_vert.vert94
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_frag.frag92
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_vert.vert91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_001_to_008.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_009_to_016.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_017_to_024.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_025_to_032.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_033_to_040.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_041_to_046.html203
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3_001_to_006.html365
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect0_frag.frag53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect0_vert.vert52
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect1_frag.frag53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect1_vert.vert53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arraysimple_frag.frag43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arraysimple_vert.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixCompMult_001_to_004.html105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_frag_ref.frag43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_vert_ref.vert44
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_frag.frag53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_frag_ref.frag59
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_vert.vert54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_vert_ref.vert64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_frag_xvary_yconsthalf.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_frag_xvary_yconsthalf_ref.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_vert_xvary_yconsthalf.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_vert_xvary_yconsthalf_ref.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_frag_xvary_yconsthalf.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_frag_xvary_yconsthalf_ref.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_vert_xvary_yconsthalf.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_vert_xvary_yconsthalf_ref.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_frag_xvary_yconsthalf.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_frag_xvary_yconsthalf_ref.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_vert_xvary_yconsthalf.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_vert_xvary_yconsthalf_ref.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf_ref.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf_ref.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf_ref.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf_ref.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf_ref.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf_ref.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf_ref.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf_ref.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf_ref.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf_ref.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf_ref.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf_ref.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_001_to_008.html181
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_x_large_y_large_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_x_large_y_large_vert.vert34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_frag_xvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_vert_xvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_001_to_004.html105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_frag_ref.frag49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_vert.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_vert_ref.vert46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_frag_ref.frag47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_vert.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_vert_ref.vert48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/input.run.txt3
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_009_to_012.html105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_frag_ref.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_frag_ref.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_frag_ref.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_vert_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_frag_ref.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_vert_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/addsubtract_frag.frag42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/addsubtract_vert.vert42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/assignments_frag.frag78
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/assignments_vert.vert78
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/division_frag.frag42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/division_vert.vert42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/equality_frag.frag43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/equality_vert.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/input.run.txt5
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/logical_frag.frag111
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/logical_vert.vert111
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/multiplicative_frag.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/multiplicative_vert.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_001_to_008.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_009_to_016.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_017_to_024.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_025_to_026.html103
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixdecrement_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixdecrement_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixincrement_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixincrement_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixdecrement_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixdecrement_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixincrement_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixincrement_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/relational_frag.frag44
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/relational_vert.vert45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/selection_frag.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/selection_vert.vert46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/unary_frag.frag42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/unary_vert.vert42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/input.run.txt4
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_009_to_016.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_017_to_024.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconst2_yvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconst2_yvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconsthalf_yvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconsthalf_yvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconst2.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconst2_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconsthalf.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconsthalf_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconst2_yvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconst2_yvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconsthalf_yvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconsthalf_yvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconst2.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconst2_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconsthalf.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconsthalf_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconst2_yvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconst2_yvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconsthalf_yvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconsthalf_yvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconst2.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconst2_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconsthalf.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconsthalf_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconst2_yvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconst2_yvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconsthalf_yvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconsthalf_yvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconst2.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconst2_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconsthalf.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconsthalf_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconst2_yvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconst2_yvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconsthalf_yvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconsthalf_yvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconst2.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconst2_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconsthalf.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconsthalf_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconst2_yvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconst2_yvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconsthalf_yvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconsthalf_yvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconst2.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconst2_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconsthalf.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconsthalf_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_frag_xvary_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_vert_xvary_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_frag_xvary_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_vert_xvary_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_frag_xvary.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_frag_xvary_ref.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_vert_xvary.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_vert_xvary_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_frag_ivarynconst.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_frag_ivarynconst_ref.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_vert_ivarynconst.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_vert_ivarynconst_ref.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_frag_ivarynconst.frag45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_frag_ivarynconst_ref.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_vert_ivarynconst.vert46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_vert_ivarynconst_ref.vert46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_frag_ivarynconst.frag47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_frag_ivarynconst_ref.frag47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_vert_ivarynconst.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_vert_ivarynconst_ref.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_frag_ivarynconst.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_frag_ivarynconst_ref.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_vert_ivarynconst.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_vert_ivarynconst_ref.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_frag_ivarynconst.frag45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_frag_ivarynconst_ref.frag54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_vert_ivarynconst.vert46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_vert_ivarynconst_ref.vert54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_frag_ivarynconst.frag47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_frag_ivarynconst_ref.frag55
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_vert_ivarynconst.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_vert_ivarynconst_ref.vert55
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_frag_xvary_ref.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_vert_xvary_ref.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_frag_xvary_ref.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_vert_xvary_ref.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_frag_xvary_ref.frag43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_vert_xvary_ref.vert44
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_frag_xvary_ref.frag101
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_vert_xvary_ref.vert55
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_frag_xvary_ref.frag137
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_vert_xvary_ref.vert79
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_frag_xvary_ref.frag173
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_vert_xvary_ref.vert79
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter_ref.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter_ref.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter_ref.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter_ref.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter_ref.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter_ref.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_frag_xvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_vert_xvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_frag_xvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_vert_xvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_frag_xvary.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_frag_xvary_ref.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_vert_xvary.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_vert_xvary_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf_ref.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf_ref.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf_ref.frag53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf_ref.vert54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf_ref.frag61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf_ref.vert62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/input.run.txt8
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/nestedstructcomb_various_frag.frag116
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/nestedstructcomb_various_vert.vert119
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_001_to_008.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_009_to_016.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_017_to_024.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_025_to_032.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_033_to_040.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_041_to_048.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_049_to_056.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bool_frag.frag49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bool_vert.vert52
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_frag.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_vert.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_float_frag.frag43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_float_vert.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat2_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat2_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat3_frag.frag53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat3_vert.vert54
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat4_frag.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat4_vert.vert65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec2_frag.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec2_vert.vert45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec3_frag.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec3_vert.vert45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec4_frag.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec4_vert.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bool_frag.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bool_vert.vert55
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_frag.frag48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_vert.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_float_frag.frag45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_float_vert.vert49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat2_frag.frag42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat2_vert.vert42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat3_frag.frag55
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat3_vert.vert56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat4_frag.frag68
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat4_vert.vert70
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec2_frag.frag42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec2_vert.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec3_frag.frag42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec3_vert.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec4_frag.frag43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec4_vert.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bool_frag.frag55
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bool_vert.vert58
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_frag.frag71
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_vert.vert74
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_float_frag.frag49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_float_vert.vert51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat2_frag.frag51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat2_vert.vert51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat3_frag.frag79
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat3_vert.vert74
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat4_frag.frag100
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat4_vert.vert89
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec2_frag.frag50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec2_vert.vert51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec3_frag.frag49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec3_vert.vert51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec4_frag.frag49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec4_vert.vert51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/input.run.txt16
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_001_to_008.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_009_to_016.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_017_to_024.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_025_to_032.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_033_to_040.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_041_to_048.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_049_to_056.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_057_to_064.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_065_to_072.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_073_to_080.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_081_to_088.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_089_to_096.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_097_to_104.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_105_to_112.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_113_to_120.html157
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_bgr_1vec3_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_bgr_1vec3_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_br_g_1vec2_1float_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_br_g_1vec2_1float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_gb_r_1vec2_1float_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_gb_r_1vec2_1float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_grb_1vec3_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_grb_1vec3_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_ps_t_1vec2_1float_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_ps_t_1vec2_1float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_pts_1vec3_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_pts_1vec3_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rb_g_1vec2_1float_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rb_g_1vec2_1float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rg_b_1vec2_1float_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rg_b_1vec2_1float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rgb_1vec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rgb_1vec3_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_sp_t_1vec2_1float_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_sp_t_1vec2_1float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_st_p_1vec2_1float_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_st_p_1vec2_1float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_stp_1vec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_stp_1vec3_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tp_s_1vec2_1float_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tp_s_1vec2_1float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tsp_1vec3_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tsp_1vec3_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xy_z_1vec2_1float_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xy_z_1vec2_1float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xyz_1vec3_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xyz_1vec3_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xz_y_1vec2_1float_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xz_y_1vec2_1float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yxz_1vec3_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yxz_1vec3_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yz_x_1vec2_1float_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yz_x_1vec2_1float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zx_y_1vec2_1float_frag.frag38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zx_y_1vec2_1float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zyx_1vec3_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zyx_1vec3_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ar_bg_2vec2_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ar_bg_2vec2_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arb_g_1vec3_1float_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arb_g_1vec3_1float_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arbg_1vec4_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arbg_1vec4_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_bar_g_1vec3_1float_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_bar_g_1vec3_1float_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_barg_1vec4_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_barg_1vec4_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_br_ag_2vec2_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_br_ag_2vec2_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gr_ab_2vec2_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gr_ab_2vec2_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gra_b_1vec3_1float_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gra_b_1vec3_1float_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_grab_1vec4_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_grab_1vec4_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqs_t_1vec3_1float_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqs_t_1vec3_1float_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqst_1vec4_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqst_1vec4_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ps_qt_2vec2_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ps_qt_2vec2_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qs_pt_2vec2_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qs_pt_2vec2_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qsp_t_1vec3_1float_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qsp_t_1vec3_1float_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qspt_1vec4_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qspt_1vec4_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_r_g_b_a_4float_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_r_g_b_a_4float_vert.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rg_ba_2vec2_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rg_ba_2vec2_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgb_a_1vec3_1float_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgb_a_1vec3_1float_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgba_1vec4_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgba_1vec4_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_s_t_p_q_4float_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_s_t_p_q_4float_vert.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_st_pq_2vec2_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_st_pq_2vec2_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stp_q_1vec3_1float_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stp_q_1vec3_1float_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stpq_1vec4_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stpq_1vec4_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ts_qp_2vec2_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ts_qp_2vec2_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsq_p_1vec3_1float_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsq_p_1vec3_1float_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsqp_1vec4_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsqp_1vec4_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wx_zy_2vec2_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wx_zy_2vec2_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxz_y_1vec3_1float_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxz_y_1vec3_1float_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxzy_1vec4_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxzy_1vec4_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_x_y_z_w_4float_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_x_y_z_w_4float_vert.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xy_zw_2vec2_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xy_zw_2vec2_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyz_w_1vec3_1float_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyz_w_1vec3_1float_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyzw_1vec4_frag.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyzw_1vec4_vert.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yx_wz_2vec2_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yx_wz_2vec2_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxw_z_1vec3_1float_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxw_z_1vec3_1float_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxwz_1vec4_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxwz_1vec4_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwx_y_1vec3_1float_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwx_y_1vec3_1float_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwxy_1vec4_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwxy_1vec4_vert.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zx_wy_2vec2_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zx_wy_2vec2_vert.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_001_to_006.html131
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_frag_xvary.frag42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_frag_xvary_ref.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_vert_xvary.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_vert_xvary_ref.vert42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_frag_xvary.frag47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_frag_xvary_ref.frag47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_vert_xvary.vert48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_vert_xvary_ref.vert48
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_frag_xvary.frag52
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_frag_xvary_ref.frag52
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_vert_xvary.vert53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_vert_xvary_ref.vert53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/bvec4_2int_2float_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/bvec4_2int_2float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/input.run.txt4
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/ivec3_3int_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/ivec3_3int_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_2float_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_2float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_vec3_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_vec3_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_float_vec2_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_float_vec2_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec2_float_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec2_float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec4_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec4_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_ivec4_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_ivec4_vert.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_vec3_float_frag.frag40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_vec3_float_vert.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_001_to_008.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_009_to_016.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_017_to_018.html103
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/input.run.txt2
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3_001_to_008.html335
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3array_frag.frag49
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3array_vert.vert47
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arraydirect_frag.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arraydirect_vert.vert45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arrayindirect_frag.frag55
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arrayindirect_vert.vert51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3single_frag.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3single_vert.vert45
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/compressed_paletted_texture/compressed_paletted_texture.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/compressed_paletted_texture/compressed_paletted_texture.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag.frag68
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag_ref.frag61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag.frag68
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag_ref.frag64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag_ref.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default_textured.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default_textured.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag.frag65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dx.frag65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dx.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dy.frag65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dy.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref.frag64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dx.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dx.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dy.frag64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dy.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects.vert161
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_multitexturing.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_multitexturing.vert42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_pointSize.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_pointSize.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/copy_texture/copy_texture.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default_textured.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default_textured.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse.vert149
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse_ref.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse_ref.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_rasterization/point_rasterization.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_rasterization/point_rasterization.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_sprites/point_sprites.frag31
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_sprites/point_sprites.vert34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/user_clip_planes/user_clip_planes.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/user_clip_planes/user_clip_planes.vert44
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/successfulcompile_frag.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/successfulcompile_vert.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/unsuccessfulcompile_frag.frag83
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/unsuccessfulcompile_vert.vert60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/bind_attribute_location/brick.frag64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/bind_attribute_location/brick.vert60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/brick.vert60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/texture.frag52
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/wood.frag83
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/wood.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/delete_object/successfulcompile_frag.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/delete_object/successfulcompile_vert.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/detach_shader/successfulcompile_frag.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/detach_shader/successfulcompile_vert.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/framebuffer_objects/fboShader0.frag46
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/framebuffer_objects/fboShader0.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat2.vert62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat3.vert62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat4.vert62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_vec.vert65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_uniform/brick.frag62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_uniform/brick.vert88
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_attribute_location/brick.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_attribute_location/brick.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_handle/successfulcompile_frag.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_handle/successfulcompile_vert.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_uniform_location/brick.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_uniform_location/brick.vert60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramInfoLog_2.0/simple.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramInfoLog_2.0/simple.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramiv_2.0/brick.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramiv_2.0/brick.vert60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetShaderInfoLog_2.0/simple.frag35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetShaderInfoLog_2.0/simple.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.frag41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/mat_tests.frag42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/mat_tests.vert42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/vec_tests.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/vec_tests.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/mat_tests.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/mat_tests2.vert41
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/vec_tests.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_vert.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_vert.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_vert.frag33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/21f_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/21i_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/22f_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/22i_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/23f_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/23i_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/24f_frag.frag36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/24i_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_vert.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_vert.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_vert.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2m_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_vert.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_vert.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_vert.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3m_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_firstthree_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_firstthree_vert.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_lastthree_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_lastthree_vert.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_vert.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_frag.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_vert.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_vert.vert35
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4m_frag.frag37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/default.vert33
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2VSU.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2VSU.vert39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2arrayVSU.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2arrayVSU.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrixVSU.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrixVSU.vert38
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/successfulcompile_frag.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/successfulcompile_vert.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/unsuccessfulcompile_frag.frag83
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/unsuccessfulcompile_vert.vert60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/precision_specifiers/precision_specifiers.frag31
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/precision_specifiers/precision_specifiers.vert42
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/relink_program/simple.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/relink_program/simple.vert37
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/successfulcompile_frag.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/successfulcompile_vert.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/unsuccessfulcompile_frag.frag83
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/unsuccessfulcompile_vert.vert61
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/three_uniforms/4f_frag.frag39
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/successfulcompile_frag.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/successfulcompile_vert.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/unsuccessfulcompile_frag.frag83
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/unsuccessfulcompile_vert.vert60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/successfulcompile_frag.frag63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/successfulcompile_vert.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/unsuccessfulcompile_frag.frag83
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/unsuccessfulcompile_vert.vert60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/vertex_program_point_size/point_size.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/README.md20
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/mustpass.run.txt64
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/ogles-utils.js785
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/process-ogles2-tests.py586
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/00_test_list.txt10
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/get-active-test.html142
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html176
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html162
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-attribute.html108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-uniform.html167
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-getshadersource.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-shader-test.html117
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/invalid-UTF-16.html71
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/program-test.html427
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/use-program-crash-with-discard-in-fragment-shader.html100
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/reading/00_test_list.txt3
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-pack-alignment.html265
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-test.html245
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/00_test_list.txt6
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html127
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-object-attachment.html665
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-state-restoration.html130
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-test.html199
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html122
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/00_test_list.txt23
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/culling.html152
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-switch.html113
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-texture-switch.html109
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-clear.html90
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawarrays.html101
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawelements.html127
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-canvas-dimensions.html101
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-fbo-test.html133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-test.html118
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-viewport-test.html135
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/line-loop-tri-fan.html253
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/many-draw-calls.html161
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/more-than-65536-indices.html147
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/multisample-corruption.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/negative-one-index.html114
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html79
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/point-size.html153
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/point-with-gl-pointcoord-in-fragment-shader.html142
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/polygon-offset.html193
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/simple.html100
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/triangle.html96
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/1-channel.jpgbin0 -> 16799 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/3x3.pngbin0 -> 2806 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/blue-1x1.jpgbin0 -> 319 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/boolUniformShader.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/bug-32888-texture.pngbin0 -> 10050 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/floatUniformShader.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/fragmentShader.frag32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-conformance-test.js384
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-constructor-tests-generator.js938
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-feature-tests.css29
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-generator.js1251
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256-with-128-alpha.pngbin0 -> 81 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256.pngbin0 -> 78 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-default-gamma.pngbin0 -> 123 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma0.1.pngbin0 -> 133 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma1.0.pngbin0 -> 133 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma2.0.pngbin0 -> 133 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma4.0.pngbin0 -> 133 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma9.0.pngbin0 -> 133 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp.pngbin0 -> 123 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/green-2x2-16bit.pngbin0 -> 134 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/intArrayUniformShader.vert8
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/intUniformShader.vert43
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/iterable-test.js173
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/matUniformShader.vert40
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/noopUniformShader.frag34
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/noopUniformShader.vert4
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/npot-video.mp4bin0 -> 38215 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/npot-video.theora.ogvbin0 -> 24630 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/npot-video.webmvp8.webmbin0 -> 51240 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/oes-texture-float-and-half-float-linear.js183
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/ogles-tests.css30
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/opengl_logo.jpgbin0 -> 5827 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/out-of-bounds-test.js329
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/pnglib.js207
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.mp4bin0 -> 92225 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.pngbin0 -> 144 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.svg6
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.theora.ogvbin0 -> 10292 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.webmvp8.webmbin0 -> 10979 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-indexed.pngbin0 -> 168 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/samplerUniformShader.frag8
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-cie-rgb-profile.pngbin0 -> 868 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colormatch-profile.pngbin0 -> 871 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.jpgbin0 -> 9145 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.pngbin0 -> 841 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-e-srgb-profile.pngbin0 -> 1985 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-smpte-c-profile.pngbin0 -> 871 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-srgb-iec61966-2.1-profile.pngbin0 -> 3201 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/structUniformShader.vert53
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-canvas.js212
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-image-data.js133
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-image.js149
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-svg-image.js105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-video.js172
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-webgl-canvas.js186
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/thunderbird-logo-64x64.pngbin0 -> 63843 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/transparent-on-left-indexed.pngbin0 -> 972 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/vertexShader.vert36
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/webgl-test-utils.js2754
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/zero-alpha.pngbin0 -> 89 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/00_test_list.txt8
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-enable-enum-test.html163
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-enum-tests.html114
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html221
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-geterror.html100
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-getstring.html83
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-object-get-calls.html464
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/state-uneffected-after-compositing.html109
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/00_test_list.txt60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/compressed-tex-image.html84
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-2d-formats.html196
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-and-sub-image-2d.html156
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/default-texture.html65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/gl-get-tex-parameter.html136
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/gl-pixelstorei.html119
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/gl-teximage.html424
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/mipmap-fbo.html89
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/origin-clean-conformance.html151
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-array-buffer-view.html260
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgb565.html51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba4444.html51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba5551.html51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data.html51
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgb565.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba4444.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba5551.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html50
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-uniform-binding-bugs.html65
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-canvas-corruption.html74
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-webgl.html101
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-format-and-type.html745
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-invalid-data.html147
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html385
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html94
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d.html124
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texparameter-test.html207
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind-2.html233
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind.html143
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html200
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-clear.html66
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-complete.html87
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-copying-feedback-loops.html105
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-draw-with-2d-and-cube.html127
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-fakeblack.html119
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-formats-test.html292
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-hd-dpi.html141
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-mips.html320
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-npot-video.html163
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-npot.html329
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-cube-maps.html356
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html175
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-size.html238
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html338
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html108
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html75
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-size.html172
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/00_test_list.txt7
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-crash.html63
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-view-crash.html62
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-large-array-tests.html104
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-unit-tests.html1118
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-crash.html56
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html379
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/resources/typed-array-test-cases.js90
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/resources/typed-array-worker.js89
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/typed-arrays-in-workers.html280
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/00_test_list.txt12
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-arrays.html512
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-bool.html82
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniformmatrix4fv.html106
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-unknown-uniform.html91
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html104
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html191
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-default-values.html362
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html117
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-samplers-test.html135
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html202
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/extra/50x50pixel-black-with-red-triangle.pngbin0 -> 3032 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/extra/canvas-compositing-test.pngbin0 -> 212531 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/extra/tex-image-with-video-test.js173
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/resources/cookies.js60
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/resources/desktop-gl-constants.js2645
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/resources/js-test-post.js29
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/resources/js-test-pre.js521
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/resources/js-test-style.css12
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/resources/test-eval.js32
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/resources/webgl-logo.pngbin0 -> 9077 bytes
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/resources/webgl-test-harness.js662
-rw-r--r--testing/web-platform/tests/webgl/conformance-1.0.3/test-guidelines.md174
2334 files changed, 182779 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/00_test_list.txt
new file mode 100644
index 000000000..03c181f23
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/00_test_list.txt
@@ -0,0 +1,6 @@
+// files that end in .txt list other tests
+// other lines are assumed to be .html files
+
+conformance/00_test_list.txt
+conformance/more/00_test_list.txt
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/CONFORMANCE_RULES.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/CONFORMANCE_RULES.txt
new file mode 100644
index 000000000..9acfe4278
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/CONFORMANCE_RULES.txt
@@ -0,0 +1,132 @@
+Rules for Claiming a Conformant WebGL Implementation
+====================================================
+
+The WebGL API is a web standard, and many web browser implementers
+deliver their browser on multiple operating systems (OSs). WebGL
+implementations also typically rely on the presence of an OpenGL or
+OpenGL ES implementation on the OS. It can be appreciated that a WebGL
+implementation therefore has many dependencies. This document attempts
+to clarify to potential implementers the rules the Khronos Group uses
+to judge whether a particular WebGL implementation is conformant.
+
+There are two primary reasons to submit conformance results:
+
+ A) A web browser implementer desires to certify their WebGL
+ implementation as conformant.
+
+ B) A GPU manufacturer delivering an embedded system including web
+ browser with WebGL support desires to certify their WebGL
+ implementation as conformant.
+
+Each of these situations carries different constraints, so the
+conformance rules are phrased differently for each. Typically, a web
+browser implementer aims to certify that the WebGL "layer" is correct.
+A GPU vendor typically aims to certify that a given device is
+physically capable of passing the tests.
+
+A newly-developed WebGL implementation should not support the "webgl"
+HTML Canvas context type by default in a shipping version of the
+product until reaching conformance. It is acceptable to give end users
+an option to turn on WebGL support in a non-conformant implementation
+as long as the documentation for that option clearly indicates that
+the implementation is not yet conformant and may have compatibility
+issues. It is suggested that the Canvas context type
+"experimental-webgl" may be supported by default in such
+implementations.
+
+A WebGL implementation might reach conformance, but a subsequent
+graphics driver release on a particular OS might introduce a
+regression causing failures of one or more of the WebGL conformance
+tests. In this situation it is not required to revoke support for the
+"webgl" HTML Canvas context type. The WebGL implementer should work
+with the GPU vendor to ensure the driver regression is fixed. A
+situation like this would, however, prevent the WebGL implementer from
+conforming to a subsequent version of the test suite.
+
+(A) Conformance Rules for a Web Browser Implementer
+===================================================
+
+1. Conformance on a particular operating system
+
+On a given OS, a WebGL implementation will be considered to conform to
+a particular version of the conformance suite if the suite passes with
+no test failures on at least two GPUs, each from a different
+vendor. If the OS only supports a GPU from one vendor, the two-GPU
+requirement is dropped.
+
+2. Conformance across multiple operating systems
+
+A WebGL implementation will be considered to conform to a particular
+version of the conformance suite if it passes rule (1) on all of the
+OSs on which the WebGL implementation is intended to be supported.
+
+3. Conformance as the web browser is upgraded
+
+WebGL conformance results submitted for an earlier version of the
+browser carry forward to later versions of the browser, unless the
+WebGL implementation changes substantially enough that it is expected
+that conformance may have been affected. In that case, the browser
+implementer should submit new conformance results.
+
+4. Conformance as the operating system is upgraded
+
+If a new version is released of one of the OSs on which a WebGL
+implementation is intended to run, then WebGL conformance results
+submitted for earlier versions of that OS carry forward. Future
+conformance results must be submitted against the new version of the
+OS. If it is anticipated that the older OS version will be supported
+for some time, then future conformance results must be submitted
+separately for both the old and new versions of the OS.
+
+(B) Conformance Rules for a GPU Vendor
+======================================
+
+A GPU vendor submitting conformance results for a WebGL implementation
+typically does so because the device containing the GPU includes a
+built-in web browser. In this case the following rules apply:
+
+1. Conformance results must be submitted for each GPU and operating
+system combination to be certified. It is not required to submit
+results for different devices containing the same GPU and running the
+same operating system.
+
+2. Conformance results may be submitted up to three months in advance
+of the product reaching initial shipment.
+
+3. Conformance results carry forward for a given GPU as the operating
+system and graphics driver are upgraded, unless there is an
+expectation that conformance may have been affected. In that case, the
+GPU vendor should submit new conformance results.
+
+Discussion
+==========
+
+A WebGL implementation intended to ship on three OSs may reach
+conformance on two of them, but due to graphics driver bugs, may be
+unable to reach conformance on the third. In this situation the
+implementation is not yet considered to be conformant.
+
+An existing WebGL implementation which conformed to an earlier version
+of the test suite is not required to remove support for the "webgl"
+HTML Canvas context type while in the process of conforming to a later
+version of the test suite. However, the implementer must not advertise
+conformance to the later version until it has been reached. It is
+acceptable for the implementer to advertise details of their
+conformance, for example number or percentage of passing or failing
+tests, or names of passing or failing tests.
+
+A GPU vendor might submit conformance results in order to use the
+WebGL logo in a marketing campaign. In this situation, results may be
+submitted in advance of the product becoming available through sales
+channels, per the rules above.
+
+The WebGL API has strict security requirements. Even one failing test
+may indicate a serious security issue in the WebGL implementation. For
+this reason, no exceptions for failing conformance tests will be
+granted.
+
+The Khronos Group determines whether a particular WebGL implementation
+is conformant based on the implementer's conformance suite
+submissions, on multiple OSs and on multiple GPUs as necessary, using
+the rules above. An implementer shall not judge their own
+implementation conformant simply by applying the above rules.
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/README.md b/testing/web-platform/tests/webgl/conformance-1.0.3/README.md
new file mode 100644
index 000000000..82f980123
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/README.md
@@ -0,0 +1,77 @@
+Welcome to the WebGL Conformance Test Suite
+===========================================
+
+Note: Before adding a new test or editing an existing test
+[please read these guidelines](test-guidelines.md).
+
+This is the WebGL conformance test suite. You can find a the current "live"
+version at [https://www.khronos.org/registry/webgl/sdk/tests/webgl-conformance-tests.html](https://www.khronos.org/registry/webgl/sdk/tests/webgl-conformance-tests.html)
+
+NOTE TO USERS: Unless you are a WebGL implementor, there is no need to submit
+a conformance result using this process. Should you discover bugs in your
+browser's WebGL implementation, either via this test suite or otherwise,
+please report them through your browser vendor's bug tracking system.
+
+FOR WEBGL IMPLEMENTORS: Please follow the instructions below to create
+a formal conformance submission.
+
+1. Open webgl-conformance-tests.html in your target browser
+
+2. Press the "run tests" button
+
+3. At the end of the run, press "display text summary"
+
+4. Verify that the User Agent and WebGL renderer strings identify your browser and target correctly.
+
+5. Copy the contents of the text summary (starting with "WebGL Conformance Test Results") and send via email to
+ webgl_conformance_submissions@khronos.org
+
+Please see CONFORMANCE_RULES.txt in this directory for guidelines
+about what constitutes a conformant WebGL implementation.
+
+Usage Notes:
+------------
+
+There are various URL options you can pass in.
+
+ run: Set to 1 to start the tests automatically
+
+ Example: webgl-conformance-tests.html?run=1
+
+ version: Set to the version of the harness you wish to run. Tests
+ at this version or below will be run
+
+ Example: webgl-conformance-tests.html?version=1.3.2
+
+ minVersion: Set to the minimum version of each test to include. Only tests
+ at this version or above will be included.
+
+ Example: webgl-conformance-tests.html?minVersion=1.3.2
+
+ fast: Only run tests not marked with --slow
+
+ Example: webgl-conformance-tests.html?fast=true
+
+ skip: Comma separated list of regular expressions of which tests to skip.
+
+ Example: webgl-conformance-tests.html?skip=glsl,.*destruction\.html
+
+ include: Comma separated list of regular expressions of which tests to include.
+
+ Example: webgl-conformance-tests.html?include=glsl,.*destruction\.html
+
+ frames: The number of iframes to use to run tests in parallel.
+
+ Example: webgl-conformance-tests.html?frames=8
+
+ Note the tests are not required to run with anything other than frames = 1.
+
+History
+-------
+
+- 2011/02/24: Version 1.0.0
+- 2012/02/23: Version 1.0.1
+- 2012/03/20: Version 1.0.2
+- 2013/02/14: Version 1.0.3
+- 2013/10/11: Version 2.0.0 (beta)
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/00_readme.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/00_readme.txt
new file mode 100644
index 000000000..a04eaa37b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/00_readme.txt
@@ -0,0 +1,13 @@
+This file "00_test_list.txt" lists which files the test harness should run.
+
+If you add new tests you can update it with
+
+on windows
+
+ dir /b *.html >00_test_list.txt
+
+on OSX / Linux
+
+ ls -1 *.html >00_test_list.txt
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/00_test_list.txt
new file mode 100644
index 000000000..309d3abd8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/00_test_list.txt
@@ -0,0 +1,18 @@
+attribs/00_test_list.txt
+buffers/00_test_list.txt
+canvas/00_test_list.txt
+context/00_test_list.txt
+extensions/00_test_list.txt
+glsl/00_test_list.txt
+limits/00_test_list.txt
+misc/00_test_list.txt
+--min-version 1.0.2 ogles/00_test_list.txt
+programs/00_test_list.txt
+reading/00_test_list.txt
+renderbuffers/00_test_list.txt
+rendering/00_test_list.txt
+state/00_test_list.txt
+textures/00_test_list.txt
+typedarrays/00_test_list.txt
+uniforms/00_test_list.txt
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/00_test_list.txt
new file mode 100644
index 000000000..87a479cc7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/00_test_list.txt
@@ -0,0 +1,10 @@
+--min-version 1.0.3 gl-bindAttribLocation-aliasing.html
+--min-version 1.0.3 gl-bindAttribLocation-matrix.html
+--min-version 1.0.2 gl-disabled-vertex-attrib.html
+gl-enable-vertex-attrib.html
+--min-version 1.0.3 gl-matrix-attributes.html
+gl-vertex-attrib.html
+gl-vertexattribpointer.html
+gl-vertexattribpointer-offsets.html
+--min-version 1.0.2 gl-vertex-attrib-render.html
+gl-vertex-attrib-zero-issues.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html
new file mode 100644
index 000000000..86fd74af8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html
@@ -0,0 +1,92 @@
+<!--
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<title>bindAttribLocation with aliasing</title>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="8" height="8" style="width: 8px; height: 8px;"></canvas>
+<script id="vertexShader" type="text/something-not-javascript">
+precision mediump float;
+attribute $(type_1) a_1;
+attribute $(type_2) a_2;
+void main() {
+ gl_Position = $(gl_Position_1) + $(gl_Position_2);
+}
+</script>
+<script>
+"use strict";
+description("This test verifies combinations of valid, active attribute types cannot be bound to the same location with bindAttribLocation.");
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas, {antialias: false});
+var glFragmentShader = wtu.setupSimpleColorFragmentShader(gl);
+var typeInfo = [
+ { type: 'float', asVec4: 'vec4(0.0, $(var), 0.0, 1.0)' },
+ { type: 'vec2', asVec4: 'vec4($(var), 0.0, 1.0)' },
+ { type: 'vec3', asVec4: 'vec4($(var), 1.0)' },
+ { type: 'vec4', asVec4: '$(var)' },
+];
+var maxAttributes = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);
+// Test all type combinations of a_1 and a_2.
+typeInfo.forEach(function(typeInfo1) {
+ typeInfo.forEach(function(typeInfo2) {
+ debug('attribute_1: ' + typeInfo1.type + ' attribute_2: ' + typeInfo2.type);
+ var replaceParams = {
+ type_1: typeInfo1.type,
+ type_2: typeInfo2.type,
+ gl_Position_1: wtu.replaceParams(typeInfo1.asVec4, {var: 'a_1'}),
+ gl_Position_2: wtu.replaceParams(typeInfo2.asVec4, {var: 'a_2'})
+ };
+ var strVertexShader = wtu.replaceParams(wtu.getScript('vertexShader'), replaceParams);
+ var glVertexShader = wtu.loadShader(gl, strVertexShader, gl.VERTEX_SHADER);
+ assertMsg(glVertexShader != null, "Vertex shader compiled successfully.");
+ // Bind both a_1 and a_2 to the same position and verify the link fails.
+ // Do so for all valid positions available.
+ for (var l = 0; l < maxAttributes; l++) {
+ var glProgram = gl.createProgram();
+ gl.bindAttribLocation(glProgram, l, 'a_1');
+ gl.bindAttribLocation(glProgram, l, 'a_2');
+ gl.attachShader(glProgram, glVertexShader);
+ gl.attachShader(glProgram, glFragmentShader);
+ gl.linkProgram(glProgram);
+ assertMsg(!gl.getProgramParameter(glProgram, gl.LINK_STATUS), "Link should fail when both types are aliased to location " + l);
+ }
+ });
+});
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html
new file mode 100644
index 000000000..549503937
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html
@@ -0,0 +1,121 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<title>WebGL bindAttribLocation with Matrix Attributes Conformance Test</title>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="8" height="8" style="width: 8px; height: 8px;"></canvas>
+<script>
+"use strict";
+description("This test verifies that vectors placed via bindAttribLocation right after matricies will fail if there is insufficient room for the matrix.");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas, {antialias: false});
+
+// Make sure we have room for at least a mat4.
+var maxAttributes = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);
+debug('MAX_VERTEX_ATTRIBUTES is ' + maxAttributes);
+shouldBeGreaterThanOrEqual('maxAttributes', '4');
+
+var glFragmentShader = wtu.setupSimpleColorFragmentShader(gl);
+
+// Given a matrix dimension, load a vertex shader with a matrix of that dimension
+// and a vector. Ensure that both the vector and matrix are active attributes.
+// Return the compiled vertex shader.
+function loadVertexShader(numMatrixDimensions) {
+ var strVertexShader =
+ 'attribute mat' + numMatrixDimensions + ' matrix;\n' +
+ 'attribute vec' + numMatrixDimensions + ' vector;\n' +
+ 'void main(void) { gl_Position = vec4(vector*matrix';
+ // Ensure the vec4 has the correct number of dimensions in order to be assignable
+ // to gl_Position.
+ for (var ii = numMatrixDimensions; ii < 4; ++ii) {
+ strVertexShader += ",0.0";
+ }
+ strVertexShader += ");}\n";
+ return wtu.loadShader(gl, strVertexShader, gl.VERTEX_SHADER);
+}
+
+// Given a vertex shader, matrix location and vector location, create and link
+// a program with glFragmentShader and a vertex shader returned by loadVertexShader
+// attached. Bind the matrix to matrixLocation and the vector to vectorLocation.
+// Return whether the link was successful.
+function createAndLinkProgram(glVertexShader, matrixLocation, vectorLocation) {
+ var glProgram = gl.createProgram();
+ gl.bindAttribLocation(glProgram, matrixLocation, 'matrix');
+ gl.bindAttribLocation(glProgram, vectorLocation, 'vector');
+ gl.attachShader(glProgram, glVertexShader);
+ gl.attachShader(glProgram, glFragmentShader);
+ gl.linkProgram(glProgram);
+ return gl.getProgramParameter(glProgram, gl.LINK_STATUS);
+}
+
+// For each matrix dimension (mat2, mat3 and mat4)
+for (var mm = 2; mm <= 4; ++mm) {
+ debug('Testing ' + mm + ' dimensional matrices');
+ var glVertexShader = loadVertexShader(mm);
+ // Per the WebGL spec: "LinkProgram will fail if the attribute bindings assigned
+ // by bindAttribLocation do not leave enough space to assign a location for an
+ // active matrix attribute which requires multiple contiguous generic attributes."
+ // We will test this by placing the vector after the matrix attribute such that there
+ // is not enough room for the matrix. Vertify the link operation fails.
+
+ // Run the test for each available attribute slot. Go to maxAttributes-mm to leave enough room
+ // for the matrix itself. Leave another slot open for the vector following the matrix.
+ for (var pp = 0; pp <= maxAttributes - mm - 1; ++pp) {
+ // For each matrix dimension, bind the vector right after the matrix such that we leave
+ // insufficient room for the matrix. Verify doing this will fail the link operation.
+ for (var ll = 0; ll < mm; ++ll) {
+ var vectorLocation = pp + ll;
+ assertMsg(!createAndLinkProgram(glVertexShader, /*matrixLocation*/pp, vectorLocation),
+ "Matrix with location " + pp + " and vector with location " + vectorLocation + " should not link.");
+ }
+ // Ensure that once we have left enough room for the matrix, the program links successfully.
+ var vectorLocation = pp + ll;
+ assertMsg(createAndLinkProgram(glVertexShader, /*matrixLocation*/pp, vectorLocation),
+ "Matrix with location " + pp + " and vector with location " + vectorLocation + " should link.");
+ debug('');
+ }
+ debug('');
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-disabled-vertex-attrib.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-disabled-vertex-attrib.html
new file mode 100644
index 000000000..5f6f993e2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-disabled-vertex-attrib.html
@@ -0,0 +1,102 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Disabled Vertex Attrib Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 a_position;
+attribute vec4 a_color;
+varying vec4 v_color;
+bool isCorrectColor(vec4 v) {
+ return v.x == 0.0 && v.y == 0.0 && v.z == 0.0 && v.w == 1.0;
+}
+void main() {
+ gl_Position = a_position;
+ v_color = isCorrectColor(a_color) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 v_color;
+void main() {
+ gl_FragColor = v_color;
+}
+</script>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+description();
+
+var gl = wtu.create3DContext("example");
+
+var numVertexAttribs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);
+for (var ii = 0; ii < numVertexAttribs; ++ii) {
+ var colorLocation = (ii + 1) % numVertexAttribs;
+ var positionLocation = colorLocation ? 0 : 1;
+
+ if (positionLocation != 0) {
+ // We need to create a new 3d context for testing attrib 0
+ // since we've already effected attrib 0 on other tests.
+ gl = wtu.create3DContext();
+ }
+
+ debug("testing attrib: " + colorLocation);
+ var program = wtu.setupProgram(
+ gl,
+ ['vshader', 'fshader'],
+ ['a_position', 'a_color'],
+ [positionLocation, colorLocation]);
+ var gridRes = 1;
+ wtu.setupIndexedQuad(gl, gridRes, positionLocation);
+ wtu.clearAndDrawIndexedQuad(gl, gridRes);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+}
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html
new file mode 100644
index 000000000..c3838070d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html
@@ -0,0 +1,84 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>WebGL Enable Vertex Attrib Test</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+ void main()
+ {
+ gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+ }
+</script>
+
+<script>
+"use strict";
+description("tests that turning on attribs that have no buffer bound fails to draw");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+
+var vertexObject = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+gl.enableVertexAttribArray(0);
+gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+gl.enableVertexAttribArray(3);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+gl.drawArrays(gl.TRIANGLES, 0, 3);
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION);
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-matrix-attributes.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-matrix-attributes.html
new file mode 100644
index 000000000..6f62d6025
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-matrix-attributes.html
@@ -0,0 +1,159 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<title>WebGL Matrix Attribute Conformance Test</title>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="8" height="8" style="width: 8px; height: 8px;"></canvas>
+<script>
+"use strict";
+description("This tests ensures that matrix attribute locations do not clash with other shader attributes.");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas, {antialias: false});
+
+// Make sure we have room for at least a mat4.
+var maxAttributes = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);
+debug('MAX_VERTEX_ATTRIBUTES is ' + maxAttributes);
+shouldBeGreaterThanOrEqual('maxAttributes', '4');
+
+var glFragmentShader = wtu.setupSimpleColorFragmentShader(gl);
+
+// prepareMatrixProgram creates a program with glFragmentShader as the fragment shader.
+// The vertex shader has numVector number of vectors and a matrix with numMatrixDimensions
+// dimensions at location numMatrixPosition in the list of attributes.
+// Ensures that every vector and matrix is used by the program.
+// Returns a valid program on successfull link; null on link failure.
+function prepareMatrixProgram(numVectors, numMatrixDimensions, numMatrixPosition) {
+ // Add the matrix and vector attribute declarations. Declare the vectors
+ // to have the same number of components as the matrix so we can perform
+ // operations on them when we assign to gl_Position later on.
+ var strVertexShader = "";
+ for (var ii = 1; ii <= numVectors; ++ii) {
+ if (numMatrixPosition === ii) {
+ strVertexShader += "attribute mat" + numMatrixDimensions + " matrix;\n";
+ }
+ strVertexShader += "attribute vec" + numMatrixDimensions + " vec_" + ii + ";\n";
+ }
+ // numMatrixPosition will be one past numVectors if the caller wants it to be
+ // last. Hence, we need this check outside the loop as well as inside.
+ if (numMatrixPosition === ii) {
+ strVertexShader += "attribute mat" + numMatrixDimensions + " matrix;\n";
+ }
+ // Add the body of the shader. Add up all of the vectors and multiply by the matrix.
+ // The operations we perform do not matter. We just need to ensure that all the vector and
+ // matrix attributes are used.
+ strVertexShader += "void main(void) { \ngl_Position = vec4((";
+ for (var ii = 1; ii <= numVectors; ++ii) {
+ if (ii > 1) {
+ strVertexShader += "+"
+ }
+ strVertexShader += "vec_" + ii;
+ }
+ strVertexShader += ")*matrix";
+ // Ensure the vec4 has the correct number of dimensions in order to be assignable
+ // to gl_Position.
+ for (var ii = numMatrixDimensions; ii < 4; ++ii) {
+ strVertexShader += ",0.0";
+ }
+ strVertexShader += ");}\n";
+ // Load the shader, attach it to a program, and return the link results
+ var glVertexShader = wtu.loadShader(gl, strVertexShader, gl.VERTEX_SHADER);
+ var strTest = 'Load shader with ' + numVectors + ' vectors and 1 matrix';
+ if (glVertexShader !== null) {
+ testPassed(strTest);
+
+ var glProgram = gl.createProgram();
+ gl.attachShader(glProgram, glVertexShader);
+ gl.attachShader(glProgram, glFragmentShader);
+ gl.linkProgram(glProgram);
+ if (gl.getProgramParameter(glProgram, gl.LINK_STATUS)) {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, 'linkProgram');
+ return glProgram;
+ }
+ } else {
+ testFailed(strTest);
+ }
+ return null;
+}
+
+debug('');
+
+// Test mat2, mat3 and mat4.
+for (var mm = 2; mm <= 4; ++mm) {
+ // Add maxAttribute number of attributes by saving enough room in the attribute
+ // list for a matrix of mm dimensions. All of the other attribute slots will be
+ // filled with vectors.
+ var numVectors = maxAttributes - mm;
+ for (var pp = 1; pp <= numVectors + 1; ++pp) {
+ debug('Test ' + mm + ' dimensional matrix at position ' + pp);
+ var glProgram = prepareMatrixProgram(numVectors, /*numMatrixDimensions*/mm, /*numMatrixPosition*/pp);
+ shouldBeNonNull('glProgram');
+ var attribMatrix = gl.getAttribLocation(glProgram, 'matrix');
+ debug('Matrix is at attribute location ' + attribMatrix);
+ shouldBeTrue('attribMatrix > -1');
+ // Per the spec, when an attribute is a matrix attribute, getAttribLocation
+ // returns the index of the first component of the matrix. The implementation must
+ // leave sufficient room for all the components. Here we ensure none of the vectors
+ // in the shader are assigned attribute locations that belong to the matrix.
+ for (var vv = 1; vv <= numVectors; ++vv) {
+ var strVector = 'vec_' + vv
+ var attribVector = gl.getAttribLocation(glProgram, strVector);
+ debug(strVector + ' is at attribute location ' + attribVector);
+ // Begin with the first attribute location where the matrix begins and ensure
+ // the vector's attribute location is not assigned to the matrix. Loop until
+ // we've checked all of the attribute locations that belong to the matrix.
+ for (var ii = attribMatrix; ii < attribMatrix + mm; ++ii) {
+ var testStr = strVector + ' attribute location: ' + attribVector + '. Should not be ' + ii;
+ if (attribVector !== ii) {
+ testPassed(testStr);
+ } else {
+ testFailed(testStr);
+ }
+ }
+ }
+ debug('');
+ }
+ debug('');
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html
new file mode 100644
index 000000000..4c0966dda
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html
@@ -0,0 +1,112 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"></script>
+ <script id='vshader' type='x-shader'>
+ attribute vec4 a;
+ attribute vec2 p;
+ void main() {
+ gl_Position = vec4(p.x + a.x + a.y + a.z + a.w, p.y, 0.0, 1.0);
+ }
+ </script>
+ <script id='fshader' type='x-shader'>
+ precision mediump float;
+ void main() {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+ }
+ </script>
+ <script>
+ "use strict";
+ function checkRedPortion(gl, w, low, high) {
+ var buf = new Uint8Array(w * w * 4);
+ gl.readPixels(0, 0, w, w, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ var i = 0;
+ for (; i < w; ++i) {
+ if (buf[i * 4 + 0] == 255 && buf[i * 4 + 1] == 0 && buf[i * 4 + 2] == 0 && buf[i * 4 + 3] == 255) {
+ break;
+ }
+ }
+ return low <= i && i <= high;
+ }
+
+ function runTest() {
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext('testbed', { preserveDrawingBuffer : true });
+ if (!gl) {
+ testFailed('could not create context');
+ return;
+ }
+ var program = wtu.setupProgram(gl, ['vshader', 'fshader'], ['p', 'a'])
+
+ gl.enableVertexAttribArray(gl.p);
+ var pos = gl.createBuffer();
+ pos.type = gl.FLOAT;
+ pos.size = 2;
+ pos.num = 4;
+ gl.bindBuffer(gl.ARRAY_BUFFER, pos);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]), gl.STATIC_DRAW);
+
+ gl.vertexAttribPointer(0, pos.size, pos.type, false, 0, 0);
+
+ debug('Test vertexAttrib[1..4]fv by setting different combinations that add up to 1.5 and use that when rendering.');
+ var vals = [[0.5], [0.1,0.4], [0.2,-0.2,0.5], [-1.0,0.3,0.2,2.0]];
+
+ for (var j = 0; j < 4; ++j) {
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl['vertexAttrib' + (j+1) + 'fv'](1, vals[j]);
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, pos.num);
+
+ if (checkRedPortion(gl, 50, 50 * 0.7, 50 * 0.8)) {
+ testPassed('Attribute of size ' + (j+1) + ' was set correctly');
+ } else {
+ testFailed('Attribute of size ' + (j+1) + ' was not set correctly');
+ }
+ }
+ }
+ </script>
+ </head>
+ <body>
+ <canvas id="testbed" width="50" height="50"></canvas>
+ <div id="description"></div>
+ <div id="console"></div>
+ <script>
+ "use strict";
+ description('Verify that using constant attributes works.');
+ runTest();
+ var successfullyParsed = true;
+ </script>
+ <script src="../../resources/js-test-post.js"></script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html
new file mode 100644
index 000000000..de45ce308
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html
@@ -0,0 +1,154 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Enable Vertex Attrib Zero Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+ void main()
+ {
+ gl_FragColor = vec4(0.0,1.0,0.0,1.0);
+ }
+</script>
+
+<script>
+"use strict";
+description("Test some of the issues of the difference between attrib 0 on OpenGL vs WebGL");
+debug("");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var g_program;
+var g_attribLocation;
+function setup(attribIndex) {
+ var program = wtu.setupProgram(
+ gl, ['vshader', 'fshader'], ['vPosition'], [attribIndex]);
+ g_program = program;
+ g_attribLocation = attribIndex;
+ shouldBe("g_attribLocation", "gl.getAttribLocation(g_program, 'vPosition')");
+ return program;
+}
+
+function setupVerts(numVerts) {
+ var verts = [
+ 1.0, 1.0, 0.0,
+ -1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, -1.0, 0.0
+ ];
+ var positions = new Float32Array(numVerts * 3);
+ var indices = new Uint16Array(numVerts);
+ for (var ii = 0; ii < numVerts; ++ii) {
+ var ndx = ii % 6;
+ var dst = ii * 3;
+ var src = ndx * 3;
+ for (var jj = 0; jj < 3; ++jj) {
+ positions[dst + jj] = verts[src + jj];
+ }
+ indices[ii] = ii;
+ }
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);
+ var indexBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+}
+
+var p0 = setup(0);
+var p3 = setup(3);
+setupVerts(60000);
+
+for (var ii = 0; ii < 5; ++ii) {
+ // test drawing with attrib 0
+ gl.useProgram(p0);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.drawElements(gl.TRIANGLES, 60000, gl.UNSIGNED_SHORT, 0);
+ wtu.glErrorShouldBe(
+ gl, gl.NO_ERROR,
+ "drawing using attrib 0 with 6 verts");
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "canvas should be green");
+ gl.disableVertexAttribArray(0);
+
+ // test drawing without attrib 0
+ gl.useProgram(p3);
+ gl.enableVertexAttribArray(3);
+ gl.vertexAttribPointer(3, 3, gl.FLOAT, false, 0, 0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 60000);
+ wtu.glErrorShouldBe(
+ gl, gl.NO_ERROR,
+ "drawing using attrib 3 with 60000 verts");
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "canvas should be green");
+ gl.disableVertexAttribArray(3);
+
+ // This second test of drawing without attrib0 unconvered a bug in chrome
+ // where after the draw without attrib0 the attrib 0 emulation code disabled
+ // attrib 0 and it was never re-enabled so this next draw failed.
+ gl.useProgram(p3);
+ gl.enableVertexAttribArray(3);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.drawElements(gl.TRIANGLES, 60000, gl.UNSIGNED_SHORT, 0);
+ wtu.glErrorShouldBe(
+ gl, gl.NO_ERROR,
+ "drawing using attrib 3 with 60000 verts");
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "canvas should be green");
+ gl.disableVertexAttribArray(3);
+}
+
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib.html
new file mode 100644
index 000000000..b284c1300
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib.html
@@ -0,0 +1,120 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL vertexAttrib Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+"use strict";
+description("This test ensures WebGL implementations vertexAttrib can be set and read.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking gl.vertexAttrib.");
+
+ var numVertexAttribs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);
+ for (var ii = 0; ii < numVertexAttribs; ++ii) {
+ gl.vertexAttrib1fv(ii, [1]);
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '1');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '0');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '0');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
+
+ gl.vertexAttrib2fv(ii, [1, 2]);
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '1');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '2');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '0');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
+
+ gl.vertexAttrib3fv(ii, [1, 2, 3]);
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '1');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '2');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '3');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
+
+ gl.vertexAttrib4fv(ii, [1, 2, 3, 4]);
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '1');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '2');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '3');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '4');
+
+ gl.vertexAttrib1f(ii, 5);
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '5');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '0');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '0');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
+
+ gl.vertexAttrib2f(ii, 6, 7);
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '6');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '7');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '0');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
+
+ gl.vertexAttrib3f(ii, 7, 8, 9);
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '7');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '8');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '9');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
+
+ gl.vertexAttrib4f(ii, 6, 7, 8, 9);
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '6');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '7');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '8');
+ shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '9');
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer-offsets.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer-offsets.html
new file mode 100644
index 000000000..64dfacfbf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer-offsets.html
@@ -0,0 +1,183 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>vertexattribpointer offsets test</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+There is supposed to be an example drawing here, but it's not important.
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+ uniform vec4 color;
+ void main()
+ {
+ gl_FragColor = color;
+ }
+ </script>
+
+ <script>
+ "use strict";
+ function init()
+ {
+ description("test vertexattribpointer offsets work");
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+
+ var tests = [
+ { data: new Float32Array([ 0, 1, 0, 1, 0, 0, 0, 0, 0 ]),
+ type: gl.FLOAT,
+ componentSize: 4,
+ normalize: false,
+ },
+ { data: new Float32Array([ 0, 1, 0, 1, 0, 0, 0, 0, 0 ]),
+ type: gl.FLOAT,
+ componentSize: 4,
+ normalize: false,
+ },
+ { data: new Uint16Array([ 0, 32767, 0, 32767, 0, 0, 0, 0, 0 ]),
+ type: gl.SHORT,
+ componentSize: 2,
+ normalize: true,
+ },
+ { data: new Uint16Array([ 0, 65535, 0, 65535, 0, 0, 0, 0, 0 ]),
+ type: gl.UNSIGNED_SHORT,
+ componentSize: 2,
+ normalize: true,
+ },
+ { data: new Uint16Array([ 0, 1, 0, 1, 0, 0, 0, 0, 0 ]),
+ type: gl.UNSIGNED_SHORT,
+ componentSize: 2,
+ normalize: false,
+ },
+ { data: new Uint16Array([ 0, 1, 0, 1, 0, 0, 0, 0, 0 ]),
+ type: gl.SHORT,
+ componentSize: 2,
+ normalize: false,
+ },
+ { data: new Uint8Array([ 0, 127, 0, 127, 0, 0, 0, 0, 0 ]),
+ type: gl.BYTE,
+ componentSize: 1,
+ normalize: true,
+ },
+ { data: new Uint8Array([ 0, 255, 0, 255, 0, 0, 0, 0, 0 ]),
+ type: gl.UNSIGNED_BYTE,
+ componentSize: 1,
+ normalize: true,
+ },
+ { data: new Uint8Array([ 0, 1, 0, 1, 0, 0, 0, 0, 0 ]),
+ type: gl.BYTE,
+ componentSize: 1,
+ normalize: false,
+ },
+ { data: new Uint8Array([ 0, 1, 0, 1, 0, 0, 0, 0, 0 ]),
+ type: gl.UNSIGNED_BYTE,
+ componentSize: 1,
+ normalize: false,
+ }
+ ];
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, 1024, gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+
+ var colorLoc = gl.getUniformLocation(program, "color");
+ var kNumVerts = 3;
+ var kNumComponents = 3;
+
+ var count = 0;
+ for (var tt = 0; tt < tests.length; ++tt) {
+ var test = tests[tt];
+ for (var oo = 0; oo < 3; ++oo) {
+ for (var ss = 0; ss < 3; ++ss) {
+ var offset = (oo + 1) * test.componentSize;
+ var color = (count % 2) ? [1, 0, 0, 1] : [0, 1, 0, 1];
+ var stride = test.componentSize * kNumComponents + test.componentSize * ss;
+ debug("");
+ debug("check with " + wtu.glEnumToString(gl, test.type) + " at offset: " + offset + " with stride:" + stride + " normalize: " + test.normalize);
+ gl.uniform4fv(colorLoc, color);
+ var data = new Uint8Array(test.componentSize * kNumVerts * kNumComponents + stride * (kNumVerts - 1));
+ var view = new Uint8Array(test.data.buffer);
+ var size = test.componentSize * kNumComponents;
+ for (var jj = 0; jj < kNumVerts; ++jj) {
+ var off1 = jj * size;
+ var off2 = jj * stride;
+ for (var zz = 0; zz < size; ++zz) {
+ data[off2 + zz] = view[off1 + zz];
+ }
+ }
+ gl.bufferSubData(gl.ARRAY_BUFFER, offset, data);
+ gl.vertexAttribPointer(0, 3, test.type, test.normalize, stride, offset);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+
+ var buf = new Uint8Array(50 * 50 * 4);
+ gl.readPixels(0, 0, 50, 50, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+
+ var black = [0, 0, 0, 0];
+ var other = [color[0] * 255, color[1] * 255, color[2] * 255, color[3] * 255];
+ var otherMsg = "should be " + ((count % 2) ? "red" : "green")
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, black, "should be black", 0);
+ wtu.checkCanvasRect(gl, 0, 49, 1, 1, black, "should be black", 0);
+ wtu.checkCanvasRect(gl, 26, 40, 1, 1, other, otherMsg, 0);
+ wtu.checkCanvasRect(gl, 26, 27, 1, 1, other, otherMsg, 0);
+ wtu.checkCanvasRect(gl, 40, 27, 1, 1, other, otherMsg, 0);
+ ++count;
+ }
+ }
+ }
+ }
+
+ init();
+ var successfullyParsed = true;
+ </script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer.html
new file mode 100644
index 000000000..89cb8bbb3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer.html
@@ -0,0 +1,156 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL vertexAttribPointer Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+"use strict";
+description("This test checks vertexAttribPointer behaviors in WebGL.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking gl.vertexAttribPointer.");
+
+ if (!gl.FIXED) {
+ gl.FIXED = 0x140C;
+ }
+
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, 0, 0, 12);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "vertexAttribPointer should fail if no buffer is bound");
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(0), gl.STATIC_DRAW);
+
+ gl.vertexAttribPointer(0, 1, gl.INT, 0, 0, 0);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "vertexAttribPointer should not support INT");
+ gl.vertexAttribPointer(0, 1, gl.UNSIGNED_INT, 0, 0, 0);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "vertexAttribPointer should not support UNSIGNED_INT");
+ gl.vertexAttribPointer(0, 1, gl.FIXED, 0, 0, 0);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "vertexAttribPointer should not support FIXED");
+
+ var checkVertexAttribPointer = function(
+ gl, err, reason, size, type, normalize, stride, offset) {
+ gl.vertexAttribPointer(0, size, type, normalize, stride, offset);
+ wtu.glErrorShouldBe(gl, err,
+ "gl.vertexAttribPointer(0, " + size +
+ ", gl." + wtu.glEnumToString(gl, type) +
+ ", " + normalize +
+ ", " + stride +
+ ", " + offset +
+ ") should " + (err == gl.NO_ERROR ? "succeed " : "fail ") + reason);
+ }
+
+ var types = [
+ { type:gl.BYTE, bytesPerComponent: 1 },
+ { type:gl.UNSIGNED_BYTE, bytesPerComponent: 1 },
+ { type:gl.SHORT, bytesPerComponent: 2 },
+ { type:gl.UNSIGNED_SHORT, bytesPerComponent: 2 },
+ { type:gl.FLOAT, bytesPerComponent: 4 },
+ ];
+
+ for (var ii = 0; ii < types.length; ++ii) {
+ var info = types[ii];
+ debug("");
+ for (var size = 1; size <= 4; ++size) {
+ debug("");
+ debug("checking: " + wtu.glEnumToString(gl, info.type) + " with size " + size);
+ var bytesPerElement = size * info.bytesPerComponent;
+ var offsetSet = [
+ 0,
+ 1,
+ info.bytesPerComponent - 1,
+ info.bytesPerComponent,
+ info.bytesPerComponent + 1,
+ info.bytesPerComponent * 2];
+ for (var jj = 0; jj < offsetSet.length; ++jj) {
+ var offset = offsetSet[jj];
+ for (var kk = 0; kk < offsetSet.length; ++kk) {
+ var stride = offsetSet[kk];
+ var err = gl.NO_ERROR;
+ var reason = ""
+ if (offset % info.bytesPerComponent != 0) {
+ reason = "because offset is bad";
+ err = gl.INVALID_OPERATION;
+ }
+ if (stride % info.bytesPerComponent != 0) {
+ reason = "because stride is bad";
+ err = gl.INVALID_OPERATION;
+ }
+ checkVertexAttribPointer(
+ gl, err, reason, size, info.type, false, stride, offset);
+ }
+ var stride = Math.floor(255 / info.bytesPerComponent) * info.bytesPerComponent;
+
+ if (offset == 0) {
+ checkVertexAttribPointer(
+ gl, gl.NO_ERROR, "at stride limit",
+ size, info.type, false, stride, offset);
+ checkVertexAttribPointer(
+ gl, gl.INVALID_VALUE, "over stride limit",
+ size, info.type, false,
+ stride + info.bytesPerComponent, offset);
+ }
+ }
+ }
+ }
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/00_test_list.txt
new file mode 100644
index 000000000..374a86ed9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/00_test_list.txt
@@ -0,0 +1,11 @@
+buffer-bind-test.html
+buffer-data-array-buffer.html
+--min-version 1.0.3 buffer-data-array-buffer-delete.html
+--min-version 1.0.2 element-array-buffer-delete-recreate.html
+index-validation-copies-indices.html
+index-validation-crash-with-buffer-sub-data.html
+--min-version 1.0.2 index-validation-large-buffer.html
+index-validation-verifies-too-many-indices.html
+index-validation-with-resized-buffer.html
+index-validation.html
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/buffer-bind-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/buffer-bind-test.html
new file mode 100644
index 000000000..ce596706c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/buffer-bind-test.html
@@ -0,0 +1,89 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>WebGL BindBuffer conformance test.</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="40" height="40" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("Checks a buffer can only be bound to 1 target.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+
+ var buf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "should be able to bind array buffer.");
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "should be able to unbind array buffer.");
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, buf);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "should get INVALID_OPERATION if attempting to bind array buffer to different target");
+
+ var buf = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, buf);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "should be able to bind element array buffer.");
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "should be able to unbind element array buffer.");
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "should get INVALID_OPERATION if attempting to bind element array buffer to different target");
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html
new file mode 100644
index 000000000..5887743e2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html
@@ -0,0 +1,82 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Test ARRAY_BUFFER deletion when a vertex attrib array with location != 0 is pointing to it and preserveDrawingBuffer is true.");
+
+var canvas = document.createElement('canvas');
+document.body.appendChild(canvas);
+
+canvas.addEventListener(
+ "webglcontextlost",
+ function(event) {
+ testFailed("Context lost");
+ event.preventDefault();
+ },
+ false);
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext(canvas, {preserveDrawingBuffer: true});
+shouldBeNonNull("gl");
+
+var array = new Float32Array([0]);
+var buf = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+gl.bufferData(gl.ARRAY_BUFFER, array, gl.STATIC_DRAW);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+var attribLocation = 1;
+gl.enableVertexAttribArray(attribLocation);
+gl.vertexAttribPointer(attribLocation, 1, gl.FLOAT, false, 0, 0);
+
+gl.deleteBuffer(buf);
+
+setTimeout(function() {
+ // Wait for possible context loss
+ finishTest();
+}, 2000);
+
+var successfullyParsed = true;
+</script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html
new file mode 100644
index 000000000..d0fcf4065
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html
@@ -0,0 +1,96 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Test bufferData/bufferSubData with ArrayBuffer input");
+
+debug('Regression test for <a href="https://bugs.webkit.org/show_bug.cgi?id=41884">https://bugs.webkit.org/show_bug.cgi?id=41884</a> : <code>Implement bufferData and bufferSubData with ArrayBuffer as input</code>');
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+shouldBeNonNull("gl");
+
+var array = new ArrayBuffer(128);
+shouldBeNonNull("array");
+
+var buf = gl.createBuffer();
+shouldBeNonNull("buf");
+
+gl.bufferData(gl.ARRAY_BUFFER, array, gl.STATIC_DRAW);
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION);
+
+gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+gl.bufferData(gl.ARRAY_BUFFER, -10, gl.STATIC_DRAW);
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
+
+gl.bufferData(gl.ARRAY_BUFFER, null, gl.STATIC_DRAW);
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
+
+// This should not crash, but the selection of the overload is ambiguous per Web IDL.
+gl.bufferData(gl.ARRAY_BUFFER, null, gl.STATIC_DRAW);
+gl.getError();
+
+gl.bufferData(gl.ARRAY_BUFFER, array, gl.STATIC_DRAW);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+array = new ArrayBuffer(64);
+
+gl.bufferSubData(gl.ARRAY_BUFFER, -10, array);
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
+
+gl.bufferSubData(gl.ARRAY_BUFFER, -10, new Float32Array(8));
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
+
+gl.bufferSubData(gl.ARRAY_BUFFER, 10, array);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+gl.bufferSubData(gl.ARRAY_BUFFER, 10, null);
+wtu.glErrorShouldBe(gl, [gl.NO_ERROR, gl.INVALID_VALUE]);
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/element-array-buffer-delete-recreate.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/element-array-buffer-delete-recreate.html
new file mode 100644
index 000000000..c9afea561
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/element-array-buffer-delete-recreate.html
@@ -0,0 +1,92 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>Element Array Buffer Deletion and Recreation Test</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+function init()
+{
+ description();
+
+ // Clear the background with red.
+ var gl = wtu.create3DContext("example");
+ wtu.setupSimpleColorProgram(gl);
+ var color = [0, 255, 0, 255];
+ wtu.setUByteDrawColor(gl, color);
+
+ var vertexBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ -1, -1,
+ 1, -1,
+ -1, 1,
+ 1, 1
+ ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+
+ // Create an element array buffer.
+ var indexBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint8Array([0, 1, 2, 3]), gl.STATIC_DRAW);
+
+ // Delete the element array buffer.
+ gl.deleteBuffer(indexBuffer);
+
+ // Create a new element array buffer.
+ indexBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint8Array([0, 1, 2, 3]), gl.STATIC_DRAW);
+
+ // Draw with the new element array buffer.
+ // If the geometry is drawn successfully, the fragment shader will color it green.
+ gl.drawElements(gl.TRIANGLE_STRIP, 4, gl.UNSIGNED_BYTE, 0);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from draw");
+ wtu.checkCanvas(gl, color, "should be green")
+}
+
+init();
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-copies-indices.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-copies-indices.html
new file mode 100644
index 000000000..55bbb9705
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-copies-indices.html
@@ -0,0 +1,75 @@
+<!--
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description('Test that client data is always copied during bufferData and bufferSubData calls, because otherwise the data the GL uses to draw may differ from that checked by the index validation code.')
+
+var wtu = WebGLTestUtils;
+var context = wtu.create3DContext();
+var program = wtu.loadStandardProgram(context);
+
+context.useProgram(program);
+var vertexObject = context.createBuffer();
+context.enableVertexAttribArray(0);
+context.bindBuffer(context.ARRAY_BUFFER, vertexObject);
+// 4 vertices -> 2 triangles
+context.bufferData(context.ARRAY_BUFFER, new Float32Array([ 0,0,0, 0,1,0, 1,0,0, 1,1,0 ]), context.STATIC_DRAW);
+context.vertexAttribPointer(0, 3, context.FLOAT, false, 0, 0);
+
+var indexObject = context.createBuffer();
+
+context.bindBuffer(context.ELEMENT_ARRAY_BUFFER, indexObject);
+var indices = new Uint16Array([ 10000, 0, 1, 2, 3, 10000 ]);
+context.bufferData(context.ELEMENT_ARRAY_BUFFER, indices, context.STATIC_DRAW);
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 2)");
+wtu.shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 0)");
+wtu.shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 4)");
+indices[0] = 2;
+indices[5] = 1;
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 2)");
+wtu.shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 0)");
+wtu.shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 4)");
+
+debug("")
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-crash-with-buffer-sub-data.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-crash-with-buffer-sub-data.html
new file mode 100644
index 000000000..1b0f7cbc0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-crash-with-buffer-sub-data.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description('Verifies that the index validation code which is within bufferSubData does not crash.')
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+
+var elementBuffer = gl.createBuffer();
+gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementBuffer);
+gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, 256, gl.STATIC_DRAW);
+var data = new Uint8Array(127);
+gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 63, data);
+testPassed("bufferSubData, when buffer object was initialized with null, did not crash");
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-large-buffer.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-large-buffer.html
new file mode 100644
index 000000000..754291159
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-large-buffer.html
@@ -0,0 +1,79 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description('Tests that index validation for drawElements works with large attribute buffers');
+
+var wtu = WebGLTestUtils;
+var context = wtu.create3DContext();
+var program = wtu.loadStandardProgram(context);
+
+context.useProgram(program);
+
+// Create a small index buffer.
+var indexObject = context.createBuffer();
+context.bindBuffer(context.ELEMENT_ARRAY_BUFFER, indexObject);
+var indexArray = new Uint16Array([0, 1, 2]);
+context.bufferData(context.ELEMENT_ARRAY_BUFFER, indexArray, context.STATIC_DRAW);
+
+// Create a large attribute buffer.
+var vertexObject = context.createBuffer();
+context.enableVertexAttribArray(0);
+context.bindBuffer(context.ARRAY_BUFFER, vertexObject);
+context.bufferData(context.ARRAY_BUFFER, new Float32Array(3 * 65536), context.STATIC_DRAW);
+context.vertexAttribPointer(0, 3, context.FLOAT, false, 0, 0);
+
+debug("Test large attribute buffer")
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.drawElements(context.TRIANGLES, 3, context.UNSIGNED_SHORT, 0)");
+
+// Enlarge the attribute buffer slightly.
+debug("Test even larger attribute buffer")
+context.bufferData(context.ARRAY_BUFFER, new Float32Array(3 * 65536 + 3), context.STATIC_DRAW);
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.drawElements(context.TRIANGLES, 3, context.UNSIGNED_SHORT, 0)");
+
+debug("")
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-verifies-too-many-indices.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-verifies-too-many-indices.html
new file mode 100644
index 000000000..1fba7e461
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-verifies-too-many-indices.html
@@ -0,0 +1,73 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description('Tests that index validation for drawElements does not examine too many indices');
+
+var wtu = WebGLTestUtils;
+var context = wtu.create3DContext();
+var program = wtu.loadStandardProgram(context);
+
+context.useProgram(program);
+var vertexObject = context.createBuffer();
+context.enableVertexAttribArray(0);
+context.bindBuffer(context.ARRAY_BUFFER, vertexObject);
+// 4 vertices -> 2 triangles
+context.bufferData(context.ARRAY_BUFFER, new Float32Array([ 0,0,0, 0,1,0, 1,0,0, 1,1,0 ]), context.STATIC_DRAW);
+context.vertexAttribPointer(0, 3, context.FLOAT, false, 0, 0);
+
+var indexObject = context.createBuffer();
+
+debug("Test out of range indices")
+context.bindBuffer(context.ELEMENT_ARRAY_BUFFER, indexObject);
+context.bufferData(context.ELEMENT_ARRAY_BUFFER, new Uint16Array([ 10000, 0, 1, 2, 3, 10000 ]), context.STATIC_DRAW);
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 2)");
+wtu.shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 0)");
+wtu.shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 4)");
+
+debug("")
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-with-resized-buffer.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-with-resized-buffer.html
new file mode 100644
index 000000000..95a17ff2f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-with-resized-buffer.html
@@ -0,0 +1,130 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="1" height="1"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+
+<script id="vs" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec4 vColor;
+varying vec4 color;
+void main() {
+ gl_Position = vPosition;
+ color = vColor;
+}
+</script>
+<script id="fs" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 color;
+void main() {
+ gl_FragColor = color;
+}
+</script>
+<script>
+"use strict";
+description('Test that updating the size of a vertex buffer is properly noticed by the WebGL implementation.')
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupProgram(gl, ["vs", "fs"], ["vPosition", "vColor"]);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after initialization");
+
+var vertexObject = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(
+ [-1,1,0, 1,1,0, -1,-1,0,
+ -1,-1,0, 1,1,0, 1,-1,0]), gl.STATIC_DRAW);
+gl.enableVertexAttribArray(0);
+gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after vertex setup");
+
+var texCoordObject = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, texCoordObject);
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(
+ [0,0, 1,0, 0,1,
+ 0,1, 1,0, 1,1]), gl.STATIC_DRAW);
+gl.enableVertexAttribArray(1);
+gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, 0);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after texture coord setup");
+
+// Now resize these buffers because we want to change what we're drawing.
+gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ -1,1,0, 1,1,0, -1,-1,0, 1,-1,0,
+ -1,1,0, 1,1,0, -1,-1,0, 1,-1,0]), gl.STATIC_DRAW);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after vertex redefinition");
+gl.bindBuffer(gl.ARRAY_BUFFER, texCoordObject);
+gl.bufferData(gl.ARRAY_BUFFER, new Uint8Array([
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255]), gl.STATIC_DRAW);
+gl.vertexAttribPointer(1, 4, gl.UNSIGNED_BYTE, false, 0, 0);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after texture coordinate / color redefinition");
+
+var numQuads = 2;
+var indices = new Uint8Array(numQuads * 6);
+for (var ii = 0; ii < numQuads; ++ii) {
+ var offset = ii * 6;
+ var quad = (ii == (numQuads - 1)) ? 4 : 0;
+ indices[offset + 0] = quad + 0;
+ indices[offset + 1] = quad + 1;
+ indices[offset + 2] = quad + 2;
+ indices[offset + 3] = quad + 2;
+ indices[offset + 4] = quad + 1;
+ indices[offset + 5] = quad + 3;
+}
+var indexObject = gl.createBuffer();
+gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexObject);
+gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after setting up indices");
+gl.drawElements(gl.TRIANGLES, numQuads * 6, gl.UNSIGNED_BYTE, 0);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after drawing");
+
+debug("")
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation.html
new file mode 100644
index 000000000..8ffcbc79b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/buffers/index-validation.html
@@ -0,0 +1,140 @@
+<!--
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Tests that index validation verifies the correct number of indices");
+
+function sizeInBytes(type) {
+ switch (type) {
+ case gl.BYTE:
+ case gl.UNSIGNED_BYTE:
+ return 1;
+ case gl.SHORT:
+ case gl.UNSIGNED_SHORT:
+ return 2;
+ case gl.INT:
+ case gl.UNSIGNED_INT:
+ case gl.FLOAT:
+ return 4;
+ default:
+ throw "unknown type";
+ }
+}
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+var program = wtu.loadStandardProgram(gl);
+
+// 3 vertices => 1 triangle, interleaved data
+var dataComplete = new Float32Array([0, 0, 0, 1,
+ 0, 0, 1,
+ 1, 0, 0, 1,
+ 0, 0, 1,
+ 1, 1, 1, 1,
+ 0, 0, 1]);
+var dataIncomplete = new Float32Array([0, 0, 0, 1,
+ 0, 0, 1,
+ 1, 0, 0, 1,
+ 0, 0, 1,
+ 1, 1, 1, 1]);
+var indices = new Uint16Array([0, 1, 2]);
+
+debug("Testing with valid indices");
+
+var bufferComplete = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, bufferComplete);
+gl.bufferData(gl.ARRAY_BUFFER, dataComplete, gl.STATIC_DRAW);
+var elements = gl.createBuffer();
+gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elements);
+gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+gl.useProgram(program);
+var vertexLoc = gl.getAttribLocation(program, "a_vertex");
+var normalLoc = gl.getAttribLocation(program, "a_normal");
+gl.vertexAttribPointer(vertexLoc, 4, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 0);
+gl.enableVertexAttribArray(vertexLoc);
+gl.vertexAttribPointer(normalLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 4 * sizeInBytes(gl.FLOAT));
+gl.enableVertexAttribArray(normalLoc);
+shouldBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0)');
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+debug("Testing with out-of-range indices");
+
+var bufferIncomplete = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, bufferIncomplete);
+gl.bufferData(gl.ARRAY_BUFFER, dataIncomplete, gl.STATIC_DRAW);
+gl.vertexAttribPointer(vertexLoc, 4, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 0);
+gl.enableVertexAttribArray(vertexLoc);
+gl.disableVertexAttribArray(normalLoc);
+debug("Enable vertices, valid");
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0)');
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+debug("Enable normals, out-of-range");
+gl.vertexAttribPointer(normalLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 4 * sizeInBytes(gl.FLOAT));
+gl.enableVertexAttribArray(normalLoc);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0)');
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION);
+
+debug("Test with enabled attribute that does not belong to current program");
+
+gl.disableVertexAttribArray(normalLoc);
+var extraLoc = Math.max(vertexLoc, normalLoc) + 1;
+gl.enableVertexAttribArray(extraLoc);
+debug("Enable an extra attribute with null");
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0)');
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION);
+debug("Enable an extra attribute with insufficient data buffer");
+gl.vertexAttribPointer(extraLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 4 * sizeInBytes(gl.FLOAT));
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0)');
+debug("Pass large negative index to vertexAttribPointer");
+gl.vertexAttribPointer(normalLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), -2000000000 * sizeInBytes(gl.FLOAT));
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
+shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0)');
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/00_test_list.txt
new file mode 100644
index 000000000..bfa21995c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/00_test_list.txt
@@ -0,0 +1,15 @@
+buffer-offscreen-test.html
+buffer-preserve-test.html
+canvas-test.html
+canvas-zero-size.html
+drawingbuffer-static-canvas-test.html
+--min-version 1.0.2 drawingbuffer-hd-dpi-test.html
+drawingbuffer-test.html
+--min-version 1.0.3 draw-webgl-to-canvas-test.html
+--min-version 1.0.3 draw-static-webgl-to-multiple-canvas-test.html
+--min-version 1.0.2 framebuffer-bindings-unaffected-on-resize.html
+--min-version 1.0.3 rapid-resizing.html
+--min-version 1.0.2 texture-bindings-unaffected-on-resize.html
+--min-version 1.0.2 to-data-url-test.html
+viewport-unchanged-upon-resize.html
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/buffer-offscreen-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/buffer-offscreen-test.html
new file mode 100644
index 000000000..1adbbd12f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/buffer-offscreen-test.html
@@ -0,0 +1,101 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL required buffer clear behaviour test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+<style type="text/css">
+body {
+ height: 3000px;
+}
+</style>
+</head>
+<body>
+<div id="description"></div>
+<canvas width="20" height="20" style="border: 1px solid blue;" id="c"></canvas>
+<div id="console"></div>
+<script>
+description("This test ensures WebGL implementations correctly clear " +
+ "the drawing buffer on composite if preserveDrawingBuffer is false.");
+debug("");
+
+var wtu = WebGLTestUtils;
+var gl1 = wtu.create3DContext("c");
+var gl2 = wtu.create3DContext();
+shouldBeTrue("gl1 != null");
+shouldBeTrue("gl2 != null");
+
+shouldBeTrue('gl1.getContextAttributes().preserveDrawingBuffer == false');
+shouldBeTrue('gl2.getContextAttributes().preserveDrawingBuffer == false');
+
+function init(gl) {
+ gl.clearColor(1, 0, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);
+
+ // enable scissor here, before compositing, to make sure it's correctly
+ // ignored and restored
+ gl.scissor(0, 10, 10, 10);
+ gl.enable(gl.SCISSOR_TEST);
+}
+
+init(gl1);
+init(gl2);
+
+wtu.waitForComposite(function() {
+ function clear(gl) {
+ // scissor was set earlier
+ gl.clearColor(0, 0, 1, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ }
+ clear(gl1);
+ clear(gl2);
+
+ debug("check on screen canvas");
+ wtu.checkCanvasRect(gl1, 0, 10, 10, 10, [0, 0, 255, 255],
+ "cleared corner should be blue, stencil should be preserved");
+ wtu.checkCanvasRect(gl1, 0, 0, 10, 10, [0, 0, 0, 0],
+ "remainder of buffer should be cleared");
+ debug("check off screen canvas");
+ wtu.checkCanvasRect(gl2, 0, 10, 10, 10, [0, 0, 255, 255],
+ "cleared corner should be blue, stencil should be preserved");
+ wtu.checkCanvasRect(gl2, 0, 0, 10, 10, [255, 0, 0, 255],
+ "remainder of buffer should be un-cleared red");
+
+ finishTest();
+});
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/buffer-preserve-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/buffer-preserve-test.html
new file mode 100644
index 000000000..4e232838e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/buffer-preserve-test.html
@@ -0,0 +1,89 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL required buffer clear behaviour test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+<style type="text/css">
+body {
+ height: 3000px;
+}
+</style>
+</head>
+<body>
+<!-- Important to put the canvas at the top so that it's always visible even in the test suite runner.
+ Otherwise it just doesn't get composited in Firefox. -->
+<canvas width="20" height="20" style="border: 1px solid blue;" id="c"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script type="text/javascript">
+"use strict";
+
+description("This test ensures WebGL implementations correctly clear the drawing buffer " +
+ "on composite if preserveDrawingBuffer is false.");
+debug("");
+
+var wtu = WebGLTestUtils;
+
+var gl = wtu.create3DContext("c");
+shouldBeTrue("gl != null");
+shouldBeTrue('gl.getContextAttributes().preserveDrawingBuffer == false');
+
+gl.clearColor(1, 0, 0, 1);
+gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);
+
+// enable scissor here, before compositing, to make sure it's correctly
+// ignored and restored
+gl.scissor(0, 10, 10, 10);
+gl.enable(gl.SCISSOR_TEST);
+
+function clear() {
+ // scissor was set earlier
+ gl.clearColor(0, 0, 1, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ wtu.checkCanvasRect(gl, 0, 10, 10, 10, [0, 0, 255, 255],
+ "cleared corner should be blue, stencil should be preserved");
+ wtu.checkCanvasRect(gl, 0, 0, 10, 10, [0, 0, 0, 0],
+ "remainder of buffer should be cleared");
+
+ finishTest();
+ return;
+}
+
+wtu.waitForComposite(clear);
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/canvas-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/canvas-test.html
new file mode 100644
index 000000000..8d0edc032
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/canvas-test.html
@@ -0,0 +1,214 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Canvas Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<canvas id="canvas2d" width="40" height="40"> </canvas>
+<script>
+"use strict";
+
+description("This test ensures WebGL implementations interact correctly with the canvas tag.");
+
+debug("");
+debug("Canvas.getContext");
+
+var err;
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var canvas2d = document.getElementById("canvas2d");
+var ctx2d = canvas2d.getContext("2d");
+var gl = wtu.create3DContext(canvas);
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking canvas and WebGL interaction");
+
+ // Check that a canvas with no width or height is 300x150 pixels
+ shouldBe('canvas.width', '300');
+ shouldBe('canvas.height', '150');
+
+ // Check get a 4 value gl parameter as a csv string.
+ var getValue4v = function(name) {
+ var v = gl.getParameter(name);
+ var result = '' +
+ v[0] + ',' +
+ v[1] + ',' +
+ v[2] + ',' +
+ v[3];
+ return result;
+ }
+
+ var getViewport = function() {
+ return getValue4v(gl.VIEWPORT);
+ }
+
+ var getClearColor = function() {
+ return getValue4v(gl.COLOR_CLEAR_VALUE);
+ }
+
+ var isAboutEqual = function(a, b) {
+ return Math.abs(a - b) < 0.01;
+ }
+
+ var isAboutEqualInt = function(a, b) {
+ return Math.abs(a - b) < 3;
+ }
+
+ var checkCanvasContentIs = function(r3d,g3d,b3d,a3d) {
+ var r2d;
+ var g2d;
+ var b2d;
+ var a2d;
+
+ var checkPixel = function(x, y, r3d,g3d,b3d,a3d) {
+ var offset = (y * 40 + x) * 4;
+ r2d = imgData.data[offset];
+ g2d = imgData.data[offset + 1];
+ b2d = imgData.data[offset + 2];
+ a2d = imgData.data[offset + 3];
+ //debug('' + x + ', ' + y + "(" + offset + ") = " + r2d + ", " + g2d + ", " + b2d + ", " + a2d);
+ return isAboutEqualInt(r2d, r3d) &&
+ isAboutEqualInt(g2d, g3d) &&
+ isAboutEqualInt(b2d, b3d) &&
+ isAboutEqualInt(a2d, a3d);
+ }
+
+ var checkPixels = function(r3d,g3d,b3d,a3d) {
+ return checkPixel(0, 0, r3d, g3d, b3d, a3d) &&
+ checkPixel(0, 39, r3d, g3d, b3d, a3d) &&
+ checkPixel(39, 0, r3d, g3d, b3d, a3d) &&
+ checkPixel(39, 39, r3d, g3d, b3d, a3d) &&
+ checkPixel(0, 0, r3d, g3d, b3d, a3d);
+ };
+
+ // Set to just take the color from the 3d canvas
+ ctx2d.globalCompositeOperation = 'copy';
+
+ // fill 2d canvas with orange
+ ctx2d.fillStyle = "rgb(255,192,128)";
+ ctx2d.fillRect (0, 0, 40, 40);
+
+ // get the image data
+ var imgData = ctx2d.getImageData(0, 0, 40, 40);
+
+ // check it got cleared.
+ if (!checkPixels(255, 192, 128, 255)) {
+ testFailed("unable to fill 2d context.");
+ return;
+ }
+
+ // draw 3d canvas on top.
+ ctx2d.drawImage(canvas, 0,0, 40, 40);
+
+ // get the image data
+ var imgData = ctx2d.getImageData(0, 0, 40, 40);
+
+ // Check it's the expected color.
+ if (!checkPixels(r3d, g3d, b3d, a3d)) {
+ testFailed("pixels are " + r2d + "," + g2d + "," + b2d + "," + a2d +
+ " expected " + r3d + "," + g3d + "," + b3d + "," + a3d);
+ } else {
+ testPassed("pixels are " + r3d + "," + g3d + "," + b3d + "," + a3d);
+ }
+ }
+
+ checkCanvasContentIs(0, 0, 0, 0);
+ shouldBe('getViewport()', '"0,0,300,150"');
+
+ // Change the display size of the canvas and check
+ // the viewport size does not change.
+ debug("");
+ debug("change display size of canvas and see that viewport does not change");
+ canvas.style.width = "100px";
+ canvas.style.height = "25px";
+ var intervalId;
+ intervalId = window.setInterval(function() {
+ if (canvas.clientWidth == 100 &&
+ canvas.clientHeight == 25) {
+ window.clearInterval(intervalId);
+ shouldBe('getViewport()', '"0,0,300,150"');
+ shouldBe('canvas.width', '300');
+ shouldBe('canvas.height', '150');
+
+ // Change the actual size of the canvas
+ // Check that the viewport does not change.
+ // Check that the clear color does not change.
+ // Check that the color mask does not change.
+ debug("");
+ debug("change the actual size of the canvas and see that the viewport does not change");
+ gl.clearColor(0.25, 0.5, 0.75, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ checkCanvasContentIs(64, 128, 192, 255);
+ gl.colorMask(0,0,0,0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "No GL errors before resizing the canvas");
+ canvas.width = 400;
+ canvas.height = 10;
+ err = gl.getError();
+ // Some implementations might lost the context when resizing
+ if (err != gl.CONTEXT_LOST_WEBGL) {
+ shouldBe("err", "gl.NO_ERROR");
+ var v = gl.getParameter(gl.COLOR_CLEAR_VALUE);
+ assertMsg(isAboutEqual(v[0], 0.25) &&
+ isAboutEqual(v[1], 0.5) &&
+ isAboutEqual(v[2], 0.75) &&
+ isAboutEqual(v[3], 1),
+ "gl.clearColor should not change after canvas resize");
+ v = gl.getParameter(gl.COLOR_WRITEMASK);
+ assertMsg(isAboutEqual(v[0], 0) &&
+ isAboutEqual(v[1], 0) &&
+ isAboutEqual(v[2], 0) &&
+ isAboutEqual(v[3], 0),
+ "gl.colorMask should not change after canvas resize");
+ shouldBe('getViewport()', '"0,0,300,150"');
+ checkCanvasContentIs(0, 0, 0, 0);
+ }
+
+ debug("");
+ finishTest();
+ }
+ }, 1000/30);
+}
+</script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/canvas-zero-size.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/canvas-zero-size.html
new file mode 100644
index 000000000..6fe2616f7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/canvas-zero-size.html
@@ -0,0 +1,66 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Zero Size Canvas Test</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("Tests that a zero size canvas does not fail.");
+var wtu = WebGLTestUtils;
+var canvas = document.createElement('canvas');
+var gl = wtu.create3DContext(canvas);
+canvas.width = 0;
+canvas.height = 0;
+gl.viewport(0, 0, 0, 0);
+var program = wtu.setupTexturedQuad(gl);
+shouldBeTrue("program != null");
+var tex = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex);
+var pixel = new Uint8Array([0, 255, 0, 255]);
+gl.texImage2D(
+ gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixel);
+wtu.clearAndDrawUnitQuad(gl);
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html
new file mode 100644
index 000000000..8f47ba257
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html
@@ -0,0 +1,98 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Canvas Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas2d_0" width="128" height="128"> </canvas>
+<canvas id="canvas2d_1" width="400" height="400"> </canvas>
+<canvas id="canvas2d_2" width="128" height="128"> </canvas>
+<canvas id="webgl" width="400" height="400"> </canvas>
+<script>
+"use strict";
+
+description("This test ensures WebGL implementations interact correctly with the canvas 2D drawImage call when drawing the same content.");
+
+var err;
+var wtu = WebGLTestUtils;
+
+var canvas2d = [];
+var ctx2d = [];
+for (var i = 0; i < 3; i ++) {
+ canvas2d[i] = document.getElementById("canvas2d_" + i);
+ ctx2d[i] = canvas2d[i].getContext("2d");
+}
+
+var canvas = document.getElementById("webgl");
+var gl = wtu.create3DContext(canvas);
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("Checking drawing the same WebGL content to HW accelerated canvas and SW Canvases");
+ debug("");
+ var color = [[0.25, 0.5, 0.75, 1], [1, 0, 0, 1], [1, 0, 1, 1]];
+ var colorValue = [[64, 128, 192, 255], [255, 0, 0, 255], [255, 0, 255, 255]];
+ for (var count = 0; count < 10; count ++) {
+ for (var i = 0; i < 3; i++) {
+ gl.clearColor(color[i][0], color[i][1], color[i][2], color[i][3]);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ ctx2d[0].drawImage(canvas, 0, 0, canvas2d[0].width, canvas2d[0].height);
+ ctx2d[1].drawImage(canvas, 0, 0, canvas2d[1].width, canvas2d[1].height);
+ ctx2d[2].drawImage(canvas, 0, 0, canvas2d[2].width, canvas2d[2].height);
+ wtu.checkCanvasRect(ctx2d[0], 0, 0, canvas2d[0].width, canvas2d[0].height, colorValue[i],
+ "drawImage: Should be (" + colorValue[i][0] + "," + colorValue[i][1] +
+ "," + colorValue[i][2] + "," + colorValue[i][3] + ").", 2);
+ wtu.checkCanvasRect(ctx2d[1], 0, 0, canvas2d[1].width, canvas2d[1].height, colorValue[i],
+ "drawImage: Should be (" + colorValue[i][0] + "," + colorValue[i][1] +
+ "," + colorValue[i][2] + "," + colorValue[i][3] + ").", 2);
+ wtu.checkCanvasRect(ctx2d[2], 0, 0, canvas2d[2].width, canvas2d[2].height, colorValue[i],
+ "drawImage: Should be (" + colorValue[i][0] + "," + colorValue[i][1] +
+ "," + colorValue[i][2] + "," + colorValue[i][3] + ").", 2);
+ }
+ }
+
+ err = gl.getError();
+ debug("");
+ finishTest();
+}
+</script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/draw-webgl-to-canvas-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/draw-webgl-to-canvas-test.html
new file mode 100644
index 000000000..9f293adc4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/draw-webgl-to-canvas-test.html
@@ -0,0 +1,101 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Canvas Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas2d_0" width="400" height="400"> </canvas>
+<canvas id="canvas2d_1" width="400" height="400"> </canvas>
+<canvas id="canvas2d_2" width="400" height="400"> </canvas>
+<canvas id="webgl" width="400" height="400"> </canvas>
+<script>
+"use strict";
+
+description("This test ensures WebGL implementations interact correctly with the canvas 2D drawImage call.");
+
+var err;
+var wtu = WebGLTestUtils;
+
+var canvas2d = [];
+var ctx2d = [];
+for (var i = 0; i < 3; i ++) {
+ canvas2d[i] = document.getElementById("canvas2d_" + i);
+ ctx2d[i] = canvas2d[i].getContext("2d");
+}
+
+var canvas = document.getElementById("webgl");
+var gl = wtu.create3DContext(canvas);
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking canvas and WebGL drawImage interaction");
+ for (var count = 0; count < 10; count ++) {
+ gl.clearColor(0.25, 0.5, 0.75, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ ctx2d[0].drawImage(canvas, 0, 0, canvas2d[0].width, canvas2d[0].height);
+
+ gl.clearColor(1, 0, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ ctx2d[1].drawImage(canvas, 0, 0, canvas2d[1].width, canvas2d[1].height);
+
+ gl.clearColor(1, 0, 1, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ ctx2d[2].drawImage(canvas, 0, 0, canvas2d[2].width, canvas2d[2].height);
+
+ gl.clearColor(1, 1, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ wtu.checkCanvasRect(ctx2d[0], 0, 0, canvas2d[0].width, canvas2d[0].height, [64, 128, 192, 255],
+ "drawImage: Should be [64, 128, 192, 255]", 2);
+ wtu.checkCanvasRect(ctx2d[1], 0, 0, canvas2d[1].width, canvas2d[1].height, [255, 0, 0, 255],
+ "drawImage: Should be [255, 0, 0, 255]", 2);
+ wtu.checkCanvasRect(ctx2d[2], 0, 0, canvas2d[2].width, canvas2d[2].height, [255, 0, 255, 255],
+ "drawImage: Should be [255, 0, 255, 255]", 2);
+ }
+
+ err = gl.getError();
+ debug("");
+ finishTest();
+}
+</script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html
new file mode 100644
index 000000000..3852ad047
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html
@@ -0,0 +1,227 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL DrawingBuffer dimensions on HD-DPI machines test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshaderGrid" type="x-shader/x-vertex">
+attribute vec4 a_position;
+void main()
+{
+ gl_Position = a_position;
+}
+</script>
+
+<script id="fshaderGrid" type="x-shader/x-fragment">
+precision mediump float;
+void main()
+{
+ float r = mod(gl_FragCoord.x, 2.0) < 1.0 ? 0.0 : 1.0;
+ float g = mod(gl_FragCoord.y, 2.0) < 1.0 ? 0.0 : 1.0;
+ gl_FragColor = vec4(r, g, 0, 1);
+}
+</script>
+<script>
+"use strict";
+description();
+debug("");
+
+var gl;
+var canvas;
+
+function checkDimensions() {
+ // We expect that for the sizes being testing drawingBufferWidth and drawingBufferHeight
+ // will match canvas.width and canvas.height.
+
+ // We need to test that devicePixelRatio does not effect the backbuffer size of a canvas.
+ shouldBe('gl.drawingBufferWidth', 'canvas.width');
+ shouldBe('gl.drawingBufferHeight', 'canvas.height');
+}
+
+// This uses gl_FragCoord to draw a device pixel relavent pattern.
+// If drawBufferWidth or drawBufferHeight are not in device pixels
+// this test should fail.
+function checkGrid(gl, width, height) {
+ var program = wtu.setupProgram(gl, ["vshaderGrid", "fshaderGrid"], ["a_position"]);
+ wtu.setupUnitQuad(gl);
+ gl.useProgram(program);
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+
+ wtu.clearAndDrawUnitQuad(gl);
+
+ var pixels = new Uint8Array(width * height * 4);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
+
+ var colors = [
+ [ { color: [0, 0, 0, 255], name: "black" }, { color: [255, 0, 0, 255], name: "red" } ],
+ [ { color: [0, 255, 0, 255], name: "green" }, { color: [255, 255, 0, 255], name: "yellow" } ],
+ ];
+
+ for (var yy = 0; yy < height; ++yy) {
+ for (var xx = 0; xx < width; ++xx) {
+ var info = colors[yy % 2][xx % 2];
+ var color = info.color;
+ var offset = (yy * width + xx) * 4;
+ for (var jj = 0; jj < 4; ++jj) {
+ if (pixels[offset + jj] != color[jj]) {
+ var actual = [pixels[offset], pixels[offset + 1], pixels[offset + 2], pixels[offset + 3]];
+ testFailed("at " + xx + ", " + yy + " expected " + color + "(" + info.name + ") was " + actual);
+ return;
+ }
+ }
+ }
+ }
+ testPassed("grid rendered correctly");
+}
+
+// This passes device coordinate vertices in to make sure gl.viewport is not being mucked with.
+function checkQuad(gl, width, height) {
+ var deviceToClipSpace = function(value, range) {
+ return value / range * 2 - 1;
+ }
+
+ var program = wtu.setupColorQuad(gl);
+
+ // draw a small green square in the top right corner.
+ var deviceX1 = width - 4;
+ var deviceX2 = width;
+ var deviceY1 = height - 4;
+ var deviceY2 = height;
+
+ var clipX1 = deviceToClipSpace(deviceX1, width);
+ var clipX2 = deviceToClipSpace(deviceX2, width);
+ var clipY1 = deviceToClipSpace(deviceY1, height);
+ var clipY2 = deviceToClipSpace(deviceY2, height);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(
+ gl.ARRAY_BUFFER,
+ new Float32Array(
+ [ clipX2, clipY2,
+ clipX1, clipY2,
+ clipX1, clipY1,
+ clipX2, clipY2,
+ clipX1, clipY1,
+ clipX2, clipY1]),
+ gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+
+ var green = [0, 255, 0, 255];
+ var black = [0, 0, 0, 0];
+ gl.clearColor(0, 0, 0, 0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.drawUByteColorQuad(gl, [0, 255, 0, 255]);
+
+ var squareWidth = deviceX2 - deviceX1;
+ var squareHeight = deviceY2 - deviceY1;
+
+ // check the square.
+ wtu.checkCanvasRect(gl, deviceX1, deviceY1, squareWidth, squareHeight, green, "should be green");
+ // check outside the square.
+ wtu.checkCanvasRect(gl, 0, 0, width, height - squareHeight, black, "should be black");
+ wtu.checkCanvasRect(gl, 0, height - squareHeight, width - squareWidth, squareHeight, black, "should be black");
+}
+
+
+function test(desiredWidth, desiredHeight) {
+ debug("");
+ debug("testing canvas width = " + desiredWidth + ", height = " + desiredHeight);
+
+ // Make a fresh canvas.
+ canvas = document.createElement("canvas");
+ canvas.width = desiredWidth;
+ canvas.height = desiredHeight;
+
+ // This 'gl' must be global for shouldBe to work.
+ gl = wtu.create3DContext(canvas, {antialias: false});
+ if (!gl) {
+ testFailed("context does not exist");
+ } else {
+ testPassed("context exists");
+
+ // Check the dimensions are correct.
+ checkDimensions();
+
+ // Draw a pixel grid using a shader that draws in device coordinates
+ checkGrid(gl, desiredWidth, desiredHeight);
+
+ // Draw a quad in the top right corner.
+ checkQuad(gl, desiredWidth, desiredHeight);
+
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+
+ debug("");
+ debug("testing resizing canvas to width = " + desiredWidth + ", height = " + desiredHeight);
+
+ var oldViewport = gl.getParameter(gl.VIEWPORT);
+
+ // flip width and height
+ canvas.width = desiredHeight;
+ canvas.height = desiredWidth;
+
+ // fix the viewport
+ gl.viewport(0, 0, desiredHeight, desiredWidth);
+
+ // Check the dimensions are correct.
+ checkDimensions();
+
+ // Draw a pixel grid using a shader that draws in device coordinates
+ checkGrid(gl, desiredHeight, desiredWidth);
+
+ // Draw a quad in the top right corner.
+ checkQuad(gl, desiredHeight, desiredWidth);
+
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+ }
+}
+
+var wtu = WebGLTestUtils;
+
+// test a few sizes
+test(32, 16);
+test(128, 64);
+test(256, 512);
+
+debug("")
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html
new file mode 100644
index 000000000..2c3b6001d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html
@@ -0,0 +1,139 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Canvas Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="50" height="50"> </canvas>
+
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+void main()
+{
+ gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+}
+</script>
+
+<script>
+"use strict";
+
+function drawTriangleTest(gl)
+{
+ var width = 50;
+ var height = 50;
+ gl.viewport(0, 0, width, height);
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+
+ // Test several locations
+ wtu.checkCanvasRect(gl, 0, 0, width, 1, [0, 0, 0, 255],
+ 'First line should be all black');
+ wtu.checkCanvasRect(gl, 20, 15, 10, 1, [255, 0, 0, 255],
+ 'Line 15 should be red for at least 10 red pixels starting 20 pixels in');
+ wtu.checkCanvasRect(gl, 0, height - 1, width, 1, [0, 0, 0, 255],
+ 'Last line should be all black');
+}
+
+description("This test ensures WebGL implementations correctly implement drawingbufferWidth/Height with compositing.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var err;
+var maxSize;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+ shouldBeNonNull("program");
+ gl.enable(gl.DEPTH_TEST);
+ gl.clearColor(0, 0, 0, 1);
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+
+ debug("");
+ debug("Checking drawingBufferWidth/drawingBufferHeight");
+
+ shouldBe('gl.drawingBufferWidth', 'gl.canvas.width');
+ shouldBe('gl.drawingBufferHeight', 'gl.canvas.height');
+
+ // Check that changing the canvas size to something too large falls back to reasonable values.
+ maxSize = gl.getParameter(gl.MAX_VIEWPORT_DIMS);
+ shouldBeTrue('maxSize[0] > 0');
+ shouldBeTrue('maxSize[1] > 0');
+
+ // debug("MAX_VIEWPORT_DIMS = " + maxSize[0] + "x" + maxSize[1]);
+ gl.canvas.width = maxSize[0] * 4;
+ gl.canvas.height = maxSize[1] * 4;
+ shouldBeTrue('gl.drawingBufferWidth > 0');
+ shouldBeTrue('gl.drawingBufferHeight > 0');
+ shouldBeTrue('gl.drawingBufferWidth <= maxSize[0]');
+ shouldBeTrue('gl.drawingBufferHeight <= maxSize[1]');
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+
+ debug("");
+ debug("Checking scaling up then back down to 50/50, drawing still works.");
+ gl.canvas.width = 50;
+ gl.canvas.height = 50;
+ shouldBeTrue('gl.drawingBufferWidth == 50');
+ shouldBeTrue('gl.drawingBufferHeight == 50');
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+ drawTriangleTest(gl);
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+}
+debug("")
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html
new file mode 100644
index 000000000..6ec13a58a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html
@@ -0,0 +1,140 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Canvas.drawingBufferWidth,drawingBufferHeight Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description();
+debug("");
+
+var gl;
+var oldViewport;
+
+function getMaxViewportDimensions() {
+ // create a fresh canvas. This canvas will be discarded
+ // after exiting this function.
+ var canvas = document.createElement("canvas");
+ gl = wtu.create3DContext(canvas, {antialias: false});
+ if (!gl) {
+ testFailed("context does not exist");
+ return [0, 0];
+ } else {
+ testPassed("context exists");
+
+ // For a default size canvas these should be equal.
+ // WebGL contexts are not allowed to change the size of the drawingBuffer
+ // for things like hi-res displays.
+ shouldBe('gl.drawingBufferWidth', 'gl.canvas.width');
+ shouldBe('gl.drawingBufferHeight', 'gl.canvas.height');
+ return gl.getParameter(gl.MAX_VIEWPORT_DIMS);
+ }
+}
+
+function test(desiredWidth, desiredHeight) {
+ debug("");
+ debug("testing canvas width = " + desiredWidth + ", height = " + desiredHeight);
+
+ // Make a fresh canvas.
+ var canvas = document.createElement("canvas");
+ canvas.width = desiredWidth;
+ canvas.height = desiredHeight;
+
+ // This 'gl' must be global for shouldBe to work.
+ gl = wtu.create3DContext(canvas, {antialias: false});
+ if (!gl) {
+ testFailed("context does not exist");
+ } else {
+ testPassed("context exists");
+
+ // Verify these stats didn't change since they come from a different
+ // context.
+ shouldBe('gl.getParameter(gl.MAX_VIEWPORT_DIMS)[0]', 'maxSize[0]');
+ shouldBe('gl.getParameter(gl.MAX_VIEWPORT_DIMS)[1]', 'maxSize[1]');
+
+ // check the initial viewport matches the drawingBufferWidth and drawingBufferHeight
+ shouldBe('gl.getParameter(gl.VIEWPORT)[0]', '0');
+ shouldBe('gl.getParameter(gl.VIEWPORT)[1]', '0');
+ shouldBe('gl.getParameter(gl.VIEWPORT)[2]', 'gl.drawingBufferWidth');
+ shouldBe('gl.getParameter(gl.VIEWPORT)[3]', 'gl.drawingBufferHeight');
+
+ debug("");
+ debug("testing resizing canvas to width = " + desiredWidth + ", height = " + desiredHeight);
+
+ oldViewport = gl.getParameter(gl.VIEWPORT);
+
+ // flip width and height
+ canvas.width = desiredHeight;
+ canvas.height = desiredWidth;
+
+ // Verify the viewport didn't change.
+ shouldBe('gl.getParameter(gl.VIEWPORT)[0]', 'oldViewport[0]');
+ shouldBe('gl.getParameter(gl.VIEWPORT)[1]', 'oldViewport[1]');
+ shouldBe('gl.getParameter(gl.VIEWPORT)[2]', 'oldViewport[2]');
+ shouldBe('gl.getParameter(gl.VIEWPORT)[3]', 'oldViewport[3]');
+
+ // fix the viewport
+// gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
+
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+ }
+}
+
+var wtu = WebGLTestUtils;
+var maxSize = getMaxViewportDimensions();
+debug("MAX_VIEWPORT_DIMS: " + maxSize[0] + ", " + maxSize[1]);
+
+shouldBeTrue('maxSize[0] > 0');
+shouldBeTrue('maxSize[1] > 0');
+
+// test a small size to make sure it works at all.
+test(16, 32);
+
+// Make a canvas slightly larger than the max size WebGL can handle.
+// From section 2.2 of the spec the WebGL implementation should allow this to work.
+
+// test a size larger than MAX_VIEWPORT_DIMS in both dimensions
+test(maxSize[0] + 32, 8);
+
+debug("")
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/framebuffer-bindings-unaffected-on-resize.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/framebuffer-bindings-unaffected-on-resize.html
new file mode 100644
index 000000000..2e0e6db56
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/framebuffer-bindings-unaffected-on-resize.html
@@ -0,0 +1,108 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Verifies that GL framebuffer bindings do not change when canvas is resized</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="4" height="4"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+enableJSTestPreVerboseLogging();
+description("Verifies that GL framebuffer bindings do not change when canvas is resized");
+
+var err;
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+var gl = wtu.create3DContext(canvas);
+var green = [0, 255, 0, 255];
+var blue = [0, 0, 255, 255];
+var fboSize = 2;
+shouldBeTrue("fboSize < canvas.width");
+var fbo = gl.createFramebuffer();
+gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+var fboTex = gl.createTexture();
+gl.activeTexture(gl.TEXTURE1);
+gl.bindTexture(gl.TEXTURE_2D, fboTex);
+gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, fboTex, 0);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, fboSize, fboSize, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+
+function checkFBO(color, msg) {
+ wtu.checkCanvasRect(gl, 0, 0, fboSize, fboSize, color, msg);
+ wtu.checkCanvasRect(gl, fboSize, fboSize, fboSize, fboSize, [0, 0, 0, 0], "area outside fbo should be transparent black");
+}
+
+// The FBO is 2x2 and it's bound so clearing should clear a 2x2 area
+// and calling read pixels should read the clear color in that 2x2 area
+// and 0,0,0,0 outside that area.
+//
+// If the FBO is no longer bound because of a WebGL implementation error
+// then likely the clear will clear the backbuffer and reading outside
+// the 2x2 area will not be 0,0,0,0
+
+function test() {
+ gl.clearColor(0, 0, 1, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ checkFBO(blue, "should be blue");
+ gl.clearColor(0, 1, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ checkFBO(green, "should be green");
+}
+
+debug("test before resizing canvas");
+test();
+debug("test after resizing canvas");
+canvas.width = 8;
+test();
+debug("test after resizing canvas and waiting for compositing");
+canvas.width = 16;
+wtu.waitForComposite(function() {
+ test();
+ finishTest();
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+});
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html
new file mode 100644
index 000000000..1faa73722
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html
@@ -0,0 +1,172 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Rapid Resizing Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 256px; height: 256px;"> </canvas>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec2 position;
+void main()
+{
+ gl_Position = vec4(position, 0.0, 1.0);
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+void main()
+{
+ gl_FragColor = vec4(0.0,1.0,0.0,1.0);
+}
+</script>
+<script>
+"use strict";
+
+description("Verifies that rapidly resizing the canvas works correctly.");
+
+debug("");
+debug("Regression test for Chromium <a href='http://crbug.com/299371'>Issue 299371</a>");
+debug("");
+
+var err;
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var largeSize = 256;
+var smallSize = 128;
+var currentSize = largeSize;
+canvas.width = largeSize;
+canvas.height = largeSize;
+var gl = wtu.create3DContext(canvas);
+var numFrames = 0;
+
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ gl.clearColor(0, 0, 0, 1);
+
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["position"]);
+ shouldBeNonNull("program");
+
+ // Prepare to draw quads
+ var quadSize = 0.1;
+
+ var vertexBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ // Lower left
+ -1, -1 + quadSize,
+ -1, -1,
+ -1 + quadSize, -1,
+ -1 + quadSize, -1 + quadSize,
+
+ // Lower right
+ 1 - quadSize, -1 + quadSize,
+ 1 - quadSize, -1,
+ 1, -1,
+ 1, -1 + quadSize,
+
+ // Upper right
+ 1 - quadSize, 1,
+ 1 - quadSize, 1 - quadSize,
+ 1, 1 - quadSize,
+ 1, 1,
+
+ // Upper left
+ -1, 1,
+ -1, 1 - quadSize,
+ -1 + quadSize, 1 - quadSize,
+ -1 + quadSize, 1
+ ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+
+ var indexBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array([
+ 0, 1, 2,
+ 0, 2, 3,
+
+ 4, 5, 6,
+ 4, 6, 7,
+
+ 8, 9, 10,
+ 8, 10, 11,
+
+ 12, 13, 14,
+ 12, 14, 15
+ ]), gl.STATIC_DRAW);
+
+ wtu.requestAnimFrame(render);
+}
+
+function render() {
+ if (++numFrames < 30) {
+ if (currentSize == largeSize) {
+ canvas.height = smallSize;
+ currentSize = smallSize;
+ } else {
+ canvas.height = largeSize;
+ currentSize = largeSize;
+ }
+ }
+
+ gl.viewport(0, 0, largeSize, currentSize);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.drawElements(gl.TRIANGLES, 24, gl.UNSIGNED_SHORT, 0);
+
+ // Check the four corners
+ var green = [ 0, 255, 0, 255 ];
+ var inset = 3;
+ wtu.checkCanvasRect(gl, inset, inset, 1, 1, green, "lower left should be green", 1);
+ wtu.checkCanvasRect(gl, largeSize - inset, inset, 1, 1, green, "lower right should be green", 1);
+ wtu.checkCanvasRect(gl, inset, currentSize - inset, 1, 1, green, "upper left should be green", 1);
+ wtu.checkCanvasRect(gl, largeSize - inset, currentSize - inset, 1, 1, green, "upper right should be green", 1);
+
+ if (numFrames < 60) {
+ wtu.requestAnimFrame(render);
+ } else {
+ finishTest();
+ }
+}
+
+</script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/texture-bindings-unaffected-on-resize.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/texture-bindings-unaffected-on-resize.html
new file mode 100644
index 000000000..b41cd1f42
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/texture-bindings-unaffected-on-resize.html
@@ -0,0 +1,89 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="4" height="4"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description('Verifies that GL texture bindings do not change when canvas is resized');
+
+var err;
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+var gl = wtu.create3DContext(canvas);
+var program = wtu.setupTexturedQuad(gl);
+
+var green = [0, 255, 0, 255];
+var blue = [0, 0, 255, 255];
+var tex0 = gl.createTexture();
+wtu.fillTexture(gl, tex0, 1, 1, blue, 0);
+gl.activeTexture(gl.TEXTURE1)
+var tex1 = gl.createTexture();
+wtu.fillTexture(gl, tex1, 1, 1, green, 0);
+
+var loc = gl.getUniformLocation(program, "tex");
+
+function test() {
+ gl.viewport(0, 0, canvas.width, canvas.height);
+ gl.uniform1i(loc, 0);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, blue, "should be blue");
+ gl.uniform1i(loc, 1);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, green, "should be green");
+}
+
+debug("test before resizing canvas");
+test();
+debug("test after resizing canvas");
+canvas.width = 8;
+test();
+debug("test after resizing canvas and waiting for compositing");
+canvas.width = 16;
+wtu.waitForComposite(function() {
+ test();
+ finishTest();
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+});
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html
new file mode 100644
index 000000000..7f83c7273
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html
@@ -0,0 +1,130 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL toDataURL test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas width="20" height="20" style="border: 1px solid black; width: 16px; height: 16px" id="c3d"></canvas>
+<canvas width="20" height="20" style="border: 1px solid black; width: 16px; height: 16px" id="c2d"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script type="text/javascript">
+var wtu = WebGLTestUtils;
+var numTests = 10;
+var gl;
+var ctx;
+
+var main = function() {
+ description();
+ ctx = document.getElementById("c2d").getContext("2d");
+ gl = wtu.create3DContext("c3d");
+
+ if (!gl) {
+ testFailed("can't create 3d context");
+ return;
+ }
+
+ var clearRect = function(gl, x, y, width, height, color) {
+ gl.clearColor(color[0] / 255, color[1] / 255, color[2] / 255, color[3] / 255);
+ gl.scissor(x, y, width, height);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ };
+
+ var testSize = function(gl, width, height, callback) {
+ debug("testing " + width + " by " + height);
+ gl.canvas.width = width;
+ gl.canvas.height = height;
+ gl.viewport(0, 0, width, height);
+ gl.enable(gl.SCISSOR_TEST);
+
+ var bottomColor = [255, 0, 0, 255];
+ var topColor = [0, 255, 0, 255];
+ var rightColor = [0, 0, 255, 255];
+ var halfHeight = Math.floor(height / 2);
+ var topHeight = height - halfHeight;
+ var canvasTopHeight = height - topHeight;
+ clearRect(gl, 0, 0, width, halfHeight, bottomColor);
+ clearRect(gl, 0, halfHeight, width, topHeight, topColor);
+ clearRect(gl, width - 1, 0, 1, height, rightColor);
+
+ // Performs gl.canvas.toDataURL() internally
+ var img = wtu.makeImageFromCanvas(gl.canvas, function() {
+ ctx.canvas.width = width;
+ ctx.canvas.height = height;
+ ctx.drawImage(img, 0, 0);
+ wtu.checkCanvasRect(ctx, 0, 0, width - 1, topHeight, topColor);
+ wtu.checkCanvasRect(ctx, 0, topHeight, width - 1, halfHeight, bottomColor);
+ wtu.checkCanvasRect(ctx, width - 1, 0, 1, height, rightColor);
+ debug("");
+ callback();
+ });
+ };
+
+ var tests = [
+ { width: 16 , height: 16 , },
+ { width: 16 - 1, height: 16 , },
+ { width: 16 - 1, height: 16 - 1, },
+ { width: 16 + 1, height: 16 - 1, },
+ { width: 16 - 1, height: 16 + 1, },
+ { width: 256 , height: 256 , },
+ { width: 256 - 1, height: 256 , },
+ { width: 256 - 1, height: 256 - 1, },
+ { width: 256 + 1, height: 256 - 1, },
+ { width: 256 - 1, height: 256 + 1, },
+ { width: 512 , height: 512 , },
+ { width: 512 - 1, height: 512 , },
+ { width: 512 - 1, height: 512 - 1, },
+ { width: 512 + 1, height: 512 - 1, },
+ { width: 512 - 1, height: 512 + 1, },
+ ];
+ var testIndex = 0;
+ var runNextTest = function() {
+ if (testIndex == tests.length) {
+ finishTest();
+ return;
+ }
+ var test = tests[testIndex++];
+ testSize(gl, test.width, test.height, function() {
+ setTimeout(runNextTest, 0);
+ })
+ };
+ runNextTest();
+};
+main();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/viewport-unchanged-upon-resize.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/viewport-unchanged-upon-resize.html
new file mode 100644
index 000000000..5c7658aca
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/canvas/viewport-unchanged-upon-resize.html
@@ -0,0 +1,115 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec3 g_Position;
+
+void main()
+{
+ gl_Position = vec4(g_Position.x, g_Position.y, g_Position.z, 1.0);
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+void main()
+{
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+</head>
+<body>
+<canvas id="example" width="4" height="4"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description('Verifies that GL viewport does not change when canvas is resized');
+
+var err;
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["g_Position"]);
+
+var vertices = new Float32Array([
+ 1.0, 1.0, 0.0,
+ -1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, -1.0, 0.0]);
+var vbo = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
+
+gl.enableVertexAttribArray(0);
+gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+// Clear and set up
+gl.clearColor(0, 0, 1, 1);
+gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+gl.useProgram(program);
+// Draw the triangle pair to the frame buffer
+gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+// Ensure that the frame buffer is red at the sampled pixel
+wtu.checkCanvasRect(gl, 2, 2, 1, 1, [255, 0, 0, 255]);
+
+// Now resize the canvas
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "No GL errors before resizing the canvas");
+var canvas = gl.canvas;
+canvas.width = 8;
+canvas.height = 8;
+err = gl.getError();
+// Some implementations might lost the context when resizing
+if (err == gl.CONTEXT_LOST_WEBGL) {
+ testPassed("canvas lost context on resize");
+} else {
+ shouldBe("err", "gl.NO_ERROR");
+ // Do another render
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ // This time, because we did not change the viewport, it should
+ // still be (0, 0, 4, 4), so only the lower-left quadrant should
+ // have been filled.
+ wtu.checkCanvasRect(gl, 6, 6, 1, 1, [0, 0, 255, 255]);
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/00_test_list.txt
new file mode 100644
index 000000000..460c1c8b4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/00_test_list.txt
@@ -0,0 +1,17 @@
+--max-version 1.9.9 constants-and-properties.html
+--min-version 1.0.2 context-attribute-preserve-drawing-buffer.html
+context-attributes-alpha-depth-stencil-antialias.html
+--min-version 1.0.2 --slow context-creation-and-destruction.html
+--min-version 1.0.3 --slow context-creation.html
+--min-version 1.0.3 --slow context-eviction-with-garbage-collection.html
+--min-version 1.0.3 context-hidden-alpha.html
+--min-version 1.0.2 context-release-upon-reload.html
+--min-version 1.0.2 context-release-with-workers.html
+context-lost-restored.html
+context-lost.html
+--max-version 1.9.9 context-type-test.html
+incorrect-context-object-behaviour.html
+--max-version 1.9.9 methods.html
+premultiplyalpha-test.html
+resource-sharing-test.html
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html
new file mode 100644
index 000000000..df818c45e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html
@@ -0,0 +1,568 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Constants and Properties Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<script>
+"use strict";
+description("This test ensures that the WebGL context has all the constants and (non-function) properties in the specification.");
+
+var constants = {
+ /* ClearBufferMask */
+DEPTH_BUFFER_BIT : 0x00000100,
+STENCIL_BUFFER_BIT : 0x00000400,
+COLOR_BUFFER_BIT : 0x00004000,
+
+ /* BeginMode */
+POINTS : 0x0000,
+LINES : 0x0001,
+LINE_LOOP : 0x0002,
+LINE_STRIP : 0x0003,
+TRIANGLES : 0x0004,
+TRIANGLE_STRIP : 0x0005,
+TRIANGLE_FAN : 0x0006,
+
+ /* AlphaFunction (not supported in ES20) */
+ /* NEVER */
+ /* LESS */
+ /* EQUAL */
+ /* LEQUAL */
+ /* GREATER */
+ /* NOTEQUAL */
+ /* GEQUAL */
+ /* ALWAYS */
+
+ /* BlendingFactorDest */
+ZERO : 0,
+ONE : 1,
+SRC_COLOR : 0x0300,
+ONE_MINUS_SRC_COLOR : 0x0301,
+SRC_ALPHA : 0x0302,
+ONE_MINUS_SRC_ALPHA : 0x0303,
+DST_ALPHA : 0x0304,
+ONE_MINUS_DST_ALPHA : 0x0305,
+
+ /* BlendingFactorSrc */
+ /* ZERO */
+ /* ONE */
+DST_COLOR : 0x0306,
+ONE_MINUS_DST_COLOR : 0x0307,
+SRC_ALPHA_SATURATE : 0x0308,
+ /* SRC_ALPHA */
+ /* ONE_MINUS_SRC_ALPHA */
+ /* DST_ALPHA */
+ /* ONE_MINUS_DST_ALPHA */
+
+ /* BlendEquationSeparate */
+FUNC_ADD : 0x8006,
+BLEND_EQUATION : 0x8009,
+BLEND_EQUATION_RGB : 0x8009, /* same as BLEND_EQUATION */
+BLEND_EQUATION_ALPHA : 0x883D,
+
+ /* BlendSubtract */
+FUNC_SUBTRACT : 0x800A,
+FUNC_REVERSE_SUBTRACT : 0x800B,
+
+ /* Separate Blend Functions */
+BLEND_DST_RGB : 0x80C8,
+BLEND_SRC_RGB : 0x80C9,
+BLEND_DST_ALPHA : 0x80CA,
+BLEND_SRC_ALPHA : 0x80CB,
+CONSTANT_COLOR : 0x8001,
+ONE_MINUS_CONSTANT_COLOR : 0x8002,
+CONSTANT_ALPHA : 0x8003,
+ONE_MINUS_CONSTANT_ALPHA : 0x8004,
+BLEND_COLOR : 0x8005,
+
+ /* Buffer Objects */
+ARRAY_BUFFER : 0x8892,
+ELEMENT_ARRAY_BUFFER : 0x8893,
+ARRAY_BUFFER_BINDING : 0x8894,
+ELEMENT_ARRAY_BUFFER_BINDING : 0x8895,
+
+STREAM_DRAW : 0x88E0,
+STATIC_DRAW : 0x88E4,
+DYNAMIC_DRAW : 0x88E8,
+
+BUFFER_SIZE : 0x8764,
+BUFFER_USAGE : 0x8765,
+
+CURRENT_VERTEX_ATTRIB : 0x8626,
+
+ /* CullFaceMode */
+FRONT : 0x0404,
+BACK : 0x0405,
+FRONT_AND_BACK : 0x0408,
+
+ /* DepthFunction */
+ /* NEVER */
+ /* LESS */
+ /* EQUAL */
+ /* LEQUAL */
+ /* GREATER */
+ /* NOTEQUAL */
+ /* GEQUAL */
+ /* ALWAYS */
+
+ /* EnableCap */
+ /* TEXTURE_2D */
+CULL_FACE : 0x0B44,
+BLEND : 0x0BE2,
+DITHER : 0x0BD0,
+STENCIL_TEST : 0x0B90,
+DEPTH_TEST : 0x0B71,
+SCISSOR_TEST : 0x0C11,
+POLYGON_OFFSET_FILL : 0x8037,
+SAMPLE_ALPHA_TO_COVERAGE : 0x809E,
+SAMPLE_COVERAGE : 0x80A0,
+
+ /* ErrorCode */
+NO_ERROR : 0,
+INVALID_ENUM : 0x0500,
+INVALID_VALUE : 0x0501,
+INVALID_OPERATION : 0x0502,
+OUT_OF_MEMORY : 0x0505,
+
+ /* FrontFaceDirection */
+CW : 0x0900,
+CCW : 0x0901,
+
+ /* GetPName */
+LINE_WIDTH : 0x0B21,
+ALIASED_POINT_SIZE_RANGE : 0x846D,
+ALIASED_LINE_WIDTH_RANGE : 0x846E,
+CULL_FACE_MODE : 0x0B45,
+FRONT_FACE : 0x0B46,
+DEPTH_RANGE : 0x0B70,
+DEPTH_WRITEMASK : 0x0B72,
+DEPTH_CLEAR_VALUE : 0x0B73,
+DEPTH_FUNC : 0x0B74,
+STENCIL_CLEAR_VALUE : 0x0B91,
+STENCIL_FUNC : 0x0B92,
+STENCIL_FAIL : 0x0B94,
+STENCIL_PASS_DEPTH_FAIL : 0x0B95,
+STENCIL_PASS_DEPTH_PASS : 0x0B96,
+STENCIL_REF : 0x0B97,
+STENCIL_VALUE_MASK : 0x0B93,
+STENCIL_WRITEMASK : 0x0B98,
+STENCIL_BACK_FUNC : 0x8800,
+STENCIL_BACK_FAIL : 0x8801,
+STENCIL_BACK_PASS_DEPTH_FAIL : 0x8802,
+STENCIL_BACK_PASS_DEPTH_PASS : 0x8803,
+STENCIL_BACK_REF : 0x8CA3,
+STENCIL_BACK_VALUE_MASK : 0x8CA4,
+STENCIL_BACK_WRITEMASK : 0x8CA5,
+VIEWPORT : 0x0BA2,
+SCISSOR_BOX : 0x0C10,
+ /* SCISSOR_TEST */
+COLOR_CLEAR_VALUE : 0x0C22,
+COLOR_WRITEMASK : 0x0C23,
+UNPACK_ALIGNMENT : 0x0CF5,
+PACK_ALIGNMENT : 0x0D05,
+MAX_TEXTURE_SIZE : 0x0D33,
+MAX_VIEWPORT_DIMS : 0x0D3A,
+SUBPIXEL_BITS : 0x0D50,
+RED_BITS : 0x0D52,
+GREEN_BITS : 0x0D53,
+BLUE_BITS : 0x0D54,
+ALPHA_BITS : 0x0D55,
+DEPTH_BITS : 0x0D56,
+STENCIL_BITS : 0x0D57,
+POLYGON_OFFSET_UNITS : 0x2A00,
+ /* POLYGON_OFFSET_FILL */
+POLYGON_OFFSET_FACTOR : 0x8038,
+TEXTURE_BINDING_2D : 0x8069,
+SAMPLE_BUFFERS : 0x80A8,
+SAMPLES : 0x80A9,
+SAMPLE_COVERAGE_VALUE : 0x80AA,
+SAMPLE_COVERAGE_INVERT : 0x80AB,
+
+ /* GetTextureParameter */
+ /* TEXTURE_MAG_FILTER */
+ /* TEXTURE_MIN_FILTER */
+ /* TEXTURE_WRAP_S */
+ /* TEXTURE_WRAP_T */
+
+COMPRESSED_TEXTURE_FORMATS : 0x86A3,
+
+ /* HintMode */
+DONT_CARE : 0x1100,
+FASTEST : 0x1101,
+NICEST : 0x1102,
+
+ /* HintTarget */
+GENERATE_MIPMAP_HINT : 0x8192,
+
+ /* DataType */
+BYTE : 0x1400,
+UNSIGNED_BYTE : 0x1401,
+SHORT : 0x1402,
+UNSIGNED_SHORT : 0x1403,
+INT : 0x1404,
+UNSIGNED_INT : 0x1405,
+FLOAT : 0x1406,
+
+ /* PixelFormat */
+DEPTH_COMPONENT : 0x1902,
+ALPHA : 0x1906,
+RGB : 0x1907,
+RGBA : 0x1908,
+LUMINANCE : 0x1909,
+LUMINANCE_ALPHA : 0x190A,
+
+ /* PixelType */
+ /* UNSIGNED_BYTE */
+UNSIGNED_SHORT_4_4_4_4 : 0x8033,
+UNSIGNED_SHORT_5_5_5_1 : 0x8034,
+UNSIGNED_SHORT_5_6_5 : 0x8363,
+
+ /* Shaders */
+FRAGMENT_SHADER : 0x8B30,
+VERTEX_SHADER : 0x8B31,
+MAX_VERTEX_ATTRIBS : 0x8869,
+MAX_VERTEX_UNIFORM_VECTORS : 0x8DFB,
+MAX_VARYING_VECTORS : 0x8DFC,
+MAX_COMBINED_TEXTURE_IMAGE_UNITS : 0x8B4D,
+MAX_VERTEX_TEXTURE_IMAGE_UNITS : 0x8B4C,
+MAX_TEXTURE_IMAGE_UNITS : 0x8872,
+MAX_FRAGMENT_UNIFORM_VECTORS : 0x8DFD,
+SHADER_TYPE : 0x8B4F,
+DELETE_STATUS : 0x8B80,
+LINK_STATUS : 0x8B82,
+VALIDATE_STATUS : 0x8B83,
+ATTACHED_SHADERS : 0x8B85,
+ACTIVE_UNIFORMS : 0x8B86,
+ACTIVE_ATTRIBUTES : 0x8B89,
+SHADING_LANGUAGE_VERSION : 0x8B8C,
+CURRENT_PROGRAM : 0x8B8D,
+
+ /* StencilFunction */
+NEVER : 0x0200,
+LESS : 0x0201,
+EQUAL : 0x0202,
+LEQUAL : 0x0203,
+GREATER : 0x0204,
+NOTEQUAL : 0x0205,
+GEQUAL : 0x0206,
+ALWAYS : 0x0207,
+
+ /* StencilOp */
+ /* ZERO */
+KEEP : 0x1E00,
+REPLACE : 0x1E01,
+INCR : 0x1E02,
+DECR : 0x1E03,
+INVERT : 0x150A,
+INCR_WRAP : 0x8507,
+DECR_WRAP : 0x8508,
+
+ /* StringName */
+VENDOR : 0x1F00,
+RENDERER : 0x1F01,
+VERSION : 0x1F02,
+
+ /* TextureMagFilter */
+NEAREST : 0x2600,
+LINEAR : 0x2601,
+
+ /* TextureMinFilter */
+ /* NEAREST */
+ /* LINEAR */
+NEAREST_MIPMAP_NEAREST : 0x2700,
+LINEAR_MIPMAP_NEAREST : 0x2701,
+NEAREST_MIPMAP_LINEAR : 0x2702,
+LINEAR_MIPMAP_LINEAR : 0x2703,
+
+ /* TextureParameterName */
+TEXTURE_MAG_FILTER : 0x2800,
+TEXTURE_MIN_FILTER : 0x2801,
+TEXTURE_WRAP_S : 0x2802,
+TEXTURE_WRAP_T : 0x2803,
+
+ /* TextureTarget */
+TEXTURE_2D : 0x0DE1,
+TEXTURE : 0x1702,
+
+TEXTURE_CUBE_MAP : 0x8513,
+TEXTURE_BINDING_CUBE_MAP : 0x8514,
+TEXTURE_CUBE_MAP_POSITIVE_X : 0x8515,
+TEXTURE_CUBE_MAP_NEGATIVE_X : 0x8516,
+TEXTURE_CUBE_MAP_POSITIVE_Y : 0x8517,
+TEXTURE_CUBE_MAP_NEGATIVE_Y : 0x8518,
+TEXTURE_CUBE_MAP_POSITIVE_Z : 0x8519,
+TEXTURE_CUBE_MAP_NEGATIVE_Z : 0x851A,
+MAX_CUBE_MAP_TEXTURE_SIZE : 0x851C,
+
+ /* TextureUnit */
+TEXTURE0 : 0x84C0,
+TEXTURE1 : 0x84C1,
+TEXTURE2 : 0x84C2,
+TEXTURE3 : 0x84C3,
+TEXTURE4 : 0x84C4,
+TEXTURE5 : 0x84C5,
+TEXTURE6 : 0x84C6,
+TEXTURE7 : 0x84C7,
+TEXTURE8 : 0x84C8,
+TEXTURE9 : 0x84C9,
+TEXTURE10 : 0x84CA,
+TEXTURE11 : 0x84CB,
+TEXTURE12 : 0x84CC,
+TEXTURE13 : 0x84CD,
+TEXTURE14 : 0x84CE,
+TEXTURE15 : 0x84CF,
+TEXTURE16 : 0x84D0,
+TEXTURE17 : 0x84D1,
+TEXTURE18 : 0x84D2,
+TEXTURE19 : 0x84D3,
+TEXTURE20 : 0x84D4,
+TEXTURE21 : 0x84D5,
+TEXTURE22 : 0x84D6,
+TEXTURE23 : 0x84D7,
+TEXTURE24 : 0x84D8,
+TEXTURE25 : 0x84D9,
+TEXTURE26 : 0x84DA,
+TEXTURE27 : 0x84DB,
+TEXTURE28 : 0x84DC,
+TEXTURE29 : 0x84DD,
+TEXTURE30 : 0x84DE,
+TEXTURE31 : 0x84DF,
+ACTIVE_TEXTURE : 0x84E0,
+
+ /* TextureWrapMode */
+REPEAT : 0x2901,
+CLAMP_TO_EDGE : 0x812F,
+MIRRORED_REPEAT : 0x8370,
+
+ /* Uniform Types */
+FLOAT_VEC2 : 0x8B50,
+FLOAT_VEC3 : 0x8B51,
+FLOAT_VEC4 : 0x8B52,
+INT_VEC2 : 0x8B53,
+INT_VEC3 : 0x8B54,
+INT_VEC4 : 0x8B55,
+BOOL : 0x8B56,
+BOOL_VEC2 : 0x8B57,
+BOOL_VEC3 : 0x8B58,
+BOOL_VEC4 : 0x8B59,
+FLOAT_MAT2 : 0x8B5A,
+FLOAT_MAT3 : 0x8B5B,
+FLOAT_MAT4 : 0x8B5C,
+SAMPLER_2D : 0x8B5E,
+SAMPLER_CUBE : 0x8B60,
+
+ /* Vertex Arrays */
+VERTEX_ATTRIB_ARRAY_ENABLED : 0x8622,
+VERTEX_ATTRIB_ARRAY_SIZE : 0x8623,
+VERTEX_ATTRIB_ARRAY_STRIDE : 0x8624,
+VERTEX_ATTRIB_ARRAY_TYPE : 0x8625,
+VERTEX_ATTRIB_ARRAY_NORMALIZED : 0x886A,
+VERTEX_ATTRIB_ARRAY_POINTER : 0x8645,
+VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F,
+
+ /* Read Format */
+IMPLEMENTATION_COLOR_READ_TYPE : 0x8B9A,
+IMPLEMENTATION_COLOR_READ_FORMAT : 0x8B9B,
+
+ /* Shader Source */
+COMPILE_STATUS : 0x8B81,
+
+ /* Shader Precision-Specified Types */
+LOW_FLOAT : 0x8DF0,
+MEDIUM_FLOAT : 0x8DF1,
+HIGH_FLOAT : 0x8DF2,
+LOW_INT : 0x8DF3,
+MEDIUM_INT : 0x8DF4,
+HIGH_INT : 0x8DF5,
+
+ /* Framebuffer Object. */
+FRAMEBUFFER : 0x8D40,
+RENDERBUFFER : 0x8D41,
+
+RGBA4 : 0x8056,
+RGB5_A1 : 0x8057,
+RGB565 : 0x8D62,
+DEPTH_COMPONENT16 : 0x81A5,
+STENCIL_INDEX : 0x1901,
+STENCIL_INDEX8 : 0x8D48,
+DEPTH_STENCIL : 0x84F9,
+
+RENDERBUFFER_WIDTH : 0x8D42,
+RENDERBUFFER_HEIGHT : 0x8D43,
+RENDERBUFFER_INTERNAL_FORMAT : 0x8D44,
+RENDERBUFFER_RED_SIZE : 0x8D50,
+RENDERBUFFER_GREEN_SIZE : 0x8D51,
+RENDERBUFFER_BLUE_SIZE : 0x8D52,
+RENDERBUFFER_ALPHA_SIZE : 0x8D53,
+RENDERBUFFER_DEPTH_SIZE : 0x8D54,
+RENDERBUFFER_STENCIL_SIZE : 0x8D55,
+
+FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : 0x8CD0,
+FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : 0x8CD1,
+FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL : 0x8CD2,
+FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : 0x8CD3,
+
+COLOR_ATTACHMENT0 : 0x8CE0,
+DEPTH_ATTACHMENT : 0x8D00,
+STENCIL_ATTACHMENT : 0x8D20,
+DEPTH_STENCIL_ATTACHMENT : 0x821A,
+
+NONE : 0,
+
+FRAMEBUFFER_COMPLETE : 0x8CD5,
+FRAMEBUFFER_INCOMPLETE_ATTACHMENT : 0x8CD6,
+FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : 0x8CD7,
+FRAMEBUFFER_INCOMPLETE_DIMENSIONS : 0x8CD9,
+FRAMEBUFFER_UNSUPPORTED : 0x8CDD,
+
+FRAMEBUFFER_BINDING : 0x8CA6,
+RENDERBUFFER_BINDING : 0x8CA7,
+MAX_RENDERBUFFER_SIZE : 0x84E8,
+
+INVALID_FRAMEBUFFER_OPERATION : 0x0506,
+
+/* WebGL-specific enums */
+UNPACK_FLIP_Y_WEBGL : 0x9240,
+UNPACK_PREMULTIPLY_ALPHA_WEBGL : 0x9241,
+CONTEXT_LOST_WEBGL : 0x9242,
+UNPACK_COLORSPACE_CONVERSION_WEBGL : 0x9243,
+BROWSER_DEFAULT_WEBGL : 0x9244
+};
+
+// Other non-function properties on the WebGL object
+var otherProperties = {
+drawingBufferWidth : "number",
+drawingBufferHeight : "number",
+canvas : "implementation-dependent"
+};
+
+// Properties to be ignored (as a list of strings) because they were
+// added in versions of the spec that are backward-compatible with
+// this version
+var ignoredProperties = [
+];
+
+// Constants removed from the WebGL spec compared to ES 2.0
+var removedConstants = {
+NUM_COMPRESSED_TEXTURE_FORMATS : 0x86A2,
+FIXED : 0x140C,
+ACTIVE_UNIFORM_MAX_LENGTH : 0x8B87,
+ACTIVE_ATTRIBUTE_MAX_LENGTH : 0x8B8A,
+EXTENSIONS : 0x1F03,
+INFO_LOG_LENGTH : 0x8B84,
+SHADER_SOURCE_LENGTH : 0x8B88,
+SHADER_COMPILER : 0x8DFA,
+SHADER_BINARY_FORMATS : 0x8DF8,
+NUM_SHADER_BINARY_FORMATS : 0x8DF9,
+};
+
+function assertProperty(v, p) {
+ if (p in v) {
+ return true;
+ } else {
+ testFailed("Property does not exist: " + p)
+ return false;
+ }
+}
+
+function assertNoProperty(v, p) {
+ if (p in v) {
+ testFailed("Property is defined and should not be: " + p)
+ return false;
+ } else {
+ return true;
+ }
+}
+
+function assertMsg_(bool, msg) {
+ if (!bool) // show only failures to avoid spamming result list
+ assertMsg(bool, msg);
+ return bool;
+}
+
+debug("");
+debug("Canvas.getContext");
+
+var canvas = document.getElementById("canvas");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext(canvas);
+var passed = true;
+for (var i in constants) {
+ var r = assertProperty(gl, i) && assertMsg_(gl[i] == constants[i], "Property "+i+" value test "+gl[i]+" == "+constants[i]);
+ passed = passed && r;
+}
+if (passed) {
+ testPassed("All WebGL constants found to have correct values.");
+}
+passed = true;
+for (var i in removedConstants) {
+ var r = assertNoProperty(gl, i);
+ passed = passed && r;
+}
+if (passed) {
+ testPassed("All constants removed from WebGL spec were absent from WebGL context.");
+}
+var extended = false;
+for (var i in gl) {
+ if (constants[i] !== undefined) {
+ // OK; known constant
+ } else if (ignoredProperties.indexOf(i) != -1) {
+ // OK; constant that should be ignored because it was added in a later version of the spec
+ } else if (otherProperties[i] !== undefined &&
+ (otherProperties[i] == "implementation-dependent" || typeof gl[i] == otherProperties[i])) {
+ // OK; known property of known type
+ } else if (typeof gl[i] != "function") {
+ if (!extended) {
+ extended = true;
+ testFailed("Also found the following extra properties:");
+ }
+ testFailed(i);
+ }
+}
+
+if (!extended) {
+ testPassed("No extra properties found on WebGL context.");
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html
new file mode 100644
index 000000000..3b7b6f011
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html
@@ -0,0 +1,132 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"></script>
+ <style>
+ .pattern {
+ white-space: nowrap;
+ display: inline-block;
+ }
+ canvas {
+ width:50px;
+ height:50px;
+ }
+ .square {
+ display:inline-block;
+ width:50px;
+ height:50px;
+ background-color:red;
+ }
+ </style>
+ <script>
+ "use strict";
+ var wtu = WebGLTestUtils;
+ function checkResult(ctx1, ctx2, preserve) {
+ var imgData1 = ctx1.getImageData(0,0,1,1);
+ var imgData2 = ctx2.getImageData(0,0,1,1);
+ var correct1 = [255,0,0,255];
+ var correct2 = preserve ? [255,0,0,255] : [0,0,0,255];
+ var ok1 = true;
+ var ok2 = true;
+ for (var p = 0; p < 4; ++p) {
+ if (imgData1.data[p] != correct1[p])
+ ok1 = false;
+ if (imgData2.data[p] != correct2[p])
+ ok2 = false;
+ }
+ if (ok1 && ok2)
+ testPassed('Rendered ok with preserveDrawingBuffer ' + preserve +'.');
+ else
+ testFailed('Did not render ok with preserveDrawingBuffer ' + preserve + '.');
+ if (preserve) {
+ finishTest()
+ } else {
+ runTest(true);
+ }
+ }
+
+ function runTest(preserve) {
+ var c1 = document.getElementById('c' + (preserve * 3 + 1));
+ var c2 = document.getElementById('c' + (preserve * 3 + 2));
+ var c3 = document.getElementById('c' + (preserve * 3 + 3));
+ var ctx1 = c1.getContext('2d');
+ var ctx2 = c2.getContext('2d');
+ var gl = wtu.create3DContext(c3, { alpha:false, preserveDrawingBuffer:preserve });
+ gl.clearColor(1, 0, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ ctx1.drawImage(c3, 0, 0);
+ wtu.waitForComposite(function() {
+ ctx2.drawImage(c3, 0, 0);
+ checkResult(ctx1, ctx2, preserve);
+ });
+
+ }
+ </script>
+ </head>
+ <body>
+ <div class="pattern">
+ <canvas id='c1'></canvas>
+ <canvas id='c2'></canvas>
+ <canvas id='c3'></canvas>
+ </div>
+ <span>should look like</span>
+ <div class="pattern">
+ <div class='square'></div>
+ <div class='square' style='background-color:black'></div>
+ <div class='square'></div>
+ </div>
+ <hr />
+ <div class="pattern">
+ <canvas id='c4'></canvas>
+ <canvas id='c5'></canvas>
+ <canvas id='c6'></canvas>
+ </div>
+ <span>should look like</span>
+ <div class="pattern">
+ <div class='square'></div>
+ <div class='square'></div>
+ <div class='square'></div>
+ </div>
+ <div id="description"></div>
+ <div id="console"></div>
+ <script>
+ "use strict";
+ description('Verify that preserveDrawingBuffer attribute is honored.');
+ runTest(false);
+ var successfullyParsed = true;
+ shouldBeTrue("successfullyParsed");
+ </script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-attributes-alpha-depth-stencil-antialias.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-attributes-alpha-depth-stencil-antialias.html
new file mode 100644
index 000000000..f86b6f1b3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-attributes-alpha-depth-stencil-antialias.html
@@ -0,0 +1,358 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec3 pos;
+attribute vec4 colorIn;
+varying vec4 color;
+
+void main()
+{
+ color = colorIn;
+ gl_Position = vec4(pos.xyz, 1.0);
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+
+varying vec4 color;
+
+void main()
+{
+ gl_FragColor = color;
+}
+</script>
+
+<script>
+"use strict";
+
+// These four declarations need to be global for "shouldBe" to see them
+var wtu = WebGLTestUtils;
+var gl;
+var contextAttribs = null;
+var pixel_1 = [0, 0, 0, 1];
+var pixel_2 = [0, 0, 0, 1];
+var correctColor = null;
+var framebuffer;
+var fbHasColor;
+var fbHasDepth;
+var fbHasStencil;
+
+function init()
+{
+ description('Verify WebGLContextAttributes are working as specified, including alpha, depth, stencil, antialias, but not premultipliedAlpha');
+
+ runTest();
+}
+
+function getWebGL(canvasWidth, canvasHeight, contextAttribs, clearColor, clearDepth, clearStencil)
+{
+ var canvas = document.createElement("canvas");
+ if (!canvas)
+ return null;
+ canvas.width = canvasWidth;
+ canvas.height = canvasHeight;
+
+ gl = wtu.create3DContext(canvas, contextAttribs);
+ if (!gl)
+ return null;
+
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["pos", "colorIn"]);
+ if (!program)
+ return null;
+
+ gl.enable(gl.DEPTH_TEST);
+ gl.enable(gl.STENCIL_TEST);
+
+ gl.clearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
+ gl.clearDepth(clearDepth);
+ gl.clearStencil(clearStencil);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);
+
+ framebuffer = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.canvas.width, gl.canvas.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
+ fbHasStencil = false;
+ fbHasDepth = false;
+ fbHasColor = gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE;
+ if (fbHasColor) {
+ var depthStencil = gl.createRenderbuffer();
+ gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencil);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, gl.canvas.width, gl.canvas.height);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, depthStencil);
+ fbHasDepth = gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE;
+ if (!fbHasDepth) {
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, null);
+ shouldBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+ } else {
+ fbHasStencil = true;
+ }
+ }
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+
+ return gl;
+}
+
+function drawAndReadPixel(gl, vertices, colors)
+{
+ var colorOffset = vertices.byteLength;
+
+ var vbo = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ gl.bufferData(gl.ARRAY_BUFFER, colorOffset + colors.byteLength, gl.STATIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, vertices);
+ gl.bufferSubData(gl.ARRAY_BUFFER, colorOffset, colors);
+
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(1, 4, gl.UNSIGNED_BYTE, true, 0, colorOffset);
+ gl.enableVertexAttribArray(1);
+
+ gl.drawArrays(gl.TRIANGLES, 0, vertices.length / 3);
+}
+
+function testDefault()
+{
+ debug("Testing default attributes: { stencil:false }");
+ shouldBeNonNull("gl = getWebGL(1, 1, null, [ 0, 0, 0, 0 ], 1, 0)");
+ shouldBeFalse("gl.getContextAttributes().stencil");
+ shouldBeTrue("gl.getParameter(gl.STENCIL_BITS) == 0");
+}
+
+function testAlpha(alpha)
+{
+ debug("Testing alpha = " + alpha);
+ if (alpha) {
+ shouldBeNonNull("gl = getWebGL(1, 1, { alpha: true, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0)");
+ shouldBeTrue("gl.getParameter(gl.ALPHA_BITS) >= 8");
+ } else {
+ shouldBeNonNull("gl = getWebGL(1, 1, { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0)");
+ shouldBeTrue("gl.getParameter(gl.ALPHA_BITS) == 0");
+ }
+ shouldBeTrue("gl.getParameter(gl.RED_BITS) >= 8");
+ shouldBeTrue("gl.getParameter(gl.GREEN_BITS) >= 8");
+ shouldBeTrue("gl.getParameter(gl.BLUE_BITS) >= 8");
+ shouldBeTrue("gl.getParameter(gl.DEPTH_BITS) == 0");
+ shouldBeTrue("gl.getParameter(gl.STENCIL_BITS) == 0");
+
+ shouldBeNonNull("contextAttribs = gl.getContextAttributes()");
+ shouldBeTrue("contextAttribs.alpha == " + alpha);
+
+ var correctColor = (contextAttribs.alpha ? [0, 0, 0, 0] : [0, 0, 0, 255]);
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, correctColor);
+
+ if (fbHasColor) {
+ gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
+ gl.clearColor(0.5, 0.5, 0.5, 0.5);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, [127, 127, 127, 127], undefined, 1);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ }
+}
+
+function testDepth(depth)
+{
+ debug("Testing depth = " + depth);
+ if (depth) {
+ shouldBeNonNull("gl = getWebGL(1, 1, { stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
+ shouldBeTrue("gl.getParameter(gl.DEPTH_BITS) >= 16");
+ } else {
+ shouldBeNonNull("gl = getWebGL(1, 1, { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
+ shouldBeTrue("gl.getParameter(gl.DEPTH_BITS) == 0");
+ }
+ shouldBeTrue("gl.getParameter(gl.RED_BITS) >= 8");
+ shouldBeTrue("gl.getParameter(gl.GREEN_BITS) >= 8");
+ shouldBeTrue("gl.getParameter(gl.BLUE_BITS) >= 8");
+ shouldBeTrue("gl.getParameter(gl.ALPHA_BITS) >= 8");
+
+ shouldBeNonNull("contextAttribs = gl.getContextAttributes()");
+
+ gl.depthFunc(gl.NEVER);
+
+ var vertices = new Float32Array([
+ 1.0, 1.0, 0.0,
+ -1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, -1.0, 0.0]);
+ var colors = new Uint8Array([
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255]);
+
+ drawAndReadPixel(gl, vertices, colors, 0, 0);
+ correctColor = (contextAttribs.depth ? [0, 0, 0, 255] : [255, 0, 0, 255]);
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, correctColor);
+
+ if (fbHasDepth) {
+ gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ drawAndReadPixel(gl, vertices, colors, 0, 0);
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0, 0, 0, 255]);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ }
+}
+
+function testStencilAndDepth(stencil, depth)
+{
+ debug("Testing stencil = " + stencil + ", depth = " + depth);
+ var creationString =
+ "gl = getWebGL(1, 1, { depth: " + depth + ", stencil: " + stencil + ", antialias: false }, [ 0, 0, 0, 1 ], 1, 0)";
+ shouldBeNonNull(creationString);
+
+ shouldBeTrue("gl.getParameter(gl.RED_BITS) >= 8");
+ shouldBeTrue("gl.getParameter(gl.GREEN_BITS) >= 8");
+ shouldBeTrue("gl.getParameter(gl.BLUE_BITS) >= 8");
+ shouldBeTrue("gl.getParameter(gl.ALPHA_BITS) >= 8");
+ if (depth)
+ shouldBeTrue("gl.getParameter(gl.DEPTH_BITS) >= 16");
+ else
+ shouldBeTrue("gl.getParameter(gl.DEPTH_BITS) == 0");
+
+ if (stencil)
+ shouldBeTrue("gl.getParameter(gl.STENCIL_BITS) >= 8");
+ else
+ shouldBeTrue("gl.getParameter(gl.STENCIL_BITS) == 0");
+
+ shouldBeNonNull("contextAttribs = gl.getContextAttributes()");
+ if (!depth && contextAttribs.depth) {
+ testFailed("WebGL implementation provided a depth buffer when it should not have");
+ }
+ if (!contextAttribs.depth)
+ depth = false;
+ if (!stencil && contextAttribs.stencil) {
+ testFailed("WebGL implementation provided a stencil buffer when it should not have");
+ }
+ if (!contextAttribs.stencil)
+ stencil = false;
+
+ gl.depthFunc(gl.ALWAYS);
+
+ gl.stencilFunc(gl.NEVER, 1, 1);
+ gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);
+
+ var vertices = new Float32Array([
+ 1.0, 1.0, 0.0,
+ -1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, -1.0, 0.0]);
+ var colors = new Uint8Array([
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255]);
+
+ drawAndReadPixel(gl, vertices, colors, 0, 0);
+ correctColor = (stencil ? [0, 0, 0, 255] : [255, 0, 0, 255]);
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, correctColor)
+
+ if (fbHasStencil) {
+ gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ drawAndReadPixel(gl, vertices, colors, 0, 0);
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0, 0, 0, 255]);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ }
+}
+
+function testAntialias(antialias)
+{
+ debug("Testing antialias = " + antialias);
+ if (antialias)
+ shouldBeNonNull("gl = getWebGL(2, 2, { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0)");
+ else
+ shouldBeNonNull("gl = getWebGL(2, 2, { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
+ shouldBeNonNull("contextAttribs = gl.getContextAttributes()");
+
+ var vertices = new Float32Array([
+ 1.0, 1.0, 0.0,
+ -1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0]);
+ var colors = new Uint8Array([
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255]);
+ drawAndReadPixel(gl, vertices, colors, 0, 0);
+ var buf_1 = new Uint8Array(1 * 1 * 4);
+ var buf_2 = new Uint8Array(1 * 1 * 4);
+ gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf_1);
+ gl.readPixels(0, 1, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf_2);
+ pixel_1[0] = buf_1[0];
+ pixel_2[0] = buf_2[0];
+ // For some anti-alias algorithms, effects may be not on diagonal line pixels, so that either:
+ // - The red channel of the pixel at (0, 0) is not 0 and not 255, or,
+ // - If it is 0, expect that the red channel of the pixel at (0, 1) is not 0 and not 255.
+ shouldBe("pixel_1[0] != 255 && pixel_1[0] != 0 || pixel_1[0] == 0 && pixel_2[0] != 255 && pixel_2[0] != 0",
+ "contextAttribs.antialias");
+}
+
+function runTest()
+{
+ testDefault();
+ testAlpha(true);
+ testAlpha(false);
+ testDepth(true);
+ testDepth(false);
+ testStencilAndDepth(true, false);
+ testStencilAndDepth(false, false);
+ testStencilAndDepth(true, true);
+ testStencilAndDepth(false, true);
+ testAntialias(true);
+ testAntialias(false);
+
+ finishTest();
+}
+
+</script>
+</head>
+<body onload="init()">
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html
new file mode 100644
index 000000000..a02dd2d14
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html
@@ -0,0 +1,58 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Test that contexts are freed and garbage collected reasonably</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+<script src="../resources/iterable-test.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description();
+
+var wtu = WebGLTestUtils;
+
+var test = IterableTest.createContextCreationAndDestructionTest();
+var iterations = parseInt(wtu.getUrlOptions().iterations, 10) || 50;
+IterableTest.run(test, iterations);
+
+var successfullyParsed = true;
+</script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-creation.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-creation.html
new file mode 100644
index 000000000..04b138daf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-creation.html
@@ -0,0 +1,58 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Test that you can create large numbers of WebGL contexts.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+<script src="../resources/iterable-test.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description();
+
+var wtu = WebGLTestUtils;
+
+var test = IterableTest.createContextCreationTest();
+var iterations = parseInt(wtu.getUrlOptions().iterations, 10) || 50;
+IterableTest.run(test, iterations);
+
+var successfullyParsed = true;
+</script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html
new file mode 100644
index 000000000..3989c7679
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html
@@ -0,0 +1,80 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Test that context eviction and garbage collection do not interfere with each other</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+// See http://crbug.com/374086 for original failing case.
+description("Test that context eviction and garbage collection do not interfere with each other.");
+var wtu = WebGLTestUtils;
+
+var total_iteration = 50;
+var array_count = 10;
+
+var bank = [];
+for (var i = 0; i < array_count; i++)
+ bank[i] = [];
+
+for (var iter = 0; iter < total_iteration; ++iter) {
+ for (var i = 0; i < array_count; i++)
+ bank[i][iter * i] = iter;
+
+ var canvas = document.createElement('canvas');
+ var gl = wtu.create3DContext(canvas);
+ canvas.width = 50;
+ canvas.height = 50;
+ var program = wtu.setupTexturedQuad(gl);
+ shouldBeTrue("program != null");
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ var pixel = new Uint8Array([0, 255, 0, 255]);
+ gl.texImage2D(
+ gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixel);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from iteration " + iter);
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html
new file mode 100644
index 000000000..0f1193898
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html
@@ -0,0 +1,189 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script id='vs' type='x-shader/x-vertex'>
+ attribute vec2 aPosCoord;
+
+ void main(void) {
+ gl_Position = vec4(aPosCoord, 0.0, 1.0);
+ }
+</script>
+
+<script id='fs' type='x-shader/x-fragment'>
+ precision mediump float;
+
+ void main(void) {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+ }
+</script>
+<script>
+"use strict";
+
+var posCoords_arr = new Float32Array(2 * 4);
+var posCoords_buff = null;
+function DrawQuad(gl, prog, x0, y0, x1, y1) {
+ gl.useProgram(prog);
+
+ if (!posCoords_buff) {
+ posCoords_buff = gl.createBuffer();
+ }
+ gl.bindBuffer(gl.ARRAY_BUFFER, posCoords_buff);
+ posCoords_arr[0] = x0;
+ posCoords_arr[1] = y0;
+
+ posCoords_arr[2] = x1;
+ posCoords_arr[3] = y0;
+
+ posCoords_arr[4] = x0;
+ posCoords_arr[5] = y1;
+
+ posCoords_arr[6] = x1;
+ posCoords_arr[7] = y1;
+ gl.bufferData(gl.ARRAY_BUFFER, posCoords_arr, gl.STREAM_DRAW);
+
+ gl.enableVertexAttribArray(prog.aPosCoord);
+ gl.vertexAttribPointer(prog.aPosCoord, 2, gl.FLOAT, false, 0, 0);
+
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
+}
+
+function DrawSquare(gl, prog, size) {
+ DrawQuad(gl, prog, -size, -size, size, size);
+}
+
+function Reset(gl) {
+ gl.canvas.width += 1;
+ gl.canvas.width -= 1;
+}
+
+var iColor;
+var pixel;
+var dataURL_pre;
+var dataURL_post;
+
+function Test(gl, prog, shouldFinish) {
+ gl.enable(gl.BLEND);
+ gl.blendFunc(gl.ZERO, gl.DST_ALPHA);
+
+ iColor = 64;
+ var fColor = iColor / 255.0;
+
+ //////////////////
+
+ debug('clear(R,G,B,0)');
+
+ Reset(gl);
+
+ gl.clearColor(fColor, fColor, fColor, 0.0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ dataURL_pre = gl.canvas.toDataURL();
+ //console.log('Before blending: ' + dataURL_pre);
+
+ DrawSquare(gl, prog, 0.7);
+
+ WebGLTestUtils.checkCanvasRect(gl, gl.drawingBufferWidth/2,
+ gl.drawingBufferHeight/2, 1, 1,
+ [iColor, iColor, iColor, 255],
+ 'Should blend as if alpha is 1.0.');
+
+ dataURL_post = gl.canvas.toDataURL();
+ //console.log('After blending: ' + dataURL_post);
+ shouldBe("dataURL_post", "dataURL_pre");
+
+ //////////////////
+
+ debug('mask(R,G,B,0), clear(R,G,B,1)');
+
+ Reset(gl);
+
+ gl.colorMask(true, true, true, false);
+ gl.clearColor(fColor, fColor, fColor, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.colorMask(true, true, true, true);
+
+ dataURL_pre = gl.canvas.toDataURL();
+ //console.log('Before blending: ' + dataURL_pre);
+
+ DrawSquare(gl, prog, 0.7);
+
+ WebGLTestUtils.checkCanvasRect(gl, gl.drawingBufferWidth/2,
+ gl.drawingBufferHeight/2, 1, 1,
+ [iColor, iColor, iColor, 255],
+ 'Should blend as if alpha is 1.0.');
+
+ dataURL_post = gl.canvas.toDataURL();
+ //console.log('After blending: ' + dataURL_post);
+ shouldBe("dataURL_post", "dataURL_pre");
+
+ ////////////////
+
+ WebGLTestUtils.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+
+ if (shouldFinish)
+ finishTest();
+}
+
+var gl;
+function init() {
+ var canvas = document.getElementById('canvas');
+ var attribs = {
+ alpha: false,
+ antialias: false,
+ premultipliedAlpha: false,
+ };
+ gl = canvas.getContext('experimental-webgl', attribs);
+ shouldBeNonNull(gl);
+ shouldBe("gl.getParameter(gl.ALPHA_BITS)", "0");
+
+ var prog = WebGLTestUtils.setupProgram(gl, ['vs', 'fs']);
+ shouldBeNonNull(prog);
+ prog.aPosCoord = gl.getAttribLocation(prog, 'aPosCoord');
+
+ Test(gl, prog, false);
+
+ requestAnimationFrame(function(){ Test(gl, prog, true); });
+}
+
+</script>
+</head>
+<body onload="init()">
+<canvas id='canvas'></canvas>
+<br/>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html
new file mode 100644
index 000000000..dc83e16e6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html
@@ -0,0 +1,308 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var canvas;
+var gl;
+var shouldGenerateGLError;
+var WEBGL_lose_context;
+var new_WEBGL_lose_context;
+var bufferObjects;
+var program;
+var texture;
+var texColor = [255, 10, 20, 255];
+var allowRestore;
+var contextLostEventFired;
+var contextRestoredEventFired;
+var OES_vertex_array_object;
+var old_OES_vertex_array_object;
+var vertexArrayObject;
+var OES_texture_float;
+var newExtension;
+
+function init()
+{
+ enableJSTestPreVerboseLogging();
+ description("Tests behavior under a restored context.");
+
+ shouldGenerateGLError = wtu.shouldGenerateGLError;
+ testLosingContext();
+}
+
+function setupTest()
+{
+ canvas = document.createElement("canvas");
+ canvas.width = 1;
+ canvas.height = 1;
+ gl = wtu.create3DContext(canvas);
+ WEBGL_lose_context = getExtensionAndAddProperty(gl, "WEBGL_lose_context");
+ if (!WEBGL_lose_context) {
+ debug("Could not find WEBGL_lose_context extension");
+ return false;
+ }
+
+ // Try to get a few extensions
+ OES_vertex_array_object = getExtensionAndAddProperty(gl, "OES_vertex_array_object");
+ OES_texture_float = getExtensionAndAddProperty(gl, "OES_texture_float");
+
+ return true;
+}
+
+function getExtensionAndAddProperty(gl, name) {
+ var ext = wtu.getExtensionWithKnownPrefixes(gl, name);
+ if (ext) {
+ ext.webglTestProperty = true;
+ }
+ return ext;
+}
+
+function reGetExtensionAndTestForProperty(gl, name, expectProperty) {
+ newExtension = wtu.getExtensionWithKnownPrefixes(gl, name);
+ // NOTE: while getting a extension after context lost/restored is allowed to fail
+ // for the purpose the conformance tests it is not.
+ //
+ // Hypothetically the user can switch GPUs live. For example on Windows, install 2 GPUs,
+ // then in the control panen enable 1, disable the others and visa versa. Since the GPUs
+ // have different capabilities one or the other may not support a particlar extension.
+ //
+ // But, for the purpose of the conformance tests the context is expected to restore
+ // on the same GPU and therefore the extensions that succeeded previously should
+ // succeed on restore.
+ shouldBeTrue("newExtension != null");
+ if (expectProperty) {
+ shouldBeTrue("newExtension.webglTestProperty === true");
+ } else {
+ shouldBeTrue("newExtension.webglTestProperty === undefined");
+ }
+ return newExtension;
+}
+
+function testLosingContext()
+{
+ if (!setupTest()) {
+ finishTest();
+ return;
+ }
+
+ debug("Test losing a context and inability to restore it.");
+
+ canvas.addEventListener("webglcontextlost", function(e) {
+ testLostContext(e);
+ // restore the context after this event has exited.
+ setTimeout(function() {
+ // we didn't call prevent default so we should not be able to restore the context
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "WEBGL_lose_context.restoreContext()");
+ testLosingAndRestoringContext();
+ }, 0);
+ });
+ canvas.addEventListener("webglcontextrestored", testShouldNotRestoreContext);
+ allowRestore = false;
+ contextLostEventFired = false;
+ contextRestoredEventFired = false;
+
+ testOriginalContext();
+ WEBGL_lose_context.loseContext();
+ // The context should be lost immediately.
+ shouldBeTrue("gl.isContextLost()");
+ shouldBe("gl.getError()", "gl.CONTEXT_LOST_WEBGL");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ // gl methods should be no-ops
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.blendFunc(gl.TEXTURE_2D, gl.TEXTURE_CUBE_MAP)");
+ // but the event should not have been fired.
+ shouldBeFalse("contextLostEventFired");
+}
+
+function testLosingAndRestoringContext()
+{
+ if (!setupTest())
+ finishTest();
+
+ debug("");
+ debug("Test losing and restoring a context.");
+
+ canvas.addEventListener("webglcontextlost", function(e) {
+ testLostContext(e);
+ // restore the context after this event has exited.
+ setTimeout(function() {
+ shouldGenerateGLError(gl, gl.NO_ERROR, "WEBGL_lose_context.restoreContext()");
+ // The context should still be lost. It will not get restored until the
+ // webglrestorecontext event is fired.
+ shouldBeTrue("gl.isContextLost()");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ // gl methods should still be no-ops
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.blendFunc(gl.TEXTURE_2D, gl.TEXTURE_CUBE_MAP)");
+ }, 0);
+ });
+ canvas.addEventListener("webglcontextrestored", function() {
+ testRestoredContext();
+ finishTest();
+ });
+ allowRestore = true;
+ contextLostEventFired = false;
+ contextRestoredEventFired = false;
+
+ testOriginalContext();
+ WEBGL_lose_context.loseContext();
+ // The context should be lost immediately.
+ shouldBeTrue("gl.isContextLost()");
+ shouldBe("gl.getError()", "gl.CONTEXT_LOST_WEBGL");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ // gl methods should be no-ops
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.blendFunc(gl.TEXTURE_2D, gl.TEXTURE_CUBE_MAP)");
+ // but the event should not have been fired.
+ shouldBeFalse("contextLostEventFired");
+}
+
+function testRendering()
+{
+ gl.clearColor(0, 0, 0, 255);
+ gl.colorMask(1, 1, 1, 0);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ program = wtu.setupSimpleTextureProgram(gl);
+ bufferObjects = wtu.setupUnitQuad(gl);
+ texture = wtu.createColoredTexture(gl, canvas.width, canvas.height, texColor);
+
+ gl.uniform1i(gl.getUniformLocation(program, "tex"), 0);
+ wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
+
+ var compare = texColor.slice(0, 3);
+ wtu.checkCanvasRect(gl, 0, 0, canvas.width, canvas.height, compare, "shouldBe " + compare);
+
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+}
+
+function testOriginalContext()
+{
+ debug("Test valid context");
+ shouldBeFalse("gl.isContextLost()");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ testRendering();
+ debug("");
+}
+
+function testLostContext(e)
+{
+ debug("Test lost context");
+ shouldBeFalse("contextLostEventFired");
+ contextLostEventFired = true;
+ shouldBeTrue("gl.isContextLost()");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ debug("");
+ if (allowRestore)
+ e.preventDefault();
+}
+
+function testShouldNotRestoreContext(e)
+{
+ testFailed("Should not restore the context unless preventDefault is called on the context lost event");
+ debug("");
+}
+
+function testResources(expected)
+{
+ var tests = [
+ "gl.bindTexture(gl.TEXTURE_2D, texture)",
+ "gl.useProgram(program)",
+ "gl.bindBuffer(gl.ARRAY_BUFFER, bufferObjects[0])",
+ ];
+
+ for (var i = 0; i < tests.length; ++i)
+ shouldGenerateGLError(gl, expected, tests[i]);
+}
+
+function testOESTextureFloat() {
+ if (OES_texture_float) {
+ // Extension must still be lost.
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.FLOAT, null)");
+ // Try re-enabling extension
+ OES_texture_float = reGetExtensionAndTestForProperty(gl, "OES_texture_float", false);
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.FLOAT, null)");
+ }
+}
+
+function testOESVertexArrayObject() {
+ if (OES_vertex_array_object) {
+ // Extension must still be lost.
+ shouldBeNull("OES_vertex_array_object.createVertexArrayOES()");
+ // Try re-enabling extension
+
+ old_OES_vertex_array_object = OES_vertex_array_object;
+ OES_vertex_array_object = reGetExtensionAndTestForProperty(gl, "OES_vertex_array_object", false);
+ shouldBeTrue("OES_vertex_array_object.createVertexArrayOES() != null");
+ shouldBeTrue("old_OES_vertex_array_object.createVertexArrayOES() == null");
+ }
+}
+
+function testExtensions() {
+ testOESTextureFloat();
+ testOESVertexArrayObject();
+ // Only the WEBGL_lose_context extension should be the same object after context lost.
+ new_WEBGL_lose_context = reGetExtensionAndTestForProperty(gl, "WEBGL_lose_context", true);
+}
+
+function testRestoredContext()
+{
+ debug("Test restored context");
+ shouldBeFalse("contextRestoredEventFired");
+ contextRestoredEventFired = true;
+ shouldBeFalse("gl.isContextLost()");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+
+ // Validate that using old resources fails.
+ testResources(gl.INVALID_OPERATION);
+
+ testRendering();
+
+ // Validate new resources created in testRendering().
+ testResources(gl.NO_ERROR);
+
+ testExtensions();
+
+ debug("");
+}
+
+
+</script>
+</head>
+<body onload="init()">
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-lost.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-lost.html
new file mode 100644
index 000000000..62daf2e9b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-lost.html
@@ -0,0 +1,373 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script>
+"use strict";
+var wtu;
+var canvas;
+var gl;
+var shouldGenerateGLError;
+var extensionName;
+var extension;
+
+var buffer;
+var framebuffer;
+var program;
+var renderbuffer;
+var shader;
+var texture;
+var uniformLocation;
+var arrayBuffer;
+var arrayBufferView
+var image;
+var video;
+var canvas2d;
+var ctx2d;
+var imageData;
+var float32array;
+var int32array;
+var OES_vertex_array_object;
+var vertexArrayObject;
+
+function init()
+{
+ wtu = WebGLTestUtils;
+ canvas = document.getElementById("canvas");
+ gl = wtu.create3DContext(canvas);
+ shouldGenerateGLError = wtu.shouldGenerateGLError;
+
+ description("Tests behavior under a lost context");
+
+ // call testValidContext() before checking for the extension, because this is where we check
+ // for the isContextLost() method, which we want to do regardless of the extension's presence.
+ testValidContext();
+
+ extensionName = wtu.getSupportedExtensionWithKnownPrefixes(gl, "WEBGL_lose_context");
+ if (!extensionName) {
+ debug("Could not find WEBGL_lose_context extension");
+ finishTest();
+ return false;
+ }
+ extension = gl.getExtension(extensionName);
+
+ // need an extension that exposes new API methods.
+ OES_vertex_array_object = wtu.getExtensionWithKnownPrefixes(gl, "OES_vertex_array_object");
+
+ canvas.addEventListener("webglcontextlost", testLostContext, false);
+
+ loseContext();
+}
+
+function loseContext()
+{
+ debug("");
+ debug("Lose context");
+
+ // Note: this will cause the context to be lost, but the
+ // webglcontextlost event listener to be queued.
+ extension.loseContext();
+ debug("");
+}
+
+function testValidContext()
+{
+ debug("Test valid context");
+
+ shouldBeFalse("gl.isContextLost()");
+
+ arrayBuffer = new ArrayBuffer(4);
+ arrayBufferView = new Int8Array(arrayBuffer);
+
+ // Generate resources for testing.
+ buffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
+ framebuffer = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
+ program = wtu.setupSimpleTextureProgram(gl);
+ renderbuffer = gl.createRenderbuffer();
+ gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);
+ shader = gl.createShader(gl.VERTEX_SHADER);
+ texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+
+ // Test is queries that will later be false
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.enable(gl.BLEND)");
+ shouldBeTrue("gl.isBuffer(buffer)");
+ shouldBeTrue("gl.isEnabled(gl.BLEND)");
+ shouldBeTrue("gl.isFramebuffer(framebuffer)");
+ shouldBeTrue("gl.isProgram(program)");
+ shouldBeTrue("gl.isRenderbuffer(renderbuffer)");
+ shouldBeTrue("gl.isShader(shader)");
+ shouldBeTrue("gl.isTexture(texture)");
+
+ if (OES_vertex_array_object) {
+ vertexArrayObject = OES_vertex_array_object.createVertexArrayOES();
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ shouldBeTrue("OES_vertex_array_object.isVertexArrayOES(vertexArrayObject)");
+ }
+}
+
+function testGLNOErrorFunctions(tests) {
+ tests.forEach(function(test) {
+ shouldGenerateGLError(gl, gl.NO_ERROR, test);
+ });
+}
+
+function testFunctionsThatReturnNULL(tests) {
+ tests.forEach(function(test) {
+ shouldBeNull(test);
+ });
+}
+
+function testLostContext()
+{
+ debug("Test lost context");
+
+ // Functions with special return values.
+ shouldBeTrue("gl.isContextLost()");
+ shouldBe("gl.getError()", "gl.CONTEXT_LOST_WEBGL");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_UNSUPPORTED");
+ shouldBe("gl.getAttribLocation(program, 'u_modelViewProjMatrix')", "-1");
+ shouldBe("gl.getVertexAttribOffset(0, gl.VERTEX_ATTRIB_ARRAY_POINTER)", "0");
+
+ // Test the extension itself.
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "extension.loseContext()");
+
+ image = document.createElement("img");
+ video = document.createElement("video");
+ canvas2d = document.createElement("canvas");
+ ctx2d = canvas2d.getContext("2d");
+ imageData = ctx2d.createImageData(1, 1);
+ float32array = new Float32Array(1);
+ int32array = new Int32Array(1);
+
+ // Functions returning void should return immediately.
+ // This is untestable, but we can at least be sure they cause no errors
+ // and the codepaths are exercised.
+ var voidTests = [
+ "gl.activeTexture(gl.TEXTURE0)",
+ "gl.attachShader(program, shader)",
+ "gl.bindBuffer(gl.ARRAY_BUFFER, buffer)",
+ "gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer)",
+ "gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer)",
+ "gl.bindTexture(gl.TEXTURE_2D, texture)",
+ "gl.blendColor(1.0, 1.0, 1.0, 1.0)",
+ "gl.blendEquation(gl.FUNC_ADD)",
+ "gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD)",
+ "gl.blendFunc(gl.ONE, gl.ONE)",
+ "gl.blendFuncSeparate(gl.ONE, gl.ONE, gl.ONE, gl.ONE)",
+ "gl.bufferData(gl.ARRAY_BUFFER, 0, gl.STATIC_DRAW)",
+ "gl.bufferData(gl.ARRAY_BUFFER, arrayBufferView, gl.STATIC_DRAW)",
+ "gl.bufferData(gl.ARRAY_BUFFER, arrayBuffer, gl.STATIC_DRAW)",
+ "gl.bufferSubData(gl.ARRAY_BUFFRE, 0, arrayBufferView)",
+ "gl.bufferSubData(gl.ARRAY_BUFFRE, 0, arrayBuffer)",
+ "gl.clear(gl.COLOR_BUFFER_BIT)",
+ "gl.clearColor(1, 1, 1, 1)",
+ "gl.clearDepth(1)",
+ "gl.clearStencil(0)",
+ "gl.colorMask(1, 1, 1, 1)",
+ "gl.compileShader(shader)",
+ "gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, 0, 0, 0)",
+ "gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, 0, 0)",
+ "gl.cullFace(gl.FRONT)",
+ "gl.deleteBuffer(buffer)",
+ "gl.deleteFramebuffer(framebuffer)",
+ "gl.deleteProgram(program)",
+ "gl.deleteRenderbuffer(renderbuffer)",
+ "gl.deleteShader(shader)",
+ "gl.deleteTexture(texture)",
+ "gl.depthFunc(gl.NEVER)",
+ "gl.depthMask(0)",
+ "gl.depthRange(0, 1)",
+ "gl.detachShader(program, shader)",
+ "gl.disable(gl.BLEND)",
+ "gl.disableVertexAttribArray(0)",
+ "gl.drawArrays(gl.POINTS, 0, 0)",
+ "gl.drawElements(gl.POINTS, 0, gl.UNSIGNED_SHORT, 0)",
+ "gl.enable(gl.BLEND)",
+ "gl.enableVertexAttribArray(0)",
+ "gl.finish()",
+ "gl.flush()",
+ "gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, renderbuffer)",
+ "gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0)",
+ "gl.frontFace(gl.CW)",
+ "gl.generateMipmap(gl.TEXTURE_2D)",
+ "gl.hint(gl.GENERATE_MIPMAP_HINT, gl.FASTEST)",
+ "gl.lineWidth(0)",
+ "gl.linkProgram(program)",
+ "gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 0)",
+ "gl.polygonOffset(0, 0)",
+ "gl.readPixels(0, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, arrayBufferView)",
+ "gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 0, 0)",
+ "gl.sampleCoverage(0, 0)",
+ "gl.scissor(0, 0, 0, 0)",
+ "gl.shaderSource(shader, '')",
+ "gl.stencilFunc(gl.NEVER, 0, 0)",
+ "gl.stencilFuncSeparate(gl.FRONT, gl.NEVER, 0, 0)",
+ "gl.stencilMask(0)",
+ "gl.stencilMaskSeparate(gl.FRONT, 0)",
+ "gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP)",
+ "gl.stencilOpSeparate(gl.FRONT, gl.KEEP, gl.KEEP, gl.KEEP)",
+ "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, arrayBufferView)",
+ "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, imageData)",
+ "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image)",
+ "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas)",
+ "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video)",
+ "gl.texParameterf(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST)",
+ "gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST)",
+ "gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, arrayBufferView)",
+ "gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, imageData)",
+ "gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, image)",
+ "gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, canvas)",
+ "gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, video)",
+ "gl.uniform1f(uniformLocation, 0)",
+ "gl.uniform1fv(uniformLocation, float32array)",
+ "gl.uniform1fv(uniformLocation, [0])",
+ "gl.uniform1i(uniformLocation, 0)",
+ "gl.uniform1iv(uniformLocation, int32array)",
+ "gl.uniform1iv(uniformLocation, [0])",
+ "gl.uniform2f(uniformLocation, 0, 0)",
+ "gl.uniform2fv(uniformLocation, float32array)",
+ "gl.uniform2fv(uniformLocation, [0, 0])",
+ "gl.uniform2i(uniformLocation, 0, 0)",
+ "gl.uniform2iv(uniformLocation, int32array)",
+ "gl.uniform2iv(uniformLocation, [0, 0])",
+ "gl.uniform3f(uniformLocation, 0, 0, 0)",
+ "gl.uniform3fv(uniformLocation, float32array)",
+ "gl.uniform3fv(uniformLocation, [0, 0, 0])",
+ "gl.uniform3i(uniformLocation, 0, 0, 0)",
+ "gl.uniform3iv(uniformLocation, int32array)",
+ "gl.uniform3iv(uniformLocation, [0, 0, 0])",
+ "gl.uniform4f(uniformLocation, 0, 0, 0, 0)",
+ "gl.uniform4fv(uniformLocation, float32array)",
+ "gl.uniform4fv(uniformLocation, [0, 0, 0, 0])",
+ "gl.uniform4i(uniformLocation, 0, 0, 0, 0)",
+ "gl.uniform4iv(uniformLocation, int32array)",
+ "gl.uniform4iv(uniformLocation, [0, 0, 0, 0])",
+ "gl.uniformMatrix2fv(uniformLocation, false, float32array)",
+ "gl.uniformMatrix2fv(uniformLocation, false, [0, 0, 0, 0])",
+ "gl.uniformMatrix3fv(uniformLocation, false, float32array)",
+ "gl.uniformMatrix3fv(uniformLocation, false, [0, 0, 0, 0, 0, 0, 0, 0, 0])",
+ "gl.uniformMatrix4fv(uniformLocation, false, float32array)",
+ "gl.uniformMatrix4fv(uniformLocation, false, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])",
+ "gl.useProgram(program)",
+ "gl.validateProgram(program)",
+ "gl.vertexAttrib1f(0, 0)",
+ "gl.vertexAttrib1fv(0, float32array)",
+ "gl.vertexAttrib1fv(0, [0])",
+ "gl.vertexAttrib2f(0, 0, 0)",
+ "gl.vertexAttrib2fv(0, float32array)",
+ "gl.vertexAttrib2fv(0, [0, 0])",
+ "gl.vertexAttrib3f(0, 0, 0, 0)",
+ "gl.vertexAttrib3fv(0, float32array)",
+ "gl.vertexAttrib3fv(0, [0, 0, 0])",
+ "gl.vertexAttrib4f(0, 0, 0, 0, 0)",
+ "gl.vertexAttrib4fv(0, float32array)",
+ "gl.vertexAttrib4fv(0, [0, 0, 0, 0])",
+ "gl.vertexAttribPointer(0, 0, gl.FLOAT, false, 0, 0)",
+ "gl.viewport(0, 0, 0, 0)",
+ ];
+ testGLNOErrorFunctions(voidTests);
+
+ // Functions return nullable values should all return null.
+ var nullTests = [
+ "gl.createBuffer()",
+ "gl.createFramebuffer()",
+ "gl.createProgram()",
+ "gl.createRenderbuffer()",
+ "gl.createShader(gl.GL_VERTEX_SHADER)",
+ "gl.createTexture()",
+ "gl.getActiveAttrib(program, 0)",
+ "gl.getActiveUniform(program, 0)",
+ "gl.getAttachedShaders(program)",
+ "gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE)",
+ "gl.getContextAttributes()",
+ "gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)",
+ "gl.getParameter(gl.CURRENT_PROGRAM)",
+ "gl.getProgramInfoLog(program)",
+ "gl.getProgramParameter(program, gl.LINK_STATUS)",
+ "gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_WIDTH)",
+ "gl.getShaderInfoLog(shader)",
+ "gl.getShaderParameter(shader, gl.SHADER_TYPE)",
+ "gl.getShaderSource(shader)",
+ "gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S)",
+ "gl.getUniform(program, uniformLocation)",
+ "gl.getUniformLocation(program, 'vPosition')",
+ "gl.getVertexAttrib(0, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)",
+ "gl.getSupportedExtensions()",
+ "gl.getExtension('" + extensionName + "')",
+ ];
+ testFunctionsThatReturnNULL(nullTests);
+
+ // "Is" queries should all return false.
+ shouldBeFalse("gl.isBuffer(buffer)");
+ shouldBeFalse("gl.isEnabled(gl.BLEND)");
+ shouldBeFalse("gl.isFramebuffer(framebuffer)");
+ shouldBeFalse("gl.isProgram(program)");
+ shouldBeFalse("gl.isRenderbuffer(renderbuffer)");
+ shouldBeFalse("gl.isShader(shader)");
+ shouldBeFalse("gl.isTexture(texture)");
+
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+
+ // test extensions
+ if (OES_vertex_array_object) {
+ testGLNOErrorFunctions(
+ [
+ "OES_vertex_array_object.bindVertexArrayOES(vertexArrayObject)",
+ "OES_vertex_array_object.isVertexArrayOES(vertexArrayObject)",
+ "OES_vertex_array_object.deleteVertexArrayOES(vertexArrayObject)",
+ ]);
+ testFunctionsThatReturnNULL(
+ [
+ "OES_vertex_array_object.createVertexArrayOES()",
+ ]);
+ }
+
+ debug("");
+
+ finishTest();
+}
+
+</script>
+</head>
+<body onload="init()">
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas">
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html
new file mode 100644
index 000000000..1d90b8795
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html
@@ -0,0 +1,95 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Context Release Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<iframe id="host" style="width: 256px; height: 256px; border: 0;"></iframe>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("This test ensures that WebGL contexts are released properly upon page reload");
+
+var wtu = WebGLTestUtils;
+
+var host = document.getElementById("host");
+var testIterations = 25;
+var currentIteration = 0;
+
+function refreshFrame() {
+ if(currentIteration < testIterations) {
+ currentIteration++;
+ debug("");
+ debug("Test " + currentIteration + " of " + testIterations);
+ host.src = "resources/context-release-upon-reload-child.html";
+ } else {
+ finishTest();
+ }
+}
+
+function testContext() {
+ var gl = host.contentWindow.glContext;
+ assertMsg(gl != null, "context was created properly");
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors");
+
+ if(gl.canvas.width != gl.drawingBufferWidth ||
+ gl.canvas.height != gl.drawingBufferHeight) {
+ testFailed("Buffer was the wrong size: " +
+ gl.drawingBufferWidth + "x" + gl.drawingBufferHeight);
+ } else {
+ testPassed("Buffer was the correct size: " +
+ gl.drawingBufferWidth + "x" + gl.drawingBufferHeight);
+ refreshFrame();
+ }
+
+ gl = null;
+}
+
+window.addEventListener("message", function(event) {
+ if(event.data == "Ready") {
+ testContext();
+ }
+});
+
+refreshFrame();
+
+var successfullyParsed = true;
+</script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html
new file mode 100644
index 000000000..3bd94469b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html
@@ -0,0 +1,95 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Context Release Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<iframe id="host" style="width: 256px; height: 256px; border: 0;"></iframe>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("This test ensures that WebGL contexts are released properly when a worker is used");
+
+var wtu = WebGLTestUtils;
+
+var host = document.getElementById("host");
+var testIterations = 25;
+var currentIteration = 0;
+
+function refreshFrame() {
+ if(currentIteration < testIterations) {
+ currentIteration++;
+ debug("");
+ debug("Test " + currentIteration + " of " + testIterations);
+ host.src = "resources/context-release-child-with-worker.html";
+ } else {
+ finishTest();
+ }
+}
+
+function testContext() {
+ var gl = host.contentWindow.glContext;
+ assertMsg(gl != null, "context was created properly");
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors");
+
+ if(gl.canvas.width != gl.drawingBufferWidth ||
+ gl.canvas.height != gl.drawingBufferHeight) {
+ testFailed("Buffer was the wrong size: " +
+ gl.drawingBufferWidth + "x" + gl.drawingBufferHeight);
+ } else {
+ testPassed("Buffer was the correct size: " +
+ gl.drawingBufferWidth + "x" + gl.drawingBufferHeight);
+ refreshFrame();
+ }
+
+ gl = null;
+}
+
+window.addEventListener("message", function(event) {
+ if(event.data == "Ready") {
+ testContext();
+ }
+});
+
+refreshFrame();
+
+var successfullyParsed = true;
+</script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-type-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-type-test.html
new file mode 100644
index 000000000..d197a24cb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/context-type-test.html
@@ -0,0 +1,76 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Canvas Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<canvas id="canvas2d" width="40" height="40"> </canvas>
+<script>
+"use strict";
+description("This test ensures WebGL implementations interact correctly with the canvas tag.");
+
+debug("");
+debug("Canvas.getContext");
+
+assertMsg(window.WebGLRenderingContext,
+ "WebGLRenderingContext should be a member of window");
+assertMsg('WebGLRenderingContext' in window,
+ "WebGLRenderingContext should be 'in' window");
+assertMsg(Object.getPrototypeOf(WebGLRenderingContext.prototype) === Object.prototype,
+ "WebGLRenderingContext should only have Object in it's prototype chain");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("Checking context type");
+ assertMsg(gl instanceof WebGLRenderingContext,
+ "context type should be WebGLRenderingContext");
+}
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html
new file mode 100644
index 000000000..445979775
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html
@@ -0,0 +1,90 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Tests calling WebGL APIs with objects from other contexts");
+
+var wtu = WebGLTestUtils;
+var contextA = wtu.create3DContext();
+var contextB = wtu.create3DContext();
+var programA = wtu.loadStandardProgram(contextA);
+var programB = wtu.loadStandardProgram(contextB);
+var shaderA = wtu.loadStandardVertexShader(contextA);
+var shaderB = wtu.loadStandardVertexShader(contextB);
+var textureA = contextA.createTexture();
+var textureB = contextB.createTexture();
+var frameBufferA = contextA.createFramebuffer();
+var frameBufferB = contextB.createFramebuffer();
+var renderBufferA = contextA.createRenderbuffer();
+var renderBufferB = contextB.createRenderbuffer();
+var locationA = contextA.getUniformLocation(programA, 'u_modelViewProjMatrix');
+var locationB = contextB.getUniformLocation(programB, 'u_modelViewProjMatrix');
+
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.compileShader(shaderB)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.linkProgram(programB)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.attachShader(programA, shaderB)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.attachShader(programB, shaderA)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.attachShader(programB, shaderB)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.detachShader(programA, shaderB)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.detachShader(programB, shaderA)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.detachShader(programB, shaderB)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.shaderSource(shaderB, 'foo')");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.bindAttribLocation(programB, 0, 'foo')");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.bindFramebuffer(contextA.FRAMEBUFFER, frameBufferB)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.bindRenderbuffer(contextA.RENDERBUFFER, renderBufferB)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.bindTexture(contextA.TEXTURE_2D, textureB)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.framebufferRenderbuffer(contextA.FRAMEBUFFER, contextA.DEPTH_ATTACHMENT, contextA.RENDERBUFFER, renderBufferB)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.framebufferTexture2D(contextA.FRAMEBUFFER, contextA.COLOR_ATTACHMENT0, contextA.TEXTURE_2D, textureB, 0)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getProgramParameter(programB, 0)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getProgramInfoLog(programB, 0)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getShaderParameter(shaderB, 0)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getShaderInfoLog(shaderB, 0)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getShaderSource(shaderB)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getUniform(programB, locationA)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getUniformLocation(programB, 'u_modelViewProjMatrix')");
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/methods.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/methods.html
new file mode 100644
index 000000000..d74ce21ef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/methods.html
@@ -0,0 +1,238 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Methods Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<script>
+"use strict";
+description("This test ensures that the WebGL context has all the methods in the specification.");
+
+var methods = [
+"getContextAttributes",
+"activeTexture",
+"attachShader",
+"bindAttribLocation",
+"bindBuffer",
+"bindFramebuffer",
+"bindRenderbuffer",
+"bindTexture",
+"blendColor",
+"blendEquation",
+"blendEquationSeparate",
+"blendFunc",
+"blendFuncSeparate",
+"bufferData",
+"bufferSubData",
+"checkFramebufferStatus",
+"clear",
+"clearColor",
+"clearDepth",
+"clearStencil",
+"colorMask",
+"compileShader",
+"compressedTexImage2D",
+"compressedTexSubImage2D",
+"copyTexImage2D",
+"copyTexSubImage2D",
+"createBuffer",
+"createFramebuffer",
+"createProgram",
+"createRenderbuffer",
+"createShader",
+"createTexture",
+"cullFace",
+"deleteBuffer",
+"deleteFramebuffer",
+"deleteProgram",
+"deleteRenderbuffer",
+"deleteShader",
+"deleteTexture",
+"depthFunc",
+"depthMask",
+"depthRange",
+"detachShader",
+"disable",
+"disableVertexAttribArray",
+"drawArrays",
+"drawElements",
+"enable",
+"enableVertexAttribArray",
+"finish",
+"flush",
+"framebufferRenderbuffer",
+"framebufferTexture2D",
+"frontFace",
+"generateMipmap",
+"getActiveAttrib",
+"getActiveUniform",
+"getAttachedShaders",
+"getAttribLocation",
+"getParameter",
+"getBufferParameter",
+"getError",
+"getExtension",
+"getFramebufferAttachmentParameter",
+"getProgramParameter",
+"getProgramInfoLog",
+"getRenderbufferParameter",
+"getShaderParameter",
+"getShaderInfoLog",
+"getShaderPrecisionFormat",
+"getShaderSource",
+"getSupportedExtensions",
+"getTexParameter",
+"getUniform",
+"getUniformLocation",
+"getVertexAttrib",
+"getVertexAttribOffset",
+"hint",
+"isBuffer",
+"isContextLost",
+"isEnabled",
+"isFramebuffer",
+"isProgram",
+"isRenderbuffer",
+"isShader",
+"isTexture",
+"lineWidth",
+"linkProgram",
+"pixelStorei",
+"polygonOffset",
+"readPixels",
+"renderbufferStorage",
+"sampleCoverage",
+"scissor",
+"shaderSource",
+"stencilFunc",
+"stencilFuncSeparate",
+"stencilMask",
+"stencilMaskSeparate",
+"stencilOp",
+"stencilOpSeparate",
+"texImage2D",
+"texParameterf",
+"texParameteri",
+"texSubImage2D",
+"uniform1f",
+"uniform1fv",
+"uniform1i",
+"uniform1iv",
+"uniform2f",
+"uniform2fv",
+"uniform2i",
+"uniform2iv",
+"uniform3f",
+"uniform3fv",
+"uniform3i",
+"uniform3iv",
+"uniform4f",
+"uniform4fv",
+"uniform4i",
+"uniform4iv",
+"uniformMatrix2fv",
+"uniformMatrix3fv",
+"uniformMatrix4fv",
+"useProgram",
+"validateProgram",
+"vertexAttrib1f",
+"vertexAttrib1fv",
+"vertexAttrib2f",
+"vertexAttrib2fv",
+"vertexAttrib3f",
+"vertexAttrib3fv",
+"vertexAttrib4f",
+"vertexAttrib4fv",
+"vertexAttribPointer",
+"viewport"
+];
+
+// Properties to be ignored because they were added in versions of the
+// spec that are backward-compatible with this version
+var ignoredMethods = [
+];
+
+function assertFunction(v, f) {
+ try {
+ if (typeof v[f] != "function") {
+ testFailed("Property either does not exist or is not a function: " + f);
+ return false;
+ } else {
+ return true;
+ }
+ } catch(e) {
+ testFailed("Trying to access the property '" + f + "' threw an error: "+e.toString());
+ }
+}
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+var passed = true;
+for (var i=0; i<methods.length; i++) {
+ var r = assertFunction(gl, methods[i]);
+ passed = passed && r;
+}
+if (passed) {
+ testPassed("All WebGL methods found.");
+}
+var extended = false;
+for (var i in gl) {
+ if (typeof gl[i] == "function" && methods.indexOf(i) == -1 && ignoredMethods.indexOf(i) == -1) {
+ if (!extended) {
+ extended = true;
+ testFailed("Also found the following extra methods:");
+ }
+ testFailed(i);
+ }
+}
+
+if (!extended) {
+ testPassed("No extra methods found on WebGL context.");
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/premultiplyalpha-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/premultiplyalpha-test.html
new file mode 100644
index 000000000..87b4a0320
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/premultiplyalpha-test.html
@@ -0,0 +1,268 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Test the WebGL premultipliedAlpha context creation flag.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<div id="description"></div><div id="console"></div>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+
+// wtu.create3DContext(...) will set antialias to false by default
+// if the antialias property is not set to true explicitly.
+// To cover the antialias case, it needs to set antialias to true
+// explicitly.
+var tests = [
+ // If premultipliedAlpha is true and antialias is false then
+ // [texture] [canvas] [dataURL]
+ // 32, 64, 128, 128 -> 64, 128, 255, 128 -> 64, 128, 255, 128
+ { creationAttributes: {},
+ sentColor: [32, 64, 128, 128],
+ expectedColor: [64, 128, 255, 128],
+ errorRange: 2,
+ imageFormat: "image/png"
+ },
+ // If premultipliedAlpha is true and antialias is true then
+ // [texture] [canvas] [dataURL]
+ // 32, 64, 128, 128 -> 64, 128, 255, 128 -> 64, 128, 255, 128
+ { creationAttributes: {antialias: true},
+ sentColor: [32, 64, 128, 128],
+ expectedColor: [64, 128, 255, 128],
+ errorRange: 2,
+ imageFormat: "image/png"
+ },
+ // If premultipliedAlpha is true and antialias is false then
+ // [texture] [canvas] [texture]
+ // 32, 64, 128, 128 -> 64, 128, 255, 128 -> 64, 128, 255, 128
+ { creationAttributes: {},
+ sentColor: [32, 64, 128, 128],
+ expectedColor: [64, 128, 255, 128],
+ errorRange: 2,
+ },
+ // If premultipliedAlpha is true and antialias is true then
+ // [texture] [canvas] [texture]
+ // 32, 64, 128, 128 -> 64, 128, 255, 128 -> 64, 128, 255, 128
+ { creationAttributes: {antialias: true},
+ sentColor: [32, 64, 128, 128],
+ expectedColor: [64, 128, 255, 128],
+ errorRange: 2,
+ },
+ // If premultipliedAlpha is false and antialias is false then
+ // [texture] [canvas] [dataURL]
+ // 255, 192, 128, 1 -> 255, 192, 128, 1 -> 255, 192, 128, 1
+ { creationAttributes: {premultipliedAlpha: false},
+ sentColor: [255, 192, 128, 1],
+ expectedColor: [255, 192, 128, 1],
+ errorRange: 0,
+ imageFormat: "image/png"
+ },
+ // If premultipliedAlpha is false and antialias is true then
+ // [texture] [canvas] [dataURL]
+ // 255, 192, 128, 1 -> 255, 192, 128, 1 -> 255, 192, 128, 1
+ { creationAttributes: {premultipliedAlpha: false, antialias: true},
+ sentColor: [255, 192, 128, 1],
+ expectedColor: [255, 192, 128, 1],
+ errorRange: 0,
+ imageFormat: "image/png"
+ },
+ // If premultipliedAlpha is false and antialias is false then
+ // [texture] [canvas] [texture]
+ // 255, 192, 128, 1 -> 255, 192, 128, 1 -> 255, 192, 128, 1
+ { creationAttributes: {premultipliedAlpha: false},
+ sentColor: [255, 192, 128, 1],
+ expectedColor: [255, 192, 128, 1],
+ errorRange: 0,
+ },
+ // If premultipliedAlpha is false and antialias is true then
+ // [texture] [canvas] [texture]
+ // 255, 192, 128, 1 -> 255, 192, 128, 1 -> 255, 192, 128, 1
+ { creationAttributes: {premultipliedAlpha: false, antialias: true},
+ sentColor: [255, 192, 128, 1],
+ expectedColor: [255, 192, 128, 1],
+ errorRange: 0,
+ },
+ // If premultipliedAlpha is false and antialias is false then
+ // [texture] [canvas] [dataURL]
+ // 255, 255, 255, 128 -> 255, 255, 255, 128 -> 128, 128, 128, 255
+ { creationAttributes: {premultipliedAlpha: false},
+ sentColor: [255, 255, 255, 128],
+ expectedColor: [128, 128, 128, 255],
+ errorRange: 2,
+ imageFormat: "image/jpeg"
+ },
+ // If premultipliedAlpha is false and antialias is true then
+ // [texture] [canvas] [dataURL]
+ // 255, 255, 255, 128 -> 255, 255, 255, 128 -> 128, 128, 128, 255
+ { creationAttributes: {premultipliedAlpha: false, antialias: true},
+ sentColor: [255, 255, 255, 128],
+ expectedColor: [128, 128, 128, 255],
+ errorRange: 2,
+ imageFormat: "image/jpeg"
+ },
+ // If premultipliedAlpha is true and antialias is false then
+ // [texture] [canvas] [dataURL]
+ // 128, 128, 128, 128 -> 255, 255, 255, 128 -> 128, 128, 128, 255
+ { creationAttributes: {},
+ sentColor: [128, 128, 128, 128],
+ expectedColor: [128, 128, 128, 255],
+ errorRange: 2,
+ imageFormat: "image/jpeg"
+ },
+ // If premultipliedAlpha is true and antialias is true then
+ // [texture] [canvas] [dataURL]
+ // 128, 128, 128, 128 -> 255, 255, 255, 128 -> 128, 128, 128, 255
+ { creationAttributes: {antialias: true},
+ sentColor: [128, 128, 128, 128],
+ expectedColor: [128, 128, 128, 255],
+ errorRange: 2,
+ imageFormat: "image/jpeg"
+ }
+];
+
+var g_count = 0;
+var gl;
+var canvas;
+var premultipliedAlpha;
+
+enableJSTestPreVerboseLogging();
+description("Test the WebGL premultipliedAlpha context creation flag.");
+doNextTest();
+function doNextTest() {
+ if (g_count < tests.length) {
+ var test = tests[g_count++];
+ canvas = document.createElement("canvas");
+ // Need to preserve drawing buffer to load it in a callback
+ test.creationAttributes.preserveDrawingBuffer = true;
+ gl = wtu.create3DContext(canvas, test.creationAttributes);
+ var premultipliedAlpha = test.creationAttributes.premultipliedAlpha != false;
+ var antialias = test.creationAttributes.antialias == true;
+ debug("")
+ debug("testing: premultipliedAlpha: " + premultipliedAlpha
+ + ", antialias: " + antialias
+ + ", imageFormat: " + test.imageFormat);
+
+ shouldBe('gl.getContextAttributes().premultipliedAlpha', premultipliedAlpha.toString());
+ shouldBeTrue('gl.getContextAttributes().preserveDrawingBuffer');
+
+ wtu.log(gl.getContextAttributes());
+ var program = wtu.setupTexturedQuad(gl);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+ var tex = gl.createTexture();
+ wtu.fillTexture(gl, tex, 2, 2, test.sentColor, 0);
+ var loc = gl.getUniformLocation(program, "tex");
+ gl.uniform1i(loc, 0);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from drawing.");
+
+ var loadTexture = function() {
+ debug("loadTexture called");
+ var pngTex = gl.createTexture();
+ // not needed as it's the default
+ // gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
+ gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);
+ gl.bindTexture(gl.TEXTURE_2D, pngTex);
+ if (test.imageFormat) {
+ // create texture from image
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this);
+ } else {
+ // create texture from canvas
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas);
+ }
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from creating copy.");
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from 2nd drawing.");
+ wtu.checkCanvas(
+ gl, test.expectedColor,
+ "should draw with " + test.expectedColor, test.errorRange);
+
+ doNextTest();
+ }
+
+ var loadTextureError = function() {
+ testFailed("Creating image from canvas failed. Image src: " + this.src);
+ finishTest();
+ }
+
+ var shrinkString = function(string) {
+ if (string.length < 63) {
+ return string;
+ }
+ return string.substr(0, 30) + "..." + string.substr(string.length - 30);
+ }
+
+ if (test.imageFormat) {
+ // Load canvas into string using toDataURL
+ debug("Calling canvas.toDataURL('" + test.imageFormat + "')");
+ var imageUrl = canvas.toDataURL(test.imageFormat);
+ debug("imageUrl = '" + shrinkString(imageUrl) + "'");
+ if (test.imageFormat != "image/png" &&
+ (imageUrl.indexOf("data:image/png,") == 0 ||
+ imageUrl.indexOf("data:image/png;") == 0)) {
+ debug("Image format " + test.imageFormat + " not supported; skipping");
+ setTimeout(doNextTest, 0);
+ } else {
+ // Load string into the texture
+ debug("Waiting for image.onload");
+ var input = wtu.makeImage(imageUrl, loadTexture, loadTextureError);
+ }
+ } else {
+ // Load canvas into the texture asynchronously (to prevent unbounded stack consumption)
+ debug("Waiting for setTimeout");
+ setTimeout(loadTexture, 0);
+ }
+ } else {
+ var successfullyParsed = true;
+ finishTest();
+ }
+}
+
+</script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resource-sharing-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resource-sharing-test.html
new file mode 100644
index 000000000..10f19562a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resource-sharing-test.html
@@ -0,0 +1,66 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>WebGL Resource Sharing.</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example1" width="2" height="2" style="width: 40px; height: 40px;"></canvas>
+<canvas id="example2" width="2" height="2" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("Tests that resources can not be shared.");
+debug("");
+
+var wtu = WebGLTestUtils;
+var gl1 = wtu.create3DContext("example1");
+var gl2 = wtu.create3DContext("example2");
+assertMsg(gl1 && gl2,
+ "Got 3d context.");
+
+var vertexObject = gl1.createBuffer();
+gl2.bindBuffer(gl2.ARRAY_BUFFER, vertexObject);
+assertMsg(
+ gl2.getError() == gl2.INVALID_OPERATION,
+ "attempt to use a resource from the wrong context should fail with INVALID_OPERATION");
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-child-with-worker.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-child-with-worker.html
new file mode 100644
index 000000000..f61e66a8e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-child-with-worker.html
@@ -0,0 +1,78 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html style="margin: 0; padding: 0;">
+ <head>
+<meta charset="utf-8">
+ <title>Simple WebGL context with Worker</title>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body style="margin: 0; padding: 0; overflow: hidden;">
+ <canvas id="c"
+ width="1680" height="1050"
+ style="width: 256px; height: 256px;"> <!-- scaled to fit page better -->
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ void main()
+ {
+ gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+ }
+ </script>
+
+ <script>
+ "use strict";
+ var wtu = WebGLTestUtils;
+ var myWorker = new Worker("context-release-worker.js");
+
+ var gl = wtu.create3DContext("c", { antialias: false });
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.75,0, -0.75,-0.75,0, 0.75,-0.75,0 ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ gl.clearColor(0.0, 0.0, 0.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+
+ if(parent) {
+ window.glContext = gl;
+ parent.postMessage("Ready", "*");
+ }
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-upon-reload-child.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-upon-reload-child.html
new file mode 100644
index 000000000..95ad1653f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-upon-reload-child.html
@@ -0,0 +1,77 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html style="margin: 0; padding: 0;">
+ <head>
+<meta charset="utf-8">
+ <title>Simple WebGL context</title>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body style="margin: 0; padding: 0; overflow: hidden;">
+ <canvas id="c"
+ width="1680" height="1050"
+ style="width: 256px; height: 256px;"> <!-- scaled to fit page better -->
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ void main()
+ {
+ gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+ }
+ </script>
+
+ <script>
+ "use strict";
+ var wtu = WebGLTestUtils;
+
+ var gl = wtu.create3DContext("c", { antialias: false });
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.75,0, -0.75,-0.75,0, 0.75,-0.75,0 ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ gl.clearColor(0.0, 0.0, 0.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+
+ if (parent) {
+ window.glContext = gl;
+ parent.postMessage("Ready", "*");
+ }
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-worker.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-worker.js
new file mode 100644
index 000000000..3680117c2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-worker.js
@@ -0,0 +1,4 @@
+// Simple worker used to provoke WebGL context release bugs on Chrome
+
+postMessage("Hello World");
+close(); \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/00_test_list.txt
new file mode 100644
index 000000000..49609cbaa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/00_test_list.txt
@@ -0,0 +1,34 @@
+--min-version 1.0.3 angle-instanced-arrays.html
+--min-version 1.0.3 angle-instanced-arrays-out-of-bounds.html
+--min-version 1.0.3 ext-blend-minmax.html
+--min-version 1.0.3 ext-frag-depth.html
+--min-version 1.0.3 ext-shader-texture-lod.html
+--min-version 1.0.3 ext-sRGB.html
+--min-version 1.0.2 ext-texture-filter-anisotropic.html
+--min-version 1.0.2 get-extension.html
+oes-standard-derivatives.html
+oes-texture-float-with-canvas.html
+oes-texture-float-with-image-data.html
+oes-texture-float-with-image.html
+oes-texture-float-with-video.html
+oes-texture-float.html
+oes-vertex-array-object.html
+--min-version 1.0.3 oes-vertex-array-object-bufferData.html
+--min-version 1.0.3 oes-texture-half-float.html
+--min-version 1.0.3 oes-texture-float-linear.html
+--min-version 1.0.3 oes-texture-half-float-linear.html
+--min-version 1.0.3 oes-texture-half-float-with-canvas.html
+--min-version 1.0.3 oes-texture-half-float-with-image-data.html
+--min-version 1.0.3 oes-texture-half-float-with-image.html
+--min-version 1.0.3 oes-texture-half-float-with-video.html
+--min-version 1.0.2 oes-element-index-uint.html
+webgl-debug-renderer-info.html
+webgl-debug-shaders.html
+--min-version 1.0.3 webgl-compressed-texture-atc.html
+--min-version 1.0.3 webgl-compressed-texture-pvrtc.html
+--min-version 1.0.2 webgl-compressed-texture-s3tc.html
+--min-version 1.0.3 webgl-compressed-texture-size-limit.html
+--min-version 1.0.2 webgl-depth-texture.html
+--min-version 1.0.3 webgl-draw-buffers.html
+--min-version 1.0.3 webgl-shared-resources.html
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html
new file mode 100644
index 000000000..bd9e71f0a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html
@@ -0,0 +1,79 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/out-of-bounds-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Test of drawArraysInstancedANGLE and drawElementsInstancedANGLE with out-of-bounds parameters");
+
+var wtu = WebGLTestUtils;
+
+var gl = wtu.create3DContext();
+var ext = wtu.getExtensionWithKnownPrefixes(gl, "ANGLE_instanced_arrays");
+if (!ext) {
+ testPassed("No ANGLE_instanced_arrays support -- this is legal");
+} else {
+ testPassed("Successfully enabled ANGLE_instanced_arrays extension");
+ debug("");
+ debug("Test with 1 instance without instanced attributes");
+ debug("");
+ OutOfBoundsTest.runDrawArraysTest("ext.drawArraysInstancedANGLE(gl.TRIANGLES, $(offset), $(count), 1)", gl, wtu, ext);
+ debug("");
+ OutOfBoundsTest.runDrawElementsTest("ext.drawElementsInstancedANGLE(gl.TRIANGLES, $(count), $(type), $(offset), 1)", gl, wtu, ext);
+ debug("");
+ debug("Test with 2 instances without instanced attributes");
+ debug("");
+ OutOfBoundsTest.runDrawArraysTest("ext.drawArraysInstancedANGLE(gl.TRIANGLES, $(offset), $(count), 2)", gl, wtu, ext);
+ debug("");
+ OutOfBoundsTest.runDrawElementsTest("ext.drawElementsInstancedANGLE(gl.TRIANGLES, $(count), $(type), $(offset), 2)", gl, wtu, ext);
+ debug("");
+ OutOfBoundsTest.runDrawArraysInstancedTest("ext.drawArraysInstancedANGLE(gl.TRIANGLES, $(offset), $(count), $(primcount))", gl, wtu, ext);
+ debug("");
+ OutOfBoundsTest.runDrawElementsInstancedTest("ext.drawElementsInstancedANGLE(gl.TRIANGLES, $(count), $(type), $(offset), $(primcount))", gl, wtu, ext);
+ debug("");
+}
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html
new file mode 100644
index 000000000..908e612a4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html
@@ -0,0 +1,422 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL ANGLE_instanced_arrays Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+<!-- Shaders for testing instanced draws -->
+<script id="outputVertexShader" type="x-shader/x-vertex">
+attribute vec4 aPosition;
+attribute vec2 aOffset;
+attribute vec4 aColor;
+varying vec4 vColor;
+void main() {
+ vColor = aColor;
+ gl_Position = aPosition + vec4(aOffset, 0.0, 0.0);
+}
+</script>
+
+<script id="outputFragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 vColor;
+void main() {
+ gl_FragColor = vColor;
+}
+</script>
+
+<script>
+"use strict";
+description("This test verifies the functionality of the ANGLE_instanced_arrays extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+
+var positionLoc = 0;
+var offsetLoc = 2;
+var colorLoc = 3;
+var program;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+ finishTest();
+} else {
+ testPassed("WebGL context exists");
+
+ runDivisorTestDisabled();
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = wtu.getExtensionWithKnownPrefixes(gl, "ANGLE_instanced_arrays");
+ if (!ext) {
+ testPassed("No ANGLE_instanced_arrays support -- this is legal");
+
+ runSupportedTest(false);
+ finishTest();
+ } else {
+ testPassed("Successfully enabled ANGLE_instanced_arrays extension");
+
+ runSupportedTest(true);
+
+ runDivisorTestEnabled();
+ runUniqueObjectTest();
+
+ setupCanvas();
+ runOutputTests();
+ runANGLECorruptionTest();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var supported = gl.getSupportedExtensions();
+ if (supported.indexOf("ANGLE_instanced_arrays") >= 0) {
+ if (extensionEnabled) {
+ testPassed("ANGLE_instanced_arrays listed as supported and getExtension succeeded");
+ } else {
+ testFailed("ANGLE_instanced_arrays listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("ANGLE_instanced_arrays not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("ANGLE_instanced_arrays not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runDivisorTestDisabled() {
+ debug("Testing VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE with extension disabled");
+
+ var VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
+
+ gl.getVertexAttrib(0, VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE should not be queryable if extension is disabled");
+}
+
+function runDivisorTestEnabled() {
+ debug("Testing VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE with extension enabled");
+
+ shouldBe("ext.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE", "0x88FE");
+
+ var max_vertex_attribs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);
+
+ for (var i = 0; i < max_vertex_attribs; ++i) {
+ var queried_value = gl.getVertexAttrib(i, ext.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE);
+ if(queried_value == 0){
+ testPassed("Vertex attribute " + i + " must has a default divisor of 0");
+ }
+ else{
+ testFailed("Default divisor of vertex attribute " + i + " should be: 0, returned value was: " + queried_value);
+ }
+ }
+
+ ext.vertexAttribDivisorANGLE(max_vertex_attribs, 2);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "vertexAttribDivisorANGLE index set greater than or equal to MAX_VERTEX_ATTRIBS should be an invalid value");
+
+ ext.vertexAttribDivisorANGLE(max_vertex_attribs-1, 2);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "vertexAttribDivisorANGLE index set less than MAX_VERTEX_ATTRIBS should succeed");
+
+ var queried_value = gl.getVertexAttrib(max_vertex_attribs-1, ext.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE);
+ if(queried_value == 2){
+ testPassed("Set value of VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE matches expecation");
+ }
+ else{
+ testFailed("Set value of VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE should be: 2, returned value was: " + queried_value);
+ }
+}
+
+function setupCanvas() {
+ canvas.width = 50; canvas.height = 50;
+ gl.viewport(0, 0, canvas.width, canvas.height);
+ gl.clearColor(0, 0, 0, 0);
+
+ program = wtu.setupProgram(gl, ["outputVertexShader", "outputFragmentShader"], ['aPosition', 'aOffset', 'aColor'], [positionLoc, offsetLoc, colorLoc]);
+}
+
+function runOutputTests() {
+ var instanceCount = 4;
+
+ debug("Testing various draws for valid built-in function behavior");
+
+ var offsets = new Float32Array([
+ -1.0, 1.0,
+ 1.0, 1.0,
+ -1.0, -1.0,
+ 1.0, -1.0,
+ ]);
+ var offsetBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, offsetBuffer);
+ gl.bufferData(gl.ARRAY_BUFFER, offsets, gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(offsetLoc);
+ gl.vertexAttribPointer(offsetLoc, 2, gl.FLOAT, false, 0, 0);
+ ext.vertexAttribDivisorANGLE(offsetLoc, 1);
+
+ var colors = new Float32Array([
+ 1.0, 0.0, 0.0, 1.0, // Red
+ 0.0, 1.0, 0.0, 1.0, // Green
+ 0.0, 0.0, 1.0, 1.0, // Blue
+ 1.0, 1.0, 0.0, 1.0, // Yellow
+ ]);
+ var colorBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
+ gl.bufferData(gl.ARRAY_BUFFER, colors, gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(colorLoc);
+ gl.vertexAttribPointer(colorLoc, 4, gl.FLOAT, false, 0, 0);
+ ext.vertexAttribDivisorANGLE(colorLoc, 1);
+
+ wtu.setupUnitQuad(gl, 0);
+
+ // Draw 1: Regular drawArrays
+ debug("");
+ debug("Testing drawArrays with non-zero divisor");
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "vertex attrib divisor should affect regular drawArrays when the extension is enabled");
+ wtu.checkCanvasRect(gl, 0, canvas.height/2, canvas.width/2, canvas.height/2, [255, 0, 0, 255]);
+
+ // Draw 2: Draw Non-indexed instances
+ debug("");
+ debug("Testing drawArraysInstancedANGLE");
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ // Test drawArraysInstancedANGLE error conditions
+ ext.drawArraysInstancedANGLE(gl.TRIANGLES, 0, 6, instanceCount);
+ wtu.checkCanvasRect(gl, 0, canvas.height/2, canvas.width/2, canvas.height/2, [255, 0, 0, 255]);
+ wtu.checkCanvasRect(gl, canvas.width/2, canvas.height/2, canvas.width/2, canvas.height/2, [0, 255, 0, 255]);
+ wtu.checkCanvasRect(gl, 0, 0, canvas.width/2, canvas.height/2, [0, 0, 255, 255]);
+ wtu.checkCanvasRect(gl, canvas.width/2, 0, canvas.width/2, canvas.height/2, [255, 255, 0, 255]);
+
+ ext.drawArraysInstancedANGLE(gl.TRIANGLES, 0, 6, -1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "drawArraysInstancedANGLE cannot have a primcount less than 0");
+
+ ext.drawArraysInstancedANGLE(gl.TRIANGLES, 0, -1, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "drawArraysInstancedANGLE cannot have a count less than 0");
+
+ ext.vertexAttribDivisorANGLE(positionLoc, 1);
+ ext.drawArraysInstancedANGLE(gl.TRIANGLES, 0, 6, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "There must be at least one vertex attribute with a divisor of zero when calling drawArraysInstancedANGLE");
+ ext.vertexAttribDivisorANGLE(positionLoc, 0);
+
+ ext.drawArraysInstancedANGLE(gl.POINTS, 0, 6, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawArraysInstancedANGLE with POINTS should succeed");
+ ext.drawArraysInstancedANGLE(gl.LINES, 0, 6, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawArraysInstancedANGLE with LINES should succeed");
+ ext.drawArraysInstancedANGLE(gl.LINE_LIST, 0, 6, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawArraysInstancedANGLE with LINE_LIST should return succeed");
+ ext.drawArraysInstancedANGLE(gl.TRIANGLE_LIST, 0, 6, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawArraysInstancedANGLE with TRIANGLE_LIST should succeed");
+
+ ext.drawArraysInstancedANGLE(desktopGL['QUAD_STRIP'], 0, 6, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "drawArraysInstancedANGLE with QUAD_STRIP should return INVALID_ENUM");
+ ext.drawArraysInstancedANGLE(desktopGL['QUADS'], 0, 6, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "drawArraysInstancedANGLE with QUADS should return INVALID_ENUM");
+ ext.drawArraysInstancedANGLE(desktopGL['POLYGON'], 0, 6, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "drawArraysInstancedANGLE with POLYGON should return INVALID_ENUM");
+
+ wtu.setupIndexedQuad(gl, 1, 0);
+
+ // Draw 3: Regular drawElements
+ debug("");
+ debug("Testing drawElements with non-zero divisor");
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ // Point to another location in the buffer so that the draw would overflow without the divisor
+ gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
+ gl.vertexAttribPointer(colorLoc, 4, gl.FLOAT, false, 0, 48);
+ gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "vertex attrib divisor should affect regular drawElements when the extension is enabled");
+ wtu.checkCanvasRect(gl, 0, canvas.height/2, canvas.width/2, canvas.height/2, [255, 255, 0, 255]);
+ // Restore the vertex attrib pointer
+ gl.vertexAttribPointer(colorLoc, 4, gl.FLOAT, false, 0, 0);
+
+ // Draw 4: Draw indexed instances
+ debug("");
+ debug("Testing drawElementsInstancedANGLE");
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ ext.drawElementsInstancedANGLE(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0, instanceCount);
+ wtu.checkCanvasRect(gl, 0, canvas.height/2, canvas.width/2, canvas.height/2, [255, 0, 0, 255]);
+ wtu.checkCanvasRect(gl, canvas.width/2, canvas.height/2, canvas.width/2, canvas.height/2, [0, 255, 0, 255]);
+ wtu.checkCanvasRect(gl, 0, 0, canvas.width/2, canvas.height/2, [0, 0, 255, 255]);
+ wtu.checkCanvasRect(gl, canvas.width/2, 0, canvas.width/2, canvas.height/2, [255, 255, 0, 255]);
+
+ // Test drawElementsInstancedANGLE error conditions
+ ext.drawElementsInstancedANGLE(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0, -1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "drawElementsInstancedANGLE cannot have a primcount less than 0");
+
+ ext.drawElementsInstancedANGLE(gl.TRIANGLES, -1, gl.UNSIGNED_SHORT, 0, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "drawElementsInstancedANGLE cannot have a count less than 0");
+
+ ext.vertexAttribDivisorANGLE(positionLoc, 1);
+ ext.drawElementsInstancedANGLE(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "There must be at least one vertex attribute with a divisor of zero when calling drawElementsInstancedANGLE");
+ ext.vertexAttribDivisorANGLE(positionLoc, 0);
+
+ ext.drawElementsInstancedANGLE(gl.TRIANGLES, 6, gl.UNSIGNED_BYTE, 0, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawElementsInstancedANGLE with UNSIGNED_BYTE should succeed");
+
+ ext.drawElementsInstancedANGLE(gl.POINTS, 6, gl.UNSIGNED_SHORT, 0, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawElementsInstancedANGLE with POINTS should succeed");
+ ext.drawElementsInstancedANGLE(gl.LINES, 6, gl.UNSIGNED_SHORT, 0, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawElementsInstancedANGLE with LINES should succeed");
+ ext.drawElementsInstancedANGLE(gl.LINE_LIST, 6, gl.UNSIGNED_SHORT, 0, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawElementsInstancedANGLE with LINE_LIST should return succeed");
+ ext.drawElementsInstancedANGLE(gl.TRIANGLE_LIST, 6, gl.UNSIGNED_SHORT, 0, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawElementsInstancedANGLE with TRIANGLE_LIST should succeed");
+
+ ext.drawElementsInstancedANGLE(desktopGL['QUAD_STRIP'], 6, gl.UNSIGNED_SHORT, 0, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "drawElementsInstancedANGLE with QUAD_STRIP should return INVALID_ENUM");
+ ext.drawElementsInstancedANGLE(desktopGL['QUADS'], 6, gl.UNSIGNED_SHORT, 0, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "drawElementsInstancedANGLE with QUADS should return INVALID_ENUM");
+ ext.drawElementsInstancedANGLE(desktopGL['POLYGON'], 6, gl.UNSIGNED_SHORT, 0, instanceCount);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "drawElementsInstancedANGLE with POLYGON should return INVALID_ENUM");
+}
+
+function runUniqueObjectTest()
+{
+ debug("");
+ debug("Testing that getExtension() returns the same object each time");
+ gl.getExtension("ANGLE_instanced_arrays").myProperty = 2;
+ gc();
+ shouldBe('gl.getExtension("ANGLE_instanced_arrays").myProperty', '2');
+}
+
+function runANGLECorruptionTest()
+{
+ debug("")
+ debug("Testing to ensure that rendering isn't corrupt due to an ANGLE bug");
+ // See: https://code.google.com/p/angleproject/issues/detail?id=467
+
+ var tolerance = 2; // Amount of variance to allow in result pixels - may need to be tweaked higher
+ var instanceCount = 10; // Must be higher than 6
+ var iteration = 0;
+ var totalIterations = 10;
+
+ var offsets = new Float32Array([
+ 0.0, 0.0,
+ 0.2, 0.0,
+ 0.4, 0.0,
+ 0.6, 0.0,
+ 0.8, 0.0,
+ 1.0, 0.0,
+ 1.2, 0.0,
+ 1.4, 0.0,
+ 1.6, 0.0,
+ 1.8, 0.0,
+ ]);
+ var offsetBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, offsetBuffer);
+ gl.bufferData(gl.ARRAY_BUFFER, offsets.byteLength * 2, gl.STATIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, offsets);
+ gl.enableVertexAttribArray(offsetLoc);
+ gl.vertexAttribPointer(offsetLoc, 2, gl.FLOAT, false, 0, 0);
+ ext.vertexAttribDivisorANGLE(offsetLoc, 1);
+
+ var colors = new Float32Array([
+ 1.0, 0.0, 0.0, 1.0,
+ 1.0, 1.0, 0.0, 1.0,
+ 0.0, 1.0, 0.0, 1.0,
+ 0.0, 1.0, 1.0, 1.0,
+ 0.0, 0.0, 1.0, 1.0,
+ 1.0, 0.0, 1.0, 1.0,
+ 1.0, 0.0, 0.0, 1.0,
+ 1.0, 1.0, 0.0, 1.0,
+ 0.0, 1.0, 0.0, 1.0,
+ 0.0, 1.0, 1.0, 1.0,
+ ]);
+ var colorBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
+ gl.bufferData(gl.ARRAY_BUFFER, colors.byteLength * 2, gl.STATIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, colors);
+ gl.enableVertexAttribArray(colorLoc);
+ gl.vertexAttribPointer(colorLoc, 4, gl.FLOAT, false, 0, 0);
+ ext.vertexAttribDivisorANGLE(colorLoc, 1);
+
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.setupUnitQuad(gl, 0);
+
+ function cycleAndTest() {
+ // Update the instanced data buffers outside the accessed range.
+ // This, plus rendering more instances than vertices, triggers the bug.
+ var nullData = new Float32Array(offsets.length);
+ gl.bindBuffer(gl.ARRAY_BUFFER, offsetBuffer);
+ gl.bufferSubData(gl.ARRAY_BUFFER, offsets.byteLength, nullData);
+
+ nullData = new Float32Array(colors.length);
+ gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
+ gl.bufferSubData(gl.ARRAY_BUFFER, colors.byteLength, nullData);
+
+ ext.drawArraysInstancedANGLE(gl.TRIANGLES, 0, 6, instanceCount);
+
+ // Make sure each color was drawn correctly
+ var i;
+ var passed = true;
+ for (i = 0; i < instanceCount; ++i) {
+ var w = canvas.width / instanceCount;
+ var x = w * i;
+ var color = [colors[(i*4)] * 255, colors[(i*4)+1] * 255, colors[(i*4)+2] * 255, 255]
+
+ wtu.checkCanvasRectColor(
+ gl, x, 0, w, canvas.height, color, tolerance,
+ function() {},
+ function() {
+ passed = false;
+ }, debug);
+ }
+
+ if (passed) {
+ testPassed("Passed test " + iteration + " of " + totalIterations);
+ if (iteration < totalIterations) {
+ ++iteration;
+ setTimeout(cycleAndTest, 0);
+ } else {
+ finishTest();
+ }
+ } else {
+ testFailed("Failed test " + iteration + " of " + totalIterations);
+ finishTest();
+ }
+ }
+
+ cycleAndTest();
+}
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-blend-minmax.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-blend-minmax.html
new file mode 100644
index 000000000..120d24098
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-blend-minmax.html
@@ -0,0 +1,247 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL EXT_blend_minmax Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+<!-- Shaders to test output -->
+<script id="outputVertexShader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main() {
+ gl_Position = vPosition;
+}
+</script>
+<script id="outputFragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+uniform vec4 uColor;
+void main() {
+ gl_FragColor = uColor;
+}
+</script>
+
+<script>
+"use strict";
+description("This test verifies the functionality of the EXT_blend_minmax extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+
+// Use the constant directly when we don't have the extension
+var MIN_EXT = 0x8007;
+var MAX_EXT = 0x8008;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ runBlendTestDisabled();
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = wtu.getExtensionWithKnownPrefixes(gl, "EXT_blend_minmax");
+ if (!ext) {
+ testPassed("No EXT_blend_minmax support -- this is legal");
+
+ runSupportedTest(false);
+ } else {
+ debug("");
+ testPassed("Successfully enabled EXT_blend_minmax extension");
+
+ runSupportedTest(true);
+
+ runBlendTestEnabled();
+ runOutputTests();
+ runUniqueObjectTest();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var supported = gl.getSupportedExtensions();
+ if (supported.indexOf("EXT_blend_minmax") >= 0) {
+ if (extensionEnabled) {
+ testPassed("EXT_blend_minmax listed as supported and getExtension succeeded");
+ } else {
+ testFailed("EXT_blend_minmax listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("EXT_blend_minmax not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("EXT_blend_minmax not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runBlendTestDisabled() {
+ debug("");
+ debug("Testing blending enums with extension disabled");
+
+ // Set the blend equation to a known-good enum first
+ gl.blendEquation(gl.FUNC_ADD);
+
+ wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.blendEquation(MIN_EXT)");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION)", "gl.FUNC_ADD");
+
+ wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.blendEquation(MAX_EXT)");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION)", "gl.FUNC_ADD");
+
+ wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.blendEquationSeparate(MIN_EXT, gl.FUNC_ADD)");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION_RGB)", "gl.FUNC_ADD");
+
+ wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.blendEquationSeparate(gl.FUNC_ADD, MIN_EXT)");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION_ALPHA)", "gl.FUNC_ADD");
+
+ wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.blendEquationSeparate(MAX_EXT, gl.FUNC_ADD)");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION_RGB)", "gl.FUNC_ADD");
+
+ wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.blendEquationSeparate(gl.FUNC_ADD, MAX_EXT)");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION_ALPHA)", "gl.FUNC_ADD");
+}
+
+function runBlendTestEnabled() {
+ debug("");
+ debug("Testing blending enums with extension enabled");
+
+ shouldBe("ext.MIN_EXT", "0x8007");
+ shouldBe("ext.MAX_EXT", "0x8008");
+
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.blendEquation(ext.MIN_EXT)");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION)", "ext.MIN_EXT");
+
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.blendEquation(ext.MAX_EXT)");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION)", "ext.MAX_EXT");
+
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.blendEquationSeparate(ext.MIN_EXT, gl.FUNC_ADD)");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION_RGB)", "ext.MIN_EXT");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION_ALPHA)", "gl.FUNC_ADD");
+
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.blendEquationSeparate(gl.FUNC_ADD, ext.MIN_EXT)");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION_RGB)", "gl.FUNC_ADD");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION_ALPHA)", "ext.MIN_EXT");
+
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.blendEquationSeparate(ext.MAX_EXT, gl.FUNC_ADD)");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION_RGB)", "ext.MAX_EXT");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION_ALPHA)", "gl.FUNC_ADD");
+
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.blendEquationSeparate(gl.FUNC_ADD, ext.MAX_EXT)");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION_RGB)", "gl.FUNC_ADD");
+ shouldBe("gl.getParameter(gl.BLEND_EQUATION_ALPHA)", "ext.MAX_EXT");
+}
+
+function runOutputTests() {
+ var e = 2; // Amount of variance to allow in result pixels - may need to be tweaked higher
+
+ debug("");
+ debug("Testing various draws for valid blending behavior");
+
+ canvas.width = 50; canvas.height = 50;
+ gl.viewport(0, 0, canvas.width, canvas.height);
+ gl.enable(gl.BLEND);
+ gl.blendFunc(gl.ONE, gl.ONE);
+
+ var program = wtu.setupProgram(gl, ["outputVertexShader", "outputFragmentShader"], ['vPosition'], [0]);
+ var quadParameters = wtu.setupUnitQuad(gl, 0, 1);
+ var colorUniform = gl.getUniformLocation(program, "uColor");
+
+
+ // Draw 1
+ gl.blendEquation(ext.MIN_EXT);
+
+ gl.clearColor(0.2, 0.4, 0.6, 0.8);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ gl.uniform4f(colorUniform, 0.8, 0.6, 0.4, 0.2);
+ wtu.drawUnitQuad(gl);
+
+ wtu.checkCanvasRect(gl, 0, 0, canvas.width, canvas.height, [51, 102, 102, 51]);
+
+ // Draw 2:
+ gl.blendEquation(ext.MAX_EXT);
+
+ gl.clearColor(0.2, 0.4, 0.6, 0.8);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ gl.uniform4f(colorUniform, 0.8, 0.6, 0.4, 0.2);
+ wtu.drawUnitQuad(gl);
+
+ wtu.checkCanvasRect(gl, 0, 0, canvas.width, canvas.height, [204, 153, 153, 204]);
+
+ // Draw 3
+ gl.blendEquationSeparate(ext.MIN_EXT, ext.MAX_EXT);
+
+ gl.clearColor(0.2, 0.4, 0.6, 0.8);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ gl.uniform4f(colorUniform, 0.8, 0.6, 0.4, 0.2);
+ wtu.drawUnitQuad(gl);
+
+ wtu.checkCanvasRect(gl, 0, 0, canvas.width, canvas.height, [51, 102, 102, 204]);
+
+ // Draw 4
+ gl.blendEquationSeparate(ext.MAX_EXT, ext.MIN_EXT);
+
+ gl.clearColor(0.2, 0.4, 0.6, 0.8);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ gl.uniform4f(colorUniform, 0.8, 0.6, 0.4, 0.2);
+ wtu.drawUnitQuad(gl);
+
+ wtu.checkCanvasRect(gl, 0, 0, canvas.width, canvas.height, [204, 153, 153, 51]);
+}
+
+function runUniqueObjectTest()
+{
+ debug("");
+ debug("Testing that getExtension() returns the same object each time");
+ gl.getExtension("EXT_blend_minmax").myProperty = 2;
+ gc();
+ shouldBe('gl.getExtension("EXT_blend_minmax").myProperty', '2');
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html
new file mode 100644
index 000000000..788548415
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html
@@ -0,0 +1,243 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL EXT_frag_depth Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+<!-- Shaders for testing fragment depth writing -->
+
+<!-- Shader omitting the required #extension pragma -->
+<script id="missingPragmaFragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+void main() {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+ gl_FragDepthEXT = 1.0;
+}
+</script>
+
+<!-- Shader to test macro definition -->
+<script id="macroFragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+void main() {
+#ifdef GL_EXT_frag_depth
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+#else
+ // Error expected
+ #error no GL_EXT_frag_depth;
+#endif
+}
+</script>
+
+<!-- Shader with required #extension pragma -->
+<script id="testFragmentShader" type="x-shader/x-fragment">
+#extension GL_EXT_frag_depth : enable
+precision mediump float;
+void main() {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+ gl_FragDepthEXT = 1.0;
+}
+</script>
+<!-- Shaders to link with test fragment shaders -->
+<script id="goodVertexShader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main() {
+ gl_Position = vPosition;
+}
+</script>
+<!-- Shaders to test output -->
+<script id="outputVertexShader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main() {
+ gl_Position = vPosition;
+}
+</script>
+<script id="outputFragmentShader" type="x-shader/x-fragment">
+#extension GL_EXT_frag_depth : enable
+precision mediump float;
+uniform float uDepth;
+void main() {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+ gl_FragDepthEXT = uDepth;
+}
+</script>
+
+<script>
+"use strict";
+description("This test verifies the functionality of the EXT_frag_depth extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ runShaderTests(false);
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = wtu.getExtensionWithKnownPrefixes(gl, "EXT_frag_depth");
+ if (!ext) {
+ testPassed("No EXT_frag_depth support -- this is legal");
+
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled EXT_frag_depth extension");
+
+ runSupportedTest(true);
+
+ runShaderTests(true);
+ runOutputTests();
+ runUniqueObjectTest();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var supported = gl.getSupportedExtensions();
+ if (supported.indexOf("EXT_frag_depth") >= 0) {
+ if (extensionEnabled) {
+ testPassed("EXT_frag_depth listed as supported and getExtension succeeded");
+ } else {
+ testFailed("EXT_frag_depth listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("EXT_frag_depth not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("EXT_frag_depth not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runShaderTests(extensionEnabled) {
+ debug("");
+ debug("Testing various shader compiles with extension " + (extensionEnabled ? "enabled" : "disabled"));
+
+ // Expect the macro shader to succeed ONLY if enabled
+ var macroFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, "goodVertexShader", "macroFragmentShader");
+ if (extensionEnabled) {
+ if (macroFragmentProgram) {
+ // Expected result
+ testPassed("GL_EXT_frag_depth defined in shaders when extension is enabled");
+ } else {
+ testFailed("GL_EXT_frag_depth not defined in shaders when extension is enabled");
+ }
+ } else {
+ if (macroFragmentProgram) {
+ testFailed("GL_EXT_frag_depth defined in shaders when extension is disabled");
+ } else {
+ testPassed("GL_EXT_frag_depth not defined in shaders when extension disabled");
+ }
+ }
+
+ // Always expect the shader missing the #pragma to fail (whether enabled or not)
+ var missingPragmaFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, "goodVertexShader", "missingPragmaFragmentShader");
+ if (missingPragmaFragmentProgram) {
+ testFailed("Shader built-ins allowed without #extension pragma");
+ } else {
+ testPassed("Shader built-ins disallowed without #extension pragma");
+ }
+
+ // Try to compile a shader using the built-ins that should only succeed if enabled
+ var testFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, "goodVertexShader", "testFragmentShader");
+ if (extensionEnabled) {
+ if (testFragmentProgram) {
+ testPassed("Shader built-ins compiled successfully when extension enabled");
+ } else {
+ testFailed("Shader built-ins failed to compile when extension enabled");
+ }
+ } else {
+ if (testFragmentProgram) {
+ testFailed("Shader built-ins compiled successfully when extension disabled");
+ } else {
+ testPassed("Shader built-ins failed to compile when extension disabled");
+ }
+ }
+}
+
+function runOutputTests() {
+ var e = 2; // Amount of variance to allow in result pixels - may need to be tweaked higher
+
+ debug("Testing various draws for valid built-in function behavior");
+
+ canvas.width = 50; canvas.height = 50;
+ gl.viewport(0, 0, canvas.width, canvas.height);
+
+ // Enable depth testing with a clearDepth of 0.5
+ // This makes it so that fragments are only rendered when
+ // gl_fragDepthEXT is < 0.5
+ gl.clearDepth(0.5);
+ gl.enable(gl.DEPTH_TEST);
+
+ var positionLoc = 0;
+ var texcoordLoc = 1;
+ var program = wtu.setupProgram(gl, ["outputVertexShader", "outputFragmentShader"], ['vPosition'], [0]);
+ var quadParameters = wtu.setupUnitQuad(gl, 0, 1);
+ var depthUniform = gl.getUniformLocation(program, "uDepth");
+
+ // Draw 1: Greater than clear depth
+ gl.uniform1f(depthUniform, 1.0);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvasRect(gl, 0, 0, canvas.width, canvas.height, [255, 255, 255, 255]);
+
+ // Draw 2: Less than clear depth
+ gl.uniform1f(depthUniform, 0.0);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvasRect(gl, 0, 0, canvas.width, canvas.height, [255, 0, 0, 255]);
+}
+
+function runUniqueObjectTest()
+{
+ debug("Testing that getExtension() returns the same object each time");
+ gl.getExtension("EXT_frag_depth").myProperty = 2;
+ gc();
+ shouldBe('gl.getExtension("EXT_frag_depth").myProperty', '2');
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html
new file mode 100644
index 000000000..a1da0ffd7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html
@@ -0,0 +1,413 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="16" height="16" style="width: 50px; height: 50px; border: 1px solid black;"></canvas>
+
+<!-- Shaders to test output -->
+<script id="vertexShader" type="x-shader/x-vertex">
+attribute vec4 aPosition;
+void main() {
+ gl_Position = aPosition;
+}
+</script>
+
+<script id="fragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+uniform float uColor;
+void main() {
+ gl_FragColor = vec4(uColor, uColor, uColor, 1);
+}
+</script>
+
+<script>
+"use strict";
+
+var wtu = WebGLTestUtils;
+var canvas;
+var gl;
+var ext = null;
+
+var extConstants = {
+ "SRGB_EXT": 0x8C40,
+ "SRGB_ALPHA_EXT": 0x8C42,
+ "SRGB8_ALPHA8_EXT": 0x8C43,
+ "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT": 0x8210
+};
+
+function getExtension() {
+ ext = gl.getExtension("EXT_sRGB");
+}
+
+function listsExtension() {
+ var supported = gl.getSupportedExtensions();
+ return (supported.indexOf("EXT_sRGB") >= 0);
+}
+
+function toVec3String(val) {
+ if (typeof(val) == 'number') {
+ return toVec3String([val, val, val]);
+ }
+ return '[' + val[0] + ', ' + val[1] + ', ' + val[2] + ']';
+}
+
+var e = 2; // Amount of variance to allow in result pixels - may need to be tweaked higher
+
+function expectResult(target) {
+ wtu.checkCanvasRect(gl,
+ Math.floor(gl.drawingBufferWidth / 2),
+ Math.floor(gl.drawingBufferHeight / 2),
+ 1,
+ 1,
+ target,
+ undefined,
+ e);
+}
+
+function createGreysRGBTexture(gl, color, format) {
+ var numPixels = gl.drawingBufferWidth * gl.drawingBufferHeight;
+ var elements;
+ switch (format) {
+ case ext.SRGB_EXT: elements = 3; break;
+ case ext.SRGB_ALPHA_EXT: elements = 4; break;
+ default: return null;
+ }
+
+ var size = numPixels * elements;
+ var buf = new Uint8Array(size);
+ for (var ii = 0; ii < numPixels; ++ii) {
+ var off = ii * elements;
+ buf[off + 0] = color;
+ buf[off + 1] = color;
+ buf[off + 2] = color;
+ if (format == ext.SRGB_ALPHA_EXT) {
+ buf[off + 3] = 255;
+ }
+ }
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D,
+ 0,
+ format,
+ gl.drawingBufferWidth,
+ gl.drawingBufferHeight,
+ 0,
+ format,
+ gl.UNSIGNED_BYTE,
+ buf);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ return tex;
+}
+
+function testValidFormat(fn, internalFormat, formatName, enabled) {
+ if (enabled) {
+ fn(internalFormat);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "was able to create type " + formatName);
+ } else {
+ testInvalidFormat(fn, internalFormat, formatName, enabled);
+ }
+}
+
+function testInvalidFormat(fn, internalFormat, formatName, enabled) {
+ fn(internalFormat);
+ var err = gl.getError();
+ if (err == gl.NO_ERROR) {
+ testFailed("should NOT be able to create type " + formatName);
+ } else if (err == gl.INVALID_OPERATION) {
+ testFailed("should return gl.INVALID_ENUM for type " + formatName);
+ } else if (err == gl.INVALID_ENUM) {
+ testPassed("not able to create invalid format: " + formatName);
+ }
+}
+
+var textureFormatFixture = {
+ desc: "Checking texture formats",
+ create: function(format) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D,
+ 0, // level
+ format, // internalFormat
+ gl.drawingBufferWidth, // width
+ gl.drawingBufferHeight, // height
+ 0, // border
+ format, // format
+ gl.UNSIGNED_BYTE, // type
+ null); // data
+ },
+ tests: [
+ {
+ desc: "Checking valid formats",
+ fn: testValidFormat,
+ formats: [ 'SRGB_EXT', 'SRGB_ALPHA_EXT' ]
+ },
+ {
+ desc: "Checking invalid formats",
+ fn: testInvalidFormat,
+ formats: [ 'SRGB8_ALPHA8_EXT' ]
+ }
+ ]
+};
+
+var renderbufferFormatFixture = {
+ desc: "Checking renderbuffer formats",
+ create: function(format) {
+ var rbo = gl.createRenderbuffer();
+ gl.bindRenderbuffer(gl.RENDERBUFFER, rbo);
+ gl.renderbufferStorage(gl.RENDERBUFFER,
+ format,
+ gl.drawingBufferWidth,
+ gl.drawingBufferHeight);
+ },
+ tests: [
+ {
+ desc: "Checking valid formats",
+ fn: testValidFormat,
+ formats: [ 'SRGB8_ALPHA8_EXT' ]
+ },
+ {
+ desc: "Checking invalid formats",
+ fn: testInvalidFormat,
+ formats: [ 'SRGB_EXT', 'SRGB_ALPHA_EXT' ]
+ }
+ ]
+};
+
+
+description("Test sRGB texture support");
+
+debug("");
+debug("Canvas.getContext");
+
+canvas = document.getElementById("canvas");
+gl = wtu.create3DContext(canvas);
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking sRGB texture support with extension disabled");
+
+ runFormatTest(textureFormatFixture, false);
+ runFormatTest(renderbufferFormatFixture, false);
+
+ debug("");
+ debug("Checking sRGB texture support");
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = gl.getExtension("EXT_sRGB");
+
+ if (!ext) {
+ testPassed("No EXT_sRGB support -- this is legal");
+
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled EXT_sRGB extension");
+
+ runSupportedTest(true);
+
+ gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
+
+ runConstantsTest();
+ runFormatTest(textureFormatFixture, true);
+ runFormatTest(renderbufferFormatFixture, true);
+ runTextureReadConversionTest();
+ runFramebufferTextureConversionTest(ext.SRGB_EXT);
+ runFramebufferTextureConversionTest(ext.SRGB_ALPHA_EXT);
+ runFramebufferRenderbufferConversionTest();
+ }
+}
+
+function runConstantsTest() {
+ debug("");
+ debug("Checking extension constants values");
+
+ for (var constant in extConstants) {
+ if (constant in ext) {
+ if (extConstants[constant] != ext[constant]) {
+ testFailed("Value of " + constant + " should be: " + extConstants[constant] + ", was: " + ext[constant]);
+ } else {
+ testPassed("Value of " + constant + " was expected value: " + extConstants[constant]);
+ }
+ } else {
+ testFailed(constant + " not found in extension object");
+ }
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ if (listsExtension()) {
+ if (extensionEnabled) {
+ testPassed("EXT_sRGB listed as supported and getExtension succeeded");
+ } else {
+ testFailed("EXT_sRGB listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("EXT_sRGB not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("EXT_sRGB not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runFormatTest(fixture, enabled) {
+ debug("");
+ debug(fixture.desc);
+
+ for (var tt = 0; tt < fixture.tests.length; ++tt) {
+ var test = fixture.tests[tt];
+ debug(test.desc);
+
+ for (var ii = 0; ii < test.formats.length; ++ii) {
+ var formatName = test.formats[ii];
+ test.fn(fixture.create, extConstants[formatName], "ext." + formatName, enabled);
+ }
+
+ if (tt != fixture.tests.length - 1)
+ debug("");
+ }
+}
+
+function runTextureReadConversionTest() {
+ debug("");
+ debug("Test the conversion of colors from sRGB to linear on texture read");
+
+ // Draw
+ var conversions = [
+ [ 0, 0 ],
+ [ 63, 13 ],
+ [ 127, 54 ],
+ [ 191, 133 ],
+ [ 255, 255 ]
+ ];
+
+ var program = wtu.setupTexturedQuad(gl);
+ gl.uniform1i(gl.getUniformLocation(program, "tex2d"), 0);
+
+ for (var ii = 0; ii < conversions.length; ii++) {
+ var tex = createGreysRGBTexture(gl, conversions[ii][0], ext.SRGB_EXT);
+ wtu.drawUnitQuad(gl);
+ expectResult(conversions[ii][1]);
+ }
+}
+
+function runFramebufferTextureConversionTest(format) {
+ var formatString;
+ var validFormat;
+ switch (format) {
+ case ext.SRGB_EXT: formatString = "sRGB"; validFormat = false; break;
+ case ext.SRGB_ALPHA_EXT: formatString = "sRGB_ALPHA"; validFormat = true; break;
+ default: return null;
+ }
+ debug("");
+ debug("Test " + formatString + " framebuffer attachments." + (validFormat ? "" : " (Invalid)"));
+
+ var program = wtu.setupProgram(gl, ['vertexShader', 'fragmentShader'], ['aPosition'], [0]);
+ var tex = createGreysRGBTexture(gl, 0, format);
+ var fbo = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ shouldBe('gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT)', 'ext.SRGB_EXT');
+
+ if (validFormat) {
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+
+ debug("");
+ debug("Test the conversion of colors from linear to " + formatString + " on framebuffer (texture) write");
+
+ // Draw
+ var conversions = [
+ [ 0, 0 ],
+ [ 13, 63 ],
+ [ 54, 127 ],
+ [ 133, 191 ],
+ [ 255, 255 ]
+ ];
+
+ wtu.setupUnitQuad(gl, 0);
+
+ for (var ii = 0; ii < conversions.length; ii++) {
+ gl.uniform1f(gl.getUniformLocation(program, "uColor"), conversions[ii][0]/255.0);
+ wtu.drawUnitQuad(gl, [0, 0, 0, 0]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ expectResult(conversions[ii][1]);
+ }
+ } else {
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT");
+
+ wtu.setupUnitQuad(gl, 0);
+ gl.uniform1f(gl.getUniformLocation(program, "uColor"), 0.5);
+ wtu.drawUnitQuad(gl, [0, 0, 0, 0]);
+ wtu.glErrorShouldBe(gl, gl.INVALID_FRAMEBUFFER_OPERATION);
+ }
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+}
+
+function runFramebufferRenderbufferConversionTest() {
+ debug("");
+ debug("Test the conversion of colors from linear to sRGB on framebuffer (renderbuffer) write");
+
+ function createsRGBFramebuffer(gl, width, height) {
+ var rbo = gl.createRenderbuffer();
+ gl.bindRenderbuffer(gl.RENDERBUFFER, rbo);
+ gl.renderbufferStorage(gl.RENDERBUFFER, ext.SRGB8_ALPHA8_EXT, width, height);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ var fbo = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0,
+ gl.RENDERBUFFER, rbo);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ shouldBe('gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, ext.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT)', 'ext.SRGB_EXT');
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+
+ return fbo;
+ }
+
+ // Draw
+ var conversions = [
+ [ 0, 0 ],
+ [ 13, 63 ],
+ [ 54, 127 ],
+ [ 133, 191 ],
+ [ 255, 255 ]
+ ];
+
+ var program = wtu.setupProgram(gl, ['vertexShader', 'fragmentShader'], ['aPosition'], [0]);
+ wtu.setupUnitQuad(gl, 0);
+ var fbo = createsRGBFramebuffer(gl, 4, 4);
+
+ for (var ii = 0; ii < conversions.length; ii++) {
+ gl.uniform1f(gl.getUniformLocation(program, "uColor"), conversions[ii][0]/255.0);
+ wtu.drawUnitQuad(gl, [0, 0, 0, 0]);
+ expectResult(conversions[ii][1]);
+ }
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script>finishTest();</script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-shader-texture-lod.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-shader-texture-lod.html
new file mode 100644
index 000000000..e63a22ed5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-shader-texture-lod.html
@@ -0,0 +1,293 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL EXT_shader_texture_lod Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+<!-- Shaders for testing texture LOD functions -->
+
+<!-- Shader omitting the required #extension pragma -->
+<script id="missingPragmaFragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec2 texCoord0v;
+void main() {
+ vec4 color = texture2DLodEXT(tex, texCoord0v, lod);
+ gl_FragColor = vec4(dx, dy, w, 1.0);
+}
+</script>
+
+<!-- Shader to test macro definition -->
+<script id="macroFragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+void main() {
+#ifdef GL_EXT_shader_texture_lod
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
+#else
+ // Error expected
+ #error no GL_EXT_shader_texture_lod;
+#endif
+}
+</script>
+
+<!-- Shader with required #extension pragma -->
+<script id="testFragmentShader" type="x-shader/x-fragment">
+#extension GL_EXT_shader_texture_lod : enable
+precision mediump float;
+varying vec2 texCoord0v;
+uniform float lod;
+uniform sampler2D tex;
+void main() {
+ vec4 color = texture2DLodEXT(tex, texCoord0v, lod);
+ gl_FragColor = color;
+}
+</script>
+
+<!-- Shaders to link with test fragment shaders -->
+<script id="goodVertexShader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord0v;
+void main() {
+ texCoord0v = texCoord0;
+ gl_Position = vPosition;
+}
+</script>
+
+<!-- Shaders to test output -->
+<script id="outputVertexShader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord0v;
+void main() {
+ texCoord0v = texCoord0;
+ gl_Position = vPosition;
+}
+</script>
+<script id="outputFragmentShader" type="x-shader/x-fragment">
+#extension GL_EXT_shader_texture_lod : require
+precision mediump float;
+varying vec2 texCoord0v;
+uniform float lod;
+uniform sampler2D tex;
+void main() {
+ vec4 color = texture2DLodEXT(tex, texCoord0v, lod);
+ gl_FragColor = color;
+}
+</script>
+
+<script>
+description("This test verifies the functionality of the EXT_shader_texture_lod extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+canvas.width = 256; canvas.height = 256;
+
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Run tests with extension disabled
+ runShaderTests(false);
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = gl.getExtension("EXT_shader_texture_lod");
+ if (!ext) {
+ testPassed("No EXT_shader_texture_lod support -- this is legal");
+
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled EXT_shader_texture_lod extension");
+
+ runSupportedTest(true);
+
+ runShaderTests(true);
+ runOutputTests();
+ runUniqueObjectTest();
+ runReferenceCycleTest();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var supported = gl.getSupportedExtensions();
+ if (supported.indexOf("EXT_shader_texture_lod") >= 0) {
+ if (extensionEnabled) {
+ testPassed("EXT_shader_texture_lod listed as supported and getExtension succeeded");
+ } else {
+ testFailed("EXT_shader_texture_lod listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("EXT_shader_texture_lod not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("EXT_shader_texture_lod not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runShaderTests(extensionEnabled) {
+ debug("");
+ debug("Testing various shader compiles with extension " + (extensionEnabled ? "enabled" : "disabled"));
+
+ // Expect the macro shader to succeed ONLY if enabled
+ var macroFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, "goodVertexShader", "macroFragmentShader");
+ if (extensionEnabled) {
+ if (macroFragmentProgram) {
+ // Expected result
+ testPassed("GL_EXT_shader_texture_lod defined in shaders when extension is enabled");
+ } else {
+ testFailed("GL_EXT_shader_texture_lod not defined in shaders when extension is enabled");
+ }
+ } else {
+ if (macroFragmentProgram) {
+ testFailed("GL_EXT_shader_texture_lod defined in shaders when extension is disabled");
+ } else {
+ testPassed("GL_EXT_shader_texture_lod not defined in shaders when extension disabled");
+ }
+ }
+
+ // Always expect the shader missing the #pragma to fail (whether enabled or not)
+ var missingPragmaFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, "goodVertexShader", "missingPragmaFragmentShader");
+ if (missingPragmaFragmentProgram) {
+ testFailed("Shader built-ins allowed without #extension pragma");
+ } else {
+ testPassed("Shader built-ins disallowed without #extension pragma");
+ }
+
+ // Try to compile a shader using the built-ins that should only succeed if enabled
+ var testFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, "goodVertexShader", "testFragmentShader");
+ if (extensionEnabled) {
+ if (testFragmentProgram) {
+ testPassed("Shader built-ins compiled successfully when extension enabled");
+ } else {
+ testFailed("Shader built-ins failed to compile when extension enabled");
+ }
+ } else {
+ if (testFragmentProgram) {
+ testFailed("Shader built-ins compiled successfully when extension disabled");
+ } else {
+ testPassed("Shader built-ins failed to compile when extension disabled");
+ }
+ }
+}
+
+function runOutputTests() {
+ debug("");
+ debug("Testing various draws for valid built-in function behavior");
+ gl.viewport(0, 0, canvas.width, canvas.height);
+
+ var program = wtu.setupProgram(gl, ["outputVertexShader", "outputFragmentShader"], ['vPosition', 'texCoord0'], [0, 1]);
+ var quadParameters = wtu.setupUnitQuad(gl, 0, 1);
+
+ var colors = [
+ {name: 'red', color:[255, 0, 0, 255]},
+ {name: 'green', color:[0, 255, 0, 255]},
+ {name: 'blue', color:[0, 0, 255, 255]},
+ {name: 'yellow', color:[255, 255, 0, 255]},
+ {name: 'magenta', color:[255, 0, 255, 255]},
+ {name: 'cyan', color:[0, 255, 255, 255]},
+ {name: 'pink', color:[255, 128, 128, 255]},
+ {name: 'gray', color:[128, 128, 128, 255]},
+ {name: 'light green', color:[128, 255, 128, 255]},
+ ];
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST_MIPMAP_LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
+
+ for (var ii = 0; ii < colors.length; ++ii) {
+ var color = colors[ii];
+ var size = Math.pow(2, colors.length - ii - 1);
+ wtu.fillTexture(gl, tex, size, size, color.color, ii);
+ }
+
+ var loc = gl.getUniformLocation(program, "lod");
+
+ for (var ii = 0; ii < colors.length; ++ii) {
+ gl.uniform1f(loc, ii);
+ var color = colors[ii];
+ wtu.drawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, color.color,
+ "256x256 texture drawn to 256x256 dest with lod = " + ii +
+ " should be " + color.name);
+ }
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+}
+
+function runUniqueObjectTest()
+{
+ debug("");
+ debug("Testing that getExtension() returns the same object each time");
+ gl.getExtension("EXT_shader_texture_lod").myProperty = 2;
+ gc();
+ shouldBe('gl.getExtension("EXT_shader_texture_lod").myProperty', '2');
+}
+
+function runReferenceCycleTest()
+{
+ // create some reference cycles. The goal is to see if they cause leaks. The point is that
+ // some browser test runners have instrumentation to detect leaked refcounted objects.
+ debug("");
+ debug("Testing reference cycles between context and extension objects");
+ var ext = gl.getExtension("EXT_shader_texture_lod");
+
+ // create cycle between extension and context, since the context has to hold a reference to the extension
+ ext.context = gl;
+
+ // create a self-cycle on the extension object
+ ext.ext = ext;
+}
+
+debug("");
+successfullyParsed = true;
+</script>
+<script>finishTest();</script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-texture-filter-anisotropic.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-texture-filter-anisotropic.html
new file mode 100644
index 000000000..81cde8f0e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/ext-texture-filter-anisotropic.html
@@ -0,0 +1,192 @@
+<!--
+
+/*
+** Copyright (c) 2012 Florian Boesch <pyalot@gmail.com>.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL EXT_texture_filter_anisotropic Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("This test verifies the functionality of the EXT_texture_filter_anisotropic extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Run tests with extension disabled
+ runHintTestDisabled();
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = wtu.getExtensionWithKnownPrefixes(gl, "EXT_texture_filter_anisotropic");
+
+ if (!ext) {
+ testPassed("No EXT_texture_filter_anisotropic support -- this is legal");
+
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled EXT_texture_filter_anisotropic extension");
+
+ runSupportedTest(true);
+ runHintTestEnabled();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ if (wtu.getSupportedExtensionWithKnownPrefixes(gl, "EXT_texture_filter_anisotropic") !== undefined) {
+ if (extensionEnabled) {
+ testPassed("EXT_texture_filter_anisotropic listed as supported and getExtension succeeded");
+ } else {
+ testFailed("EXT_texture_filter_anisotropic listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("EXT_texture_filter_anisotropic not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("EXT_texture_filter_anisotropic not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runHintTestDisabled() {
+ debug("Testing MAX_TEXTURE_MAX_ANISOTROPY_EXT with extension disabled");
+
+ var MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
+ gl.getParameter(MAX_TEXTURE_MAX_ANISOTROPY_EXT);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "MAX_TEXTURE_MAX_ANISOTROPY_EXT should not be queryable if extension is disabled");
+
+ debug("Testing TEXTURE_MAX_ANISOTROPY_EXT with extension disabled");
+ var TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+
+ gl.getTexParameter(gl.TEXTURE_2D, TEXTURE_MAX_ANISOTROPY_EXT);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "TEXTURE_MAX_ANISOTROPY_EXT should not be queryable if extension is disabled");
+
+ gl.texParameterf(gl.TEXTURE_2D, TEXTURE_MAX_ANISOTROPY_EXT, 1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "TEXTURE_MAX_ANISOTROPY_EXT should not be settable if extension is disabled");
+
+ gl.texParameteri(gl.TEXTURE_2D, TEXTURE_MAX_ANISOTROPY_EXT, 1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "TEXTURE_MAX_ANISOTROPY_EXT should not be settable if extension is disabled");
+
+ gl.deleteTexture(texture);
+}
+
+function runHintTestEnabled() {
+ debug("Testing MAX_TEXTURE_MAX_ANISOTROPY_EXT with extension enabled");
+
+ shouldBe("ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT", "0x84FF");
+
+ var max_anisotropy = gl.getParameter(ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "MAX_TEXTURE_MAX_ANISOTROPY_EXT query should succeed if extension is enabled");
+
+ if(max_anisotropy >= 2){
+ testPassed("Minimum value of MAX_TEXTURE_MAX_ANISOTROPY_EXT is 2.0");
+ }
+ else{
+ testFailed("Minimum value of MAX_TEXTURE_MAX_ANISOTROPY_EXT is 2.0, returned values was: " + max_anisotropy);
+ }
+
+ // TODO make a texture and verify initial value == 1 and setting to less than 1 is invalid value
+
+ debug("Testing TEXTURE_MAX_ANISOTROPY_EXT with extension disabled");
+ shouldBe("ext.TEXTURE_MAX_ANISOTROPY_EXT", "0x84FE");
+
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+
+ var queried_value = gl.getTexParameter(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "TEXTURE_MAX_ANISOTROPY_EXT query should succeed if extension is enabled");
+
+ if(queried_value == 1){
+ testPassed("Initial value of TEXTURE_MAX_ANISOTROPY_EXT is 1.0");
+ }
+ else{
+ testFailed("Initial value of TEXTURE_MAX_ANISOTROPY_EXT should be 1.0, returned value was: " + queried_value);
+ }
+
+ gl.texParameterf(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, 0);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "texParameterf TEXTURE_MAX_ANISOTROPY_EXT set to < 1 should be an invalid value");
+
+ gl.texParameteri(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, 0);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "texParameteri TEXTURE_MAX_ANISOTROPY_EXT set to < 1 should be an invalid value");
+
+ gl.texParameterf(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, max_anisotropy);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "texParameterf TEXTURE_MAX_ANISOTROPY_EXT set to >= 2 should succeed");
+
+ gl.texParameteri(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, max_anisotropy);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "texParameteri TEXTURE_MAX_ANISOTROPY_EXT set to >= 2 should succeed");
+
+ var queried_value = gl.getTexParameter(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT);
+ if(queried_value == max_anisotropy){
+ testPassed("Set value of TEXTURE_MAX_ANISOTROPY_EXT matches expecation");
+ }
+ else{
+ testFailed("Set value of TEXTURE_MAX_ANISOTROPY_EXT should be: " + max_anisotropy + " , returned value was: " + queried_value);
+ }
+
+ gl.texParameterf(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, 1.5);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "texParameterf TEXTURE_MAX_ANISOTROPY_EXT set to 1.5 should succeed");
+
+ queried_value = gl.getTexParameter(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT);
+ if(queried_value == 1.5){
+ testPassed("Set value of TEXTURE_MAX_ANISOTROPY_EXT matches expecation");
+ }
+ else{
+ testFailed("Set value of TEXTURE_MAX_ANISOTROPY_EXT should be: " + 1.5 + " , returned value was: " + queried_value);
+ }
+
+
+ gl.deleteTexture(texture);
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/get-extension.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/get-extension.html
new file mode 100644
index 000000000..39bba38ae
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/get-extension.html
@@ -0,0 +1,122 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Extension Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+<script>
+"use strict";
+
+var pseudoRandom = (function() {
+ var seed = 3;
+ return function() {
+ seed = (seed * 11 + 17) % 25;
+ return seed / 25;
+ };
+})();
+
+var randomizeCase = function(str) {
+ var newChars = [];
+ for (var ii = 0; ii < str.length; ++ii) {
+ var c = str.substr(ii, 1);
+ var m = (pseudoRandom() > 0.5) ? c.toLowerCase() : c.toUpperCase();
+ newChars.push(m);
+ }
+ return newChars.join("");
+};
+
+description();
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+
+var ii;
+
+debug("check every extension advertised can be enabled");
+debug("");
+var extensionNames = gl.getSupportedExtensions();
+var extensionNamesLower = [];
+for (ii = 0; ii < extensionNames.length; ++ii) {
+ extensionNamesLower.push(extensionNames[ii].toLowerCase());
+}
+
+for (ii = 0; ii < extensionNames.length; ++ii) {
+ var originalName = extensionNames[ii];
+ var mixedName = randomizeCase(originalName);
+ var extension = gl.getExtension(mixedName);
+ assertMsg(extension, "able to get " + originalName + " as " + mixedName);
+ if (extension) {
+ var kTestString = "this is a test";
+ var kTestNumber = 123;
+ var kTestFunction = function() { };
+ var kTestObject = { };
+ extension.testStringProperty = kTestString;
+ extension.testNumberProperty = kTestNumber;
+ extension.testFunctionProperty = kTestFunction;
+ extension.testObjectProperty = kTestObject;
+ gc();
+ var extension2 = gl.getExtension(originalName);
+ assertMsg(
+ extension === extension2,
+ "calling getExtension twice for the same extension returns the same object");
+ assertMsg(
+ extension2.testStringProperty === kTestString &&
+ extension2.testFunctionProperty === kTestFunction &&
+ extension2.testObjectProperty === kTestObject &&
+ extension2.testNumberProperty === kTestNumber,
+ "object returned by 2nd call to getExtension has same properties");
+
+ var prefixedVariants = wtu.getExtensionPrefixedNames(originalName);
+ for (var jj = 0; jj < prefixedVariants.length; ++jj) {
+ assertMsg(
+ gl.getExtension(prefixedVariants[jj]) === null ||
+ extensionNamesLower.indexOf(prefixedVariants[jj].toLowerCase()) !== -1,
+ "getExtension('" + prefixedVariants[jj] + "') returns an object only if the name is returned by getSupportedExtensions");
+ }
+ }
+ debug("");
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-element-index-uint.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-element-index-uint.html
new file mode 100644
index 000000000..b5a0806d2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-element-index-uint.html
@@ -0,0 +1,448 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL OES_element_index_uint Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+
+<script id="vs" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec4 vColor;
+varying vec4 color;
+void main() {
+ gl_Position = vPosition;
+ color = vColor;
+}
+</script>
+<script id="fs" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 color;
+void main() {
+ gl_FragColor = color;
+}
+</script>
+
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("This test verifies the functionality of the OES_element_index_uint extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var gl = null;
+var ext = null;
+var canvas = null;
+
+// Test both STATIC_DRAW and DYNAMIC_DRAW as a regression test
+// for a bug in ANGLE which has since been fixed.
+for (var ii = 0; ii < 2; ++ii) {
+ canvas = document.createElement("canvas");
+ canvas.width = 50;
+ canvas.height = 50;
+
+ gl = wtu.create3DContext(canvas);
+
+ if (!gl) {
+ testFailed("WebGL context does not exist");
+ } else {
+ testPassed("WebGL context exists");
+
+ var drawType = (ii == 0) ? gl.STATIC_DRAW : gl.DYNAMIC_DRAW;
+ debug("Testing " + ((ii == 0) ? "STATIC_DRAW" : "DYNAMIC_DRAW"));
+
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = gl.getExtension("OES_element_index_uint");
+ if (!ext) {
+ testPassed("No OES_element_index_uint support -- this is legal");
+
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled OES_element_index_uint extension");
+
+ runSupportedTest(true);
+
+ runDrawTests(drawType);
+
+ // These tests are tweaked duplicates of the buffers/index-validation* tests
+ // using unsigned int indices to ensure that behavior remains consistent
+ runIndexValidationTests(drawType);
+ runCopiesIndicesTests(drawType);
+ runResizedBufferTests(drawType);
+ runVerifiesTooManyIndicesTests(drawType);
+ runCrashWithBufferSubDataTests(drawType);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+ }
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var supported = gl.getSupportedExtensions();
+ if (supported.indexOf("OES_element_index_uint") >= 0) {
+ if (extensionEnabled) {
+ testPassed("OES_element_index_uint listed as supported and getExtension succeeded");
+ } else {
+ testFailed("OES_element_index_uint listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("OES_element_index_uint not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("OES_element_index_uint not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runDrawTests(drawType) {
+ debug("Test that draws with unsigned integer indices produce the expected results");
+
+ canvas.width = 50; canvas.height = 50;
+ gl.viewport(0, 0, canvas.width, canvas.height);
+
+ var program = wtu.setupNoTexCoordTextureProgram(gl);
+
+ function setupDraw(s) {
+ // Create a vertex buffer that cannot be fully indexed via shorts
+ var quadArrayLen = 65537 * 3;
+ var quadArray = new Float32Array(quadArrayLen);
+
+ // Leave all but the last 4 values zero-ed out
+ var idx = quadArrayLen - 12;
+
+ // Initialized the last 4 values to a quad
+ quadArray[idx++] = 1.0 * s;
+ quadArray[idx++] = 1.0 * s;
+ quadArray[idx++] = 0.0;
+
+ quadArray[idx++] = -1.0 * s;
+ quadArray[idx++] = 1.0 * s;
+ quadArray[idx++] = 0.0;
+
+ quadArray[idx++] = -1.0 * s;
+ quadArray[idx++] = -1.0 * s;
+ quadArray[idx++] = 0.0;
+
+ quadArray[idx++] = 1.0 * s;
+ quadArray[idx++] = -1.0 * s;
+ quadArray[idx++] = 0.0;
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, quadArray, drawType);
+
+ // Create an unsigned int index buffer that indexes the last 4 vertices
+ var baseIndex = (quadArrayLen / 3) - 4;
+
+ var indexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexObject);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint32Array([
+ baseIndex + 0,
+ baseIndex + 1,
+ baseIndex + 2,
+ baseIndex + 2,
+ baseIndex + 3,
+ baseIndex + 0]), drawType);
+
+ var opt_positionLocation = 0;
+ gl.enableVertexAttribArray(opt_positionLocation);
+ gl.vertexAttribPointer(opt_positionLocation, 3, gl.FLOAT, false, 0, 0);
+ };
+ function testPixel(blackList, whiteList) {
+ function testList(list, expected) {
+ for (var n = 0; n < list.length; n++) {
+ var l = list[n];
+ var x = -Math.floor(l * canvas.width / 2) + canvas.width / 2;
+ var y = -Math.floor(l * canvas.height / 2) + canvas.height / 2;
+ wtu.checkCanvasRect(gl, x, y, 1, 1, [expected, expected, expected],
+ "Draw should pass", 2);
+ }
+ }
+ testList(blackList, 0);
+ testList(whiteList, 255);
+ };
+ function verifyDraw(s) {
+ gl.clearColor(1.0, 1.0, 1.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_INT, 0);
+
+ var blackList = [];
+ var whiteList = [];
+ var points = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0];
+ for (var n = 0; n < points.length; n++) {
+ if (points[n] <= s) {
+ blackList.push(points[n]);
+ } else {
+ whiteList.push(points[n]);
+ }
+ }
+ testPixel(blackList, whiteList);
+ };
+
+ setupDraw(0.5);
+ verifyDraw(0.5);
+}
+
+function runIndexValidationTests(drawType) {
+ description("Tests that index validation verifies the correct number of indices");
+
+ function sizeInBytes(type) {
+ switch (type) {
+ case gl.BYTE:
+ case gl.UNSIGNED_BYTE:
+ return 1;
+ case gl.SHORT:
+ case gl.UNSIGNED_SHORT:
+ return 2;
+ case gl.INT:
+ case gl.UNSIGNED_INT:
+ case gl.FLOAT:
+ return 4;
+ default:
+ throw "unknown type";
+ }
+ }
+
+ var program = wtu.loadStandardProgram(gl);
+
+ // 3 vertices => 1 triangle, interleaved data
+ var dataComplete = new Float32Array([0, 0, 0, 1,
+ 0, 0, 1,
+ 1, 0, 0, 1,
+ 0, 0, 1,
+ 1, 1, 1, 1,
+ 0, 0, 1]);
+ var dataIncomplete = new Float32Array([0, 0, 0, 1,
+ 0, 0, 1,
+ 1, 0, 0, 1,
+ 0, 0, 1,
+ 1, 1, 1, 1]);
+ var indices = new Uint32Array([0, 1, 2]);
+
+ debug("Testing with valid indices");
+
+ var bufferComplete = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, bufferComplete);
+ gl.bufferData(gl.ARRAY_BUFFER, dataComplete, drawType);
+ var elements = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elements);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, drawType);
+ gl.useProgram(program);
+ var vertexLoc = gl.getAttribLocation(program, "a_vertex");
+ var normalLoc = gl.getAttribLocation(program, "a_normal");
+ gl.vertexAttribPointer(vertexLoc, 4, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 0);
+ gl.enableVertexAttribArray(vertexLoc);
+ gl.vertexAttribPointer(normalLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 4 * sizeInBytes(gl.FLOAT));
+ gl.enableVertexAttribArray(normalLoc);
+ shouldBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_INT, 0)');
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ debug("Testing with out-of-range indices");
+
+ var bufferIncomplete = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, bufferIncomplete);
+ gl.bufferData(gl.ARRAY_BUFFER, dataIncomplete, drawType);
+ gl.vertexAttribPointer(vertexLoc, 4, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 0);
+ gl.enableVertexAttribArray(vertexLoc);
+ gl.disableVertexAttribArray(normalLoc);
+ debug("Enable vertices, valid");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_INT, 0)');
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ debug("Enable normals, out-of-range");
+ gl.vertexAttribPointer(normalLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 4 * sizeInBytes(gl.FLOAT));
+ gl.enableVertexAttribArray(normalLoc);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_INT, 0)');
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION);
+
+ debug("Test with enabled attribute that does not belong to current program");
+
+ gl.disableVertexAttribArray(normalLoc);
+ var extraLoc = Math.max(vertexLoc, normalLoc) + 1;
+ gl.enableVertexAttribArray(extraLoc);
+ debug("Enable an extra attribute with null");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_INT, 0)');
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION);
+ debug("Enable an extra attribute with insufficient data buffer");
+ gl.vertexAttribPointer(extraLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 4 * sizeInBytes(gl.FLOAT));
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_INT, 0)');
+ debug("Pass large negative index to vertexAttribPointer");
+ gl.vertexAttribPointer(normalLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), -2000000000 * sizeInBytes(gl.FLOAT));
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
+ shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_INT, 0)');
+}
+
+function runCopiesIndicesTests(drawType) {
+ debug("Test that client data is always copied during bufferData and bufferSubData calls");
+
+ var program = wtu.loadStandardProgram(gl);
+
+ gl.useProgram(program);
+ var vertexObject = gl.createBuffer();
+ gl.enableVertexAttribArray(0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ // 4 vertices -> 2 triangles
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0,0, 0,1,0, 1,0,0, 1,1,0 ]), drawType);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ var indexObject = gl.createBuffer();
+
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexObject);
+ var indices = new Uint32Array([ 10000, 0, 1, 2, 3, 10000 ]);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, drawType);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawElements(gl.TRIANGLE_STRIP, 4, gl.UNSIGNED_INT, 4)");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawElements(gl.TRIANGLE_STRIP, 4, gl.UNSIGNED_INT, 0)");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawElements(gl.TRIANGLE_STRIP, 4, gl.UNSIGNED_INT, 8)");
+ indices[0] = 2;
+ indices[5] = 1;
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawElements(gl.TRIANGLE_STRIP, 4, gl.UNSIGNED_INT, 4)");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawElements(gl.TRIANGLE_STRIP, 4, gl.UNSIGNED_INT, 0)");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawElements(gl.TRIANGLE_STRIP, 4, gl.UNSIGNED_INT, 8)");
+}
+
+function runResizedBufferTests(drawType) {
+ debug("Test that updating the size of a vertex buffer is properly noticed by the WebGL implementation.");
+
+ var program = wtu.setupProgram(gl, ["vs", "fs"], ["vPosition", "vColor"]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after initialization");
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(
+ [-1,1,0, 1,1,0, -1,-1,0,
+ -1,-1,0, 1,1,0, 1,-1,0]), drawType);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after vertex setup");
+
+ var texCoordObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, texCoordObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(
+ [0,0, 1,0, 0,1,
+ 0,1, 1,0, 1,1]), drawType);
+ gl.enableVertexAttribArray(1);
+ gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after texture coord setup");
+
+ // Now resize these buffers because we want to change what we're drawing.
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ -1,1,0, 1,1,0, -1,-1,0, 1,-1,0,
+ -1,1,0, 1,1,0, -1,-1,0, 1,-1,0]), drawType);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after vertex redefinition");
+ gl.bindBuffer(gl.ARRAY_BUFFER, texCoordObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Uint8Array([
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255]), drawType);
+ gl.vertexAttribPointer(1, 4, gl.UNSIGNED_BYTE, false, 0, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after texture coordinate / color redefinition");
+
+ var numQuads = 2;
+ var indices = new Uint32Array(numQuads * 6);
+ for (var ii = 0; ii < numQuads; ++ii) {
+ var offset = ii * 6;
+ var quad = (ii == (numQuads - 1)) ? 4 : 0;
+ indices[offset + 0] = quad + 0;
+ indices[offset + 1] = quad + 1;
+ indices[offset + 2] = quad + 2;
+ indices[offset + 3] = quad + 2;
+ indices[offset + 4] = quad + 1;
+ indices[offset + 5] = quad + 3;
+ }
+ var indexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexObject);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, drawType);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after setting up indices");
+ gl.drawElements(gl.TRIANGLES, numQuads * 6, gl.UNSIGNED_INT, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after drawing");
+}
+
+function runVerifiesTooManyIndicesTests(drawType) {
+ description("Tests that index validation for drawElements does not examine too many indices");
+
+ var program = wtu.loadStandardProgram(gl);
+
+ gl.useProgram(program);
+ var vertexObject = gl.createBuffer();
+ gl.enableVertexAttribArray(0);
+ gl.disableVertexAttribArray(1);
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ // 4 vertices -> 2 triangles
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0,0, 0,1,0, 1,0,0, 1,1,0 ]), drawType);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ var indexObject = gl.createBuffer();
+
+ debug("Test out of range indices")
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexObject);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint32Array([ 10000, 0, 1, 2, 3, 10000 ]), drawType);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawElements(gl.TRIANGLE_STRIP, 4, gl.UNSIGNED_INT, 4)");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawElements(gl.TRIANGLE_STRIP, 4, gl.UNSIGNED_INT, 0)");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawElements(gl.TRIANGLE_STRIP, 4, gl.UNSIGNED_INT, 8)");
+}
+
+function runCrashWithBufferSubDataTests(drawType) {
+ debug('Verifies that the index validation code which is within bufferSubData does not crash.')
+
+ var elementBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementBuffer);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, 256, drawType);
+ var data = new Uint32Array(127);
+ gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 64, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "after attempting to update a buffer outside of the allocated bounds");
+ testPassed("bufferSubData, when buffer object was initialized with null, did not crash");
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-standard-derivatives.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-standard-derivatives.html
new file mode 100644
index 000000000..8f5fdb398
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-standard-derivatives.html
@@ -0,0 +1,354 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL OES_standard_derivatives Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+<!-- Shaders for testing standard derivatives -->
+
+<!-- Shader omitting the required #extension pragma -->
+<script id="missingPragmaFragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec2 texCoord;
+void main() {
+ float dx = dFdx(texCoord.x);
+ float dy = dFdy(texCoord.y);
+ float w = fwidth(texCoord.x);
+ gl_FragColor = vec4(dx, dy, w, 1.0);
+}
+</script>
+
+<!-- Shader to test macro definition -->
+<script id="macroFragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+void main() {
+#ifdef GL_OES_standard_derivatives
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
+#else
+ // Error expected
+ #error no GL_OES_standard_derivatives;
+#endif
+}
+</script>
+
+<!-- Shader with required #extension pragma -->
+<script id="testFragmentShader" type="x-shader/x-fragment">
+#extension GL_OES_standard_derivatives : enable
+precision mediump float;
+varying vec2 texCoord;
+void main() {
+ float dx = dFdx(texCoord.x);
+ float dy = dFdy(texCoord.y);
+ float w = fwidth(texCoord.x);
+ gl_FragColor = vec4(dx, dy, w, 1.0);
+}
+</script>
+<!-- Shaders to link with test fragment shaders -->
+<script id="goodVertexShader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+varying vec2 texCoord;
+void main() {
+ texCoord = vPosition.xy;
+ gl_Position = vPosition;
+}
+</script>
+<!-- Shaders to test output -->
+<script id="outputVertexShader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+varying vec4 position;
+void main() {
+ position = vPosition;
+ gl_Position = vPosition;
+}
+</script>
+<script id="outputFragmentShader" type="x-shader/x-fragment">
+#extension GL_OES_standard_derivatives : enable
+precision mediump float;
+varying vec4 position;
+void main() {
+ float dzdx = dFdx(position.z);
+ float dzdy = dFdy(position.z);
+ float fw = fwidth(position.z);
+ gl_FragColor = vec4(abs(dzdx) * 40.0, abs(dzdy) * 40.0, fw * 40.0, 1.0);
+}
+</script>
+
+<script>
+"use strict";
+description("This test verifies the functionality of the OES_standard_derivatives extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Run tests with extension disabled
+ runHintTestDisabled();
+ runShaderTests(false);
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = gl.getExtension("OES_standard_derivatives");
+ if (!ext) {
+ testPassed("No OES_standard_derivatives support -- this is legal");
+
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled OES_standard_derivatives extension");
+
+ runSupportedTest(true);
+
+ runHintTestEnabled();
+ runShaderTests(true);
+ runOutputTests();
+ runUniqueObjectTest();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var supported = gl.getSupportedExtensions();
+ if (supported.indexOf("OES_standard_derivatives") >= 0) {
+ if (extensionEnabled) {
+ testPassed("OES_standard_derivatives listed as supported and getExtension succeeded");
+ } else {
+ testFailed("OES_standard_derivatives listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("OES_standard_derivatives not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("OES_standard_derivatives not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runHintTestDisabled() {
+ debug("Testing FRAGMENT_SHADER_DERIVATIVE_HINT_OES with extension disabled");
+
+ // Use the constant directly as we don't have the extension
+ var FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B;
+
+ gl.getParameter(FRAGMENT_SHADER_DERIVATIVE_HINT_OES);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "FRAGMENT_SHADER_DERIVATIVE_HINT_OES should not be queryable if extension is disabled");
+
+ gl.hint(FRAGMENT_SHADER_DERIVATIVE_HINT_OES, gl.DONT_CARE);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "hint should not accept FRAGMENT_SHADER_DERIVATIVE_HINT_OES if extension is disabled");
+}
+
+function runHintTestEnabled() {
+ debug("Testing FRAGMENT_SHADER_DERIVATIVE_HINT_OES with extension enabled");
+
+ shouldBe("ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES", "0x8B8B");
+
+ gl.getParameter(ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "FRAGMENT_SHADER_DERIVATIVE_HINT_OES query should succeed if extension is enabled");
+
+ // Default value is DONT_CARE
+ if (gl.getParameter(ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES) == gl.DONT_CARE) {
+ testPassed("Default value of FRAGMENT_SHADER_DERIVATIVE_HINT_OES is DONT_CARE");
+ } else {
+ testFailed("Default value of FRAGMENT_SHADER_DERIVATIVE_HINT_OES is not DONT_CARE");
+ }
+
+ // Ensure that we can set the target
+ gl.hint(ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES, gl.DONT_CARE);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "hint should accept FRAGMENT_SHADER_DERIVATIVE_HINT_OES");
+
+ // Test all the hint modes
+ var validModes = ["FASTEST", "NICEST", "DONT_CARE"];
+ var anyFailed = false;
+ for (var n = 0; n < validModes.length; n++) {
+ var mode = validModes[n];
+ gl.hint(ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES, gl[mode]);
+ if (gl.getParameter(ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES) != gl[mode]) {
+ testFailed("Round-trip of hint()/getParameter() failed on mode " + mode);
+ anyFailed = true;
+ }
+ }
+ if (!anyFailed) {
+ testPassed("Round-trip of hint()/getParameter() with all supported modes");
+ }
+}
+
+function runShaderTests(extensionEnabled) {
+ debug("");
+ debug("Testing various shader compiles with extension " + (extensionEnabled ? "enabled" : "disabled"));
+
+ // Expect the macro shader to succeed ONLY if enabled
+ var macroFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, "goodVertexShader", "macroFragmentShader");
+ if (extensionEnabled) {
+ if (macroFragmentProgram) {
+ // Expected result
+ testPassed("GL_OES_standard_derivatives defined in shaders when extension is enabled");
+ } else {
+ testFailed("GL_OES_standard_derivatives not defined in shaders when extension is enabled");
+ }
+ } else {
+ if (macroFragmentProgram) {
+ testFailed("GL_OES_standard_derivatives defined in shaders when extension is disabled");
+ } else {
+ testPassed("GL_OES_standard_derivatives not defined in shaders when extension disabled");
+ }
+ }
+
+ // Always expect the shader missing the #pragma to fail (whether enabled or not)
+ var missingPragmaFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, "goodVertexShader", "missingPragmaFragmentShader");
+ if (missingPragmaFragmentProgram) {
+ testFailed("Shader built-ins allowed without #extension pragma");
+ } else {
+ testPassed("Shader built-ins disallowed without #extension pragma");
+ }
+
+ // Try to compile a shader using the built-ins that should only succeed if enabled
+ var testFragmentProgram = wtu.loadProgramFromScriptExpectError(gl, "goodVertexShader", "testFragmentShader");
+ if (extensionEnabled) {
+ if (testFragmentProgram) {
+ testPassed("Shader built-ins compiled successfully when extension enabled");
+ } else {
+ testFailed("Shader built-ins failed to compile when extension enabled");
+ }
+ } else {
+ if (testFragmentProgram) {
+ testFailed("Shader built-ins compiled successfully when extension disabled");
+ } else {
+ testPassed("Shader built-ins failed to compile when extension disabled");
+ }
+ }
+}
+
+function runOutputTests() {
+ // This tests does several draws with various values of z.
+ // The output of the fragment shader is:
+ // [dFdx(z), dFdy(z), fwidth(z), 1.0]
+ // The expected math: (note the conversion to uint8)
+ // canvas.width = canvas.height = 50
+ // dFdx = totalChange.x / canvas.width = 0.5 / 50.0 = 0.01
+ // dFdy = totalChange.y / canvas.height = 0.5 / 50.0 = 0.01
+ // fw = abs(dFdx + dFdy) = 0.01 + 0.01 = 0.02
+ // r = floor(dFdx * 40.0 * 255) = 102
+ // g = floor(dFdy * 40.0 * 255) = 102
+ // b = floor(fw * 40.0 * 255) = 204
+
+ var e = 5; // Amount of variance to allow in result pixels - may need to be tweaked higher
+
+ debug("Testing various draws for valid built-in function behavior");
+
+ canvas.width = 50; canvas.height = 50;
+ gl.viewport(0, 0, canvas.width, canvas.height);
+ gl.hint(ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES, gl.NICEST);
+
+ var positionLoc = 0;
+ var texcoordLoc = 1;
+ var program = wtu.setupProgram(gl, ["outputVertexShader", "outputFragmentShader"], ['vPosition', 'texCoord0'], [0, 1]);
+ var quadParameters = wtu.setupUnitQuad(gl, positionLoc, texcoordLoc);
+
+ function expectResult(target, message) {
+ var locations = [
+ [ 0.1, 0.1 ],
+ [ 0.9, 0.1 ],
+ [ 0.1, 0.9 ],
+ [ 0.9, 0.9 ],
+ [ 0.5, 0.5 ]
+ ];
+ for (var n = 0; n < locations.length; n++) {
+ var loc = locations[n];
+ var px = Math.floor(loc[0] * canvas.width);
+ var py = Math.floor(loc[1] * canvas.height);
+ wtu.checkCanvasRect(gl, px, py, 1, 1, target, message, 4);
+ }
+ };
+
+ function setupBuffers(tl, tr, bl, br) {
+ gl.bindBuffer(gl.ARRAY_BUFFER, quadParameters[0]);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ 1.0, 1.0, tr,
+ -1.0, 1.0, tl,
+ -1.0, -1.0, bl,
+ 1.0, 1.0, tr,
+ -1.0, -1.0, bl,
+ 1.0, -1.0, br]), gl.STATIC_DRAW);
+ gl.vertexAttribPointer(positionLoc, 3, gl.FLOAT, false, 0, 0);
+ };
+
+ // Draw 1: (no variation)
+ setupBuffers(0.0, 0.0, 0.0, 0.0);
+ wtu.clearAndDrawUnitQuad(gl);
+ expectResult([0, 0, 0, 255],
+ "Draw 1 (no variation) should pass");
+
+ // Draw 2: (variation in x)
+ setupBuffers(1.0, 0.0, 1.0, 0.0);
+ wtu.clearAndDrawUnitQuad(gl);
+ expectResult([204, 0, 204, 255],
+ "Draw 2 (variation in x) should pass");
+
+ // Draw 3: (variation in y)
+ setupBuffers(1.0, 1.0, 0.0, 0.0);
+ wtu.clearAndDrawUnitQuad(gl);
+ expectResult([0, 204, 204, 255],
+ "Draw 3 (variation in y) should pass");
+
+ // Draw 4: (variation in x & y)
+ setupBuffers(1.0, 0.5, 0.5, 0.0);
+ wtu.clearAndDrawUnitQuad(gl);
+ expectResult([102, 102, 204, 255],
+ "Draw 4 (variation in x & y) should pass");
+}
+
+function runUniqueObjectTest()
+{
+ debug("Testing that getExtension() returns the same object each time");
+ gl.getExtension("OES_standard_derivatives").myProperty = 2;
+ gc();
+ shouldBe('gl.getExtension("OES_standard_derivatives").myProperty', '2');
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-linear.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-linear.html
new file mode 100644
index 000000000..21df7b2c3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-linear.html
@@ -0,0 +1,55 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/oes-texture-float-and-half-float-linear.js"></script>
+<script>
+"use strict";
+function testPrologue(gl, extensionTypeName) {
+ if (!gl.getExtension(extensionTypeName)) {
+ testPassed("No " + extensionTypeName + " support -- this is legal");
+ return false;
+ }
+ testPassed("Successfully enabled " + extensionTypeName + " extension");
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("OES_texture_float", "OES_texture_float_linear", "FLOAT", testPrologue)()'>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-canvas.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-canvas.html
new file mode 100644
index 000000000..a0fec0cc1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-canvas.html
@@ -0,0 +1,56 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-canvas.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ if (!gl.getExtension("OES_texture_float")) {
+ testPassed("No OES_texture_float support -- this is legal");
+ return false;
+ }
+
+ testPassed("Successfully enabled OES_texture_float extension");
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "FLOAT", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image-data.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image-data.html
new file mode 100644
index 000000000..70070d596
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image-data.html
@@ -0,0 +1,57 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-image-data.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ if (!gl.getExtension("OES_texture_float")) {
+ testPassed("No OES_texture_float support -- this is legal");
+ return false;
+ }
+
+ testPassed("Successfully enabled OES_texture_float extension");
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "FLOAT", testPrologue)()'>
+<canvas id="texcanvas" width="1" height="2"></canvas>
+<canvas id="example" width="1" height="2"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image.html
new file mode 100644
index 000000000..5b9832460
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image.html
@@ -0,0 +1,56 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-image.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ if (!gl.getExtension("OES_texture_float")) {
+ testPassed("No OES_texture_float support -- this is legal");
+ return false;
+ }
+
+ testPassed("Successfully enabled OES_texture_float extension");
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "FLOAT", "..", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-video.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-video.html
new file mode 100644
index 000000000..d83747282
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-video.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-video.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ if (!gl.getExtension("OES_texture_float")) {
+ testPassed("No OES_texture_float support -- this is legal");
+ return false;
+ }
+
+ testPassed("Successfully enabled OES_texture_float extension");
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "FLOAT", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<video width="640" height="228" id="vid" controls>
+ <source src="../resources/red-green.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
+ <source src="../resources/red-green.webmvp8.webm" type='video/webm; codecs="vp8, vorbis"' />
+ <source src="../resources/red-green.theora.ogv" type='video/ogg; codecs="theora, vorbis"' />
+</video>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float.html
new file mode 100644
index 000000000..9a20f3f25
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float.html
@@ -0,0 +1,293 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL OES_texture_float Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+<!-- Shaders for testing floating-point textures -->
+<script id="testFragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+uniform sampler2D tex;
+uniform vec4 subtractor;
+varying vec2 texCoord;
+void main()
+{
+ vec4 color = texture2D(tex, texCoord);
+ if (abs(color.r - subtractor.r) +
+ abs(color.g - subtractor.g) +
+ abs(color.b - subtractor.b) +
+ abs(color.a - subtractor.a) < 8.0) {
+ gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+ } else {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+ }
+}
+</script>
+<!-- Shaders for testing floating-point render targets -->
+<script id="positionVertexShader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+<script id="floatingPointFragmentShader" type="x-shader/x-fragment">
+void main()
+{
+ gl_FragColor = vec4(10000.0, 10000.0, 10000.0, 10000.0);
+}
+</script>
+<script>
+"use strict";
+description("This test verifies the functionality of the OES_texture_float extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ var texturedShaders = [
+ wtu.setupSimpleTextureVertexShader(gl),
+ "testFragmentShader"
+ ];
+ var testProgram =
+ wtu.setupProgram(gl,
+ texturedShaders,
+ ['vPosition', 'texCoord0'],
+ [0, 1]);
+ var quadParameters = wtu.setupUnitQuad(gl, 0, 1);
+
+ // First verify that allocation of floating-point textures fails if
+ // the extension has not been enabled yet.
+ runTextureCreationTest(testProgram, false);
+
+ if (!gl.getExtension("OES_texture_float")) {
+ testPassed("No OES_texture_float support -- this is legal");
+ } else {
+ testPassed("Successfully enabled OES_texture_float extension");
+ // If alpha value is missing from a texture it gets filled to 1 when sampling according to GLES2.0 table 3.12
+ runTextureCreationTest(testProgram, true, gl.RGBA, 4, [10000, 10000, 10000, 10000]);
+ runTextureCreationTest(testProgram, true, gl.RGB, 3, [10000, 10000, 10000, 1]);
+ runTextureCreationTest(testProgram, true, gl.LUMINANCE, 1, [10000, 10000, 10000, 1]);
+ runTextureCreationTest(testProgram, true, gl.ALPHA, 1, [0, 0, 0, 10000]);
+ runTextureCreationTest(testProgram, true, gl.LUMINANCE_ALPHA, 2, [10000, 10000, 10000, 10000]);
+ runRenderTargetAndReadbackTest(testProgram, gl.RGBA, 4, [10000, 10000, 10000, 10000], 0);
+ runRenderTargetAndReadbackTest(testProgram, gl.RGB, 3, [10000, 10000, 10000, 1], 0);
+ runRenderTargetAndReadbackTest(testProgram, gl.RGBA, 4, [10000, 10000, 10000, 10000], 1);
+ runRenderTargetAndReadbackTest(testProgram, gl.RGBA, 4, [10000, 10000, 10000, 10000], 0.5);
+ runUniqueObjectTest();
+ }
+}
+
+function allocateTexture()
+{
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "texture parameter setup should succeed");
+ return texture;
+}
+
+function checkRenderingResults()
+{
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+}
+
+function runTextureCreationTest(testProgram, extensionEnabled, opt_format, opt_numChannels, opt_subtractor)
+{
+ var format = opt_format || gl.RGBA;
+ var numberOfChannels = opt_numChannels || 4;
+ var expectFailure = !extensionEnabled;
+ var subtractor = opt_subtractor || [10000, 10000, 10000, 10000];
+
+ debug("");
+ debug("testing format: " + wtu.glEnumToString(gl, format) +
+ " expect:" + (extensionEnabled ? "success" : "failure"));
+
+ var texture = allocateTexture();
+ // Generate data.
+ var width = 2;
+ var height = 2;
+ var data = new Float32Array(width * height * numberOfChannels);
+ for (var ii = 0; ii < data.length; ++ii) {
+ data[ii] = 10000;
+ }
+ gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, format, gl.FLOAT, data);
+ if (expectFailure) {
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "floating-point texture allocation must be disallowed if OES_texture_float isn't enabled");
+ return;
+ } else {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "floating-point texture allocation should succeed if OES_texture_float is enabled");
+ }
+ // Verify that the texture actually works for sampling and contains the expected data.
+ gl.uniform4fv(gl.getUniformLocation(testProgram, "subtractor"), subtractor);
+ wtu.clearAndDrawUnitQuad(gl);
+ checkRenderingResults();
+
+ // Check that linear fails.
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [255, 0, 0, 255], "should be red");
+}
+
+function arrayToString(arr, size) {
+ var mySize;
+ if (!size)
+ mySize = arr.length;
+ else
+ mySize = size;
+ var out = "[";
+ for (var ii = 0; ii < mySize; ++ii) {
+ if (ii > 0) {
+ out += ", ";
+ }
+ out += arr[ii];
+ }
+ return out + "]";
+}
+
+function runRenderTargetAndReadbackTest(testProgram, format, numberOfChannels, subtractor, texSubImageCover)
+{
+ var formatString = wtu.glEnumToString(gl, format);
+ debug("");
+ debug("testing floating-point " + formatString + " render target" + (texSubImageCover > 0 ? " after calling texSubImage" : ""));
+
+ var texture = allocateTexture();
+ var width = 2;
+ var height = 2;
+ gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, format, gl.FLOAT, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "floating-point texture allocation should succeed if OES_texture_float is enabled");
+
+ // Try to use this texture as a render target.
+ var fbo = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ // It is legal for a WebGL implementation exposing the OES_texture_float extension to
+ // support floating-point textures but not as attachments to framebuffer objects.
+ if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE) {
+ debug("floating-point " + formatString + " render target not supported -- this is legal");
+ return;
+ }
+
+ if (texSubImageCover > 0) {
+ // Ensure that replacing the whole texture or a part of it with texSubImage2D doesn't affect renderability
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ var data = new Float32Array(width * height * numberOfChannels * texSubImageCover);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height * texSubImageCover, format, gl.FLOAT, data);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "texSubImage2D should succeed if OES_texture_float is enabled");
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE) {
+ testFailed("render target support changed after calling texSubImage2D");
+ return;
+ }
+ }
+
+ var renderProgram =
+ wtu.setupProgram(gl,
+ ["positionVertexShader", "floatingPointFragmentShader"],
+ ['vPosition'],
+ [0]);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "rendering to floating-point texture should succeed");
+
+ // Now sample from the floating-point texture and verify we got the correct values.
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.useProgram(testProgram);
+ gl.uniform1i(gl.getUniformLocation(testProgram, "tex"), 0);
+ gl.uniform4fv(gl.getUniformLocation(testProgram, "subtractor"), subtractor);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "rendering from floating-point texture should succeed");
+ checkRenderingResults();
+
+ // Finally, if the implementation supports floating-point readback, verify it.
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ var implFormat = gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT);
+ var implType = gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_TYPE);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "getParameter of IMPLEMENTATION_COLOR_READ_{FORMAT|TYPE} should succeed");
+ if ((implFormat == gl.RGBA || implFormat == gl.RGB) && implType == gl.FLOAT) {
+ debug("Checking readback of floating-point values");
+ var arraySize = (implFormat == gl.RGBA) ? 4 : 3
+ var buf = new Float32Array(arraySize);
+ gl.readPixels(0, 0, 1, 1, implFormat, implType , buf);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "readPixels from floating-point renderbuffer should succeed");
+ var ok = true;
+ var tolerance = 8.0; // TODO: factor this out from both this test and the subtractor shader above.
+ for (var ii = 0; ii < buf.length; ++ii) {
+ if (Math.abs(buf[ii] - subtractor[ii]) > tolerance) {
+ ok = false;
+ break;
+ }
+ }
+ if (ok) {
+ testPassed("readPixels of float-type data from floating-point renderbuffer succeeded");
+ } else {
+ testFailed("readPixels of float-type data from floating-point renderbuffer failed: expected "
+ + arrayToString(subtractor, arraySize) + ", got " + arrayToString(buf));
+ }
+ }
+}
+
+function runUniqueObjectTest()
+{
+ debug("");
+ debug("Testing that getExtension() returns the same object each time");
+ gl.getExtension("OES_texture_float").myProperty = 2;
+ gc();
+ shouldBe('gl.getExtension("OES_texture_float").myProperty', '2');
+}
+
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-linear.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-linear.html
new file mode 100644
index 000000000..6e130a121
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-linear.html
@@ -0,0 +1,58 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/oes-texture-float-and-half-float-linear.js"></script>
+<script>
+"use strict";
+function testPrologue(gl, extensionTypeName) {
+ var ext = null;
+ if (!(ext = gl.getExtension(extensionTypeName))) {
+ testPassed("No " + extensionTypeName + " support -- this is legal");
+ return false;
+ }
+ // Required by the test harness.
+ gl.HALF_FLOAT_OES = ext.HALF_FLOAT_OES;
+ testPassed("Successfully enabled " + extensionTypeName + " extension");
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("OES_texture_half_float", "OES_texture_half_float_linear", "HALF_FLOAT_OES", testPrologue)()'>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-canvas.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-canvas.html
new file mode 100644
index 000000000..e0eb6f6b7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-canvas.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-canvas.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ var ext = null;
+
+ if (!(ext = gl.getExtension("OES_texture_half_float"))) {
+ testPassed("No OES_texture_half_float support -- this is legal");
+ return false;
+ }
+
+ // Required by the test harness.
+ gl.HALF_FLOAT_OES = ext.HALF_FLOAT_OES;
+
+ testPassed("Successfully enabled OES_texture_half_float extension");
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "HALF_FLOAT_OES", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image-data.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image-data.html
new file mode 100644
index 000000000..eaf1a5686
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image-data.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-image-data.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ var ext = null;
+
+ if (!(ext = gl.getExtension("OES_texture_half_float"))) {
+ testPassed("No OES_texture_half_float support -- this is legal");
+ return false;
+ }
+
+ // Required by the test harness.
+ gl.HALF_FLOAT_OES = ext.HALF_FLOAT_OES;
+
+ testPassed("Successfully enabled OES_texture_half_float extension");
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "HALF_FLOAT_OES", testPrologue)()'>
+<canvas id="texcanvas" width="1" height="2"></canvas>
+<canvas id="example" width="1" height="2"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image.html
new file mode 100644
index 000000000..193d424a3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-image.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ var ext = null;
+
+ if (!(ext = gl.getExtension("OES_texture_half_float"))) {
+ testPassed("No OES_texture_half_float support -- this is legal");
+ return false;
+ }
+
+ // Required by the test harness.
+ gl.HALF_FLOAT_OES = ext.HALF_FLOAT_OES;
+
+ testPassed("Successfully enabled OES_texture_half_float extension");
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "HALF_FLOAT_OES", "..", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-video.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-video.html
new file mode 100644
index 000000000..d325602f5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-video.html
@@ -0,0 +1,66 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-video.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ var ext = null;
+
+ if (!(ext = gl.getExtension("OES_texture_half_float"))) {
+ testPassed("No OES_texture_half_float support -- this is legal");
+ return false;
+ }
+
+ // Required by the test harness.
+ gl.HALF_FLOAT_OES = ext.HALF_FLOAT_OES;
+
+ testPassed("Successfully enabled OES_texture_half_float extension");
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "HALF_FLOAT_OES", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<video width="640" height="228" id="vid" controls>
+ <source src="../resources/red-green.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
+ <source src="../resources/red-green.webmvp8.webm" type='video/webm; codecs="vp8, vorbis"' />
+ <source src="../resources/red-green.theora.ogv" type='video/ogg; codecs="theora, vorbis"' />
+</video>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float.html
new file mode 100644
index 000000000..fd47e55a8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float.html
@@ -0,0 +1,352 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL OES_texture_half_float Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<canvas id="canvas2d" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+<script id="testFragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+uniform sampler2D tex;
+uniform vec4 subtractor;
+varying vec2 texCoord;
+void main()
+{
+ vec4 color = texture2D(tex, texCoord);
+ if (abs(color.r - subtractor.r) +
+ abs(color.g - subtractor.g) +
+ abs(color.b - subtractor.b) +
+ abs(color.a - subtractor.a) < 8.0) {
+ gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+ } else {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+ }
+}
+</script>
+<!-- Shaders for testing half-floating-point render targets -->
+<script id="positionVertexShader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+<script id="floatingPointFragmentShader" type="x-shader/x-fragment">
+void main()
+{
+ gl_FragColor = vec4(10000.0, 10000.0, 10000.0, 10000.0);
+}
+</script>
+<script>
+"use strict"
+description("This test verifies the functionality of OES_texture_half_float with null/non-null ArrayBufferView");
+
+debug("");
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var colorCanvas = document.getElementById("canvas2d");
+colorCanvas.width = 2;
+colorCanvas.height = 2;
+var ctx = colorCanvas.getContext("2d");
+ctx.fillStyle = "rgb(255,0,0)";
+ctx.fillRect(0, 0, 2, 2);
+var gl = wtu.create3DContext(canvas);
+// This constant must be defined in order to run the texture creation test without the extension enabled.
+var halfFloatOESEnum = 0x8D61;
+var ext = null;
+
+if (!gl) {
+ testFailed("WebGL context does not exists");
+} else {
+ testPassed("WebGL context exists");
+
+ // Verify that allocation of texture fails if extension is not enabled
+ runTextureCreationTest(false);
+ ext = gl.getExtension("OES_texture_half_float")
+ if (!ext) {
+ testPassed("No OES_texture_half_float support. This is legal");
+ } else {
+ testPassed("Successfully enabled OES_texture_half_float extension");
+
+ var program = wtu.setupTexturedQuad(gl);
+
+ // Check if creation of texture succeed's with various formats and null ArrayBufferView
+ var formats = [
+ { format: gl.RGBA, expected: [255, 0, 0, 255], },
+ { format: gl.RGB, expected: [255, 0, 0, 255], },
+ { format: gl.LUMINANCE, expected: [255, 255, 255, 255], },
+ { format: gl.ALPHA, expected: [ 0, 0, 0, 255], },
+ { format: gl.LUMINANCE_ALPHA, expected: [255, 255, 255, 255], },
+ ];
+ formats.forEach(function(f) {
+ runTextureCreationTest(true, f.format, null, f.expected);
+ });
+
+ // Texture creation should fail when passed with non-null, non-Uint16 ArrayBufferView
+ formats.forEach(function(f) {
+ var width = 2;
+ var height = 2;
+ var format = f.format;
+
+ // Float32Array
+ var float32Data = new Float32Array(width * height * getNumberOfChannels(format));
+ for (var ii = 0; ii < float32Data.length; ii++) {
+ float32Data[ii] = 1000;
+ }
+ runTextureCreationTest(true, format, float32Data, null);
+
+ // Int16Array
+ var int16Data = new Int16Array(width * height * getNumberOfChannels(format));
+ for (var ii = 0; ii < int16Data.length; ii++) {
+ int16Data[ii] = 1000;
+ }
+ runTextureCreationTest(true, format, int16Data, null);
+ });
+
+ // Test that Uint16 encoded half float values can be used as texture data.
+
+ // First test that values in the 0-1 range can be written and read.
+ var halfFloatOneThird = 0x3555; // Half float 1/3
+ var uint16Formats = [
+ { format: gl.RGBA, expected: [85, 85, 85, 85], },
+ { format: gl.RGB, expected: [85, 85, 85, 255], },
+ { format: gl.LUMINANCE, expected: [85, 85, 85, 255], },
+ { format: gl.ALPHA, expected: [ 0, 0, 0, 85], },
+ { format: gl.LUMINANCE_ALPHA, expected: [85, 85, 85, 85], },
+ ];
+
+ uint16Formats.forEach(function(f) {
+ var width = 2;
+ var height = 2;
+ var format = f.format;
+
+ var uint16Data = new Uint16Array(width * height * getNumberOfChannels(format));
+ for (var ii = 0; ii < uint16Data.length; ii++) {
+ uint16Data[ii] = halfFloatOneThird;
+ }
+ runTextureCreationTest(true, format, uint16Data, f.expected);
+ });
+
+ // Next check that values outside the 0-1 range can be written.
+ var halfFloatTenK = 0x70E2; // Half float 10000
+ var uint16Formats2 = [
+ { format: gl.RGBA, subtractor: [10000, 10000, 10000, 10000], },
+ { format: gl.RGB, subtractor: [10000, 10000, 10000, 1], },
+ ];
+
+ uint16Formats2.forEach(function(f) {
+ var width = 2;
+ var height = 2;
+ var format = f.format;
+
+ var uint16Data = new Uint16Array(width * height * getNumberOfChannels(format));
+ for (var ii = 0; ii < uint16Data.length; ii++) {
+ uint16Data[ii] = halfFloatTenK;
+ }
+ runRenderTest(format, f.subtractor, uint16Data);
+ });
+
+ // Check if attaching texture as FBO target succeeds (Not mandatory)
+ runRenderTest(gl.RGBA, [10000, 10000, 10000, 10000], null);
+ runRenderTest(gl.RGB, [10000, 10000, 10000, 1], null);
+
+ // Check of getExtension() returns same object
+ runUniqueObjectTest();
+ }
+}
+
+function getNumberOfChannels(format)
+{
+ if (format == gl.RGBA)
+ return 4;
+ else if (format == gl.RGB)
+ return 3;
+ else if (format == gl.LUMINANCE || format == gl.ALPHA)
+ return 1;
+ else if (format == gl.LUMINANCE_ALPHA)
+ return 2;
+}
+
+function getFormatName(format)
+{
+ if (format == gl.RGBA)
+ return "RGBA";
+ else if (format == gl.RGB)
+ return "RGB";
+ else if (format == gl.LUMINANCE)
+ return "LUMINANCE";
+ else if (format == gl.ALPHA)
+ return "ALPHA";
+ else if (format == gl.LUMINANCE_ALPHA)
+ return "LUMINANCE_ALPHA";
+}
+
+function allocateTexture()
+{
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "texture parameter setup should succeed");
+ return texture;
+}
+
+function runTextureCreationTest(extensionEnabled, opt_format, opt_data, opt_expected)
+{
+ var format = opt_format || gl.RGBA;
+ var data = opt_data || null;
+ var expectSuccess = true;
+
+ if (!extensionEnabled || !opt_expected)
+ expectSuccess = false;
+ debug("Testing texture creation with extension " + (extensionEnabled ? "enabled" : "disabled") +
+ ", format " + getFormatName(format) + ", and data " + (data ? "non-null" : "null") +
+ ". Expect " + (expectSuccess ? "Success" : "Failure"));
+
+ var texture = allocateTexture();
+ var width = 2;
+ var height = 2;
+ gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, format, halfFloatOESEnum, data);
+ if(!extensionEnabled) {
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "Half floating point texture must be disallowed if OES_texture_half_float isn't enabled");
+ return;
+ } else if (!opt_expected) {
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "Half floating point texture allocation must be disallowed when ArrayBufferView is not-null and not-Uint16");
+ return;
+ } else {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Half floating point texture allocation should succeed if OES_texture_half_float is enabled");
+
+ if (!data) {
+ gl.texImage2D(gl.TEXTURE_2D, 0, format, format, halfFloatOESEnum, colorCanvas);
+ }
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, opt_expected);
+ // Check that linear fails.
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0, 0, 0, 255], "should be black");
+ }
+
+}
+
+function checkRenderingResults()
+{
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+}
+
+function runRenderTest(format, subtractor, data)
+{
+ var formatString = wtu.glEnumToString(gl, format);
+
+ debug("");
+
+ if (!data) {
+ debug("Testing half floating point " + formatString + " render target");
+ } else {
+ debug("Testing half floating point " + formatString + " from a Uint16Array");
+ }
+
+ var texture = allocateTexture();
+ var width = 2;
+ var height = 2;
+
+ gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, format, ext.HALF_FLOAT_OES, data);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Half floating point texture allocation should succeed if OES_texture_half_float is enabled");
+
+ if (!data) {
+ // Try to use this texture as render target
+ var fbo = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
+ gl.bindTexture(gl.TEXTURE_2D, null);
+
+ // It is legal for a WebGL implementation exposing the OES_texture_half_float extension to
+ // support half floating point textures but not as attachments to framebuffer objects.
+ if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE) {
+ debug("Half floating point render targets not supported -- this is legal");
+ return;
+ }
+
+ var renderProgram =
+ wtu.setupProgram(gl,
+ ["positionVertexShader", "floatingPointFragmentShader"],
+ ['vPosition'],
+ [0]);
+ wtu.drawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Rendering to half floating point texture should succeed");
+ }
+
+ // Now sample from the half floating-point texture and verify we got the correct values.
+ var texturedShaders = [
+ wtu.setupSimpleTextureVertexShader(gl),
+ "testFragmentShader"
+ ];
+ var testProgram =
+ wtu.setupProgram(gl,
+ [wtu.setupSimpleTextureVertexShader(gl), "testFragmentShader"],
+ ['vPosition', 'texCoord0'],
+ [0, 1]);
+ var quadParameters = wtu.setupUnitQuad(gl, 0, 1);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.useProgram(testProgram);
+ gl.uniform4fv(gl.getUniformLocation(testProgram, "subtractor"), subtractor);
+ wtu.drawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "rendering from half floating point texture should succeed");
+ checkRenderingResults();
+}
+
+function runUniqueObjectTest()
+{
+ debug("");
+ debug("Testing that getExtension() returns the same object each time");
+ gl.getExtension("OES_texture_half_float").myProperty = 2;
+ gc();
+ shouldBe('gl.getExtension("OES_texture_half_float").myProperty', '2');
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object-bufferData.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object-bufferData.html
new file mode 100644
index 000000000..7d2acf9dd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object-bufferData.html
@@ -0,0 +1,217 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL OES_vertex_array_object_bufferData Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<!-- comment in the script tag below to test through JS emualation of the extension. -->
+<!--
+<script src="../../../demos/google/resources/OESVertexArrayObject.js"></script>
+-->
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 a_position;
+attribute vec4 a_color;
+varying vec4 v_color;
+void main(void) {
+ gl_Position = a_position;
+ v_color = a_color;
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 v_color;
+void main(void) {
+ gl_FragColor = v_color;
+}
+</script>
+<script>
+"use strict";
+description("This test verifies drawing results when using gl.bufferData with the OES_vertex_array_object extension.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+var vao = null;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Setup emulated OESVertexArrayObject if it has been included.
+ if (window.setupVertexArrayObject) {
+ debug("using emuated OES_vertex_array_object");
+ setupVertexArrayObject(gl);
+ }
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = gl.getExtension("OES_vertex_array_object");
+ if (!ext) {
+ testPassed("No OES_vertex_array_object support -- this is legal");
+
+ } else {
+ testPassed("Successfully enabled OES_vertex_array_object extension");
+
+ runBufferDataTest();
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+ }
+}
+
+/**
+ * The OES_vertex_array_object extension seems to work incorrectly on some handheld devices,
+ * namely the Nexus 5, and Nexus 7 (in 2014/01) when using bufferData before binding the VAO.
+ * The tested OS was Android KitKat 4.4.2, the effects were the same in all tested browsers
+ * (Chrome, Chrome Beta, Firefox, Firefox Beta), so it is likely a driver bug.
+ * These devices have the similar Adreno 320 and Adreno 330 GPUs respectively.
+ *
+ * The issuse resulted from this sequence of actions in a requestAnimationFrame loop:
+ * 1. upload some vertex buffers with gl.bufferData (eg. colors)
+ * 2. bind the VAO
+ * 3. clear the canvas
+ * 4. draw (some triangles) to the canvas
+ * 5. unbind the VAO
+ *
+ * This caused the drawn triangles to be drawn with black (0) for most of the frames, with some
+ * rare frames presenting the correct render results. Interestingly on both devices exactly every
+ * 64th frame passed (starting with the very first one), the others failed.
+ * (Because of this, we test multiple frames.)
+ * When positions were uploaded, seemingly nothing was drawn, that's likely because the
+ * position buffer was also all 0s.
+ *
+ * The issue did not occur:
+ * - if step 1. and 2. were swapped
+ * - or if step5 was ommited (probably because that makes step 2 a no-op since the VAO is bound)
+ */
+function runBufferDataTest() {
+ debug("Testing draws with bufferData");
+
+ canvas.width = 50; canvas.height = 50;
+ gl.viewport(0, 0, canvas.width, canvas.height);
+
+ var testColor = [0, 255, 0, 255];
+ var clearColor = [255, 0, 0, 255];
+
+ // Where the issue occures, this is the sequence of success/failure every time:
+ // result: success fail fail fail fail ... success fail fail ...
+ // currentTestCount: 0 1 2 3 4 ... 64 65 66 ...
+ // So with just 1 test it passes, but 2 tests are enough. Here we use 3.
+ var numberOfTests = 3;
+ var currentTestCount = 0;
+
+ var positionLoc = 0;
+ var colorLoc = 1;
+ var gridRes = 1;
+
+ var program = wtu.setupSimpleVertexColorProgram(gl, positionLoc, colorLoc);
+
+ var vao0 = ext.createVertexArrayOES();
+ ext.bindVertexArrayOES(vao0);
+
+ var buffers = wtu.setupIndexedQuadWithOptions(gl,
+ { gridRes: gridRes,
+ positionLocation: positionLoc
+ });
+
+ var colorTypedArray = createColorTypedArray();
+
+ var colorBuffer = gl.createBuffer(gl.ARRAY_BUFFER);
+ gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
+ gl.enableVertexAttribArray(colorLoc);
+ gl.vertexAttribPointer(colorLoc, 4, gl.FLOAT, false, 0, 0);
+
+ ext.bindVertexArrayOES(null);
+
+ testDrawing();
+
+ function testDrawing() {
+ // this order works fine:
+ // ext.bindVertexArrayOES(vao0);
+ // uploadColor();
+
+ // this order doesn't:
+ uploadColor();
+ ext.bindVertexArrayOES(vao0);
+
+ wtu.clearAndDrawIndexedQuad(gl, 1, clearColor);
+
+ ext.bindVertexArrayOES(null);
+
+ //debug("<span>"+currentTestCount+"</span");
+ wtu.checkCanvas(gl, testColor, "should be green")
+
+ if (++currentTestCount < numberOfTests) {
+ testDrawing();
+ // wtu.requestAnimFrame(testDrawing);
+ } else {
+ // clean up
+ ext.deleteVertexArrayOES(vao0);
+ }
+ }
+
+ function uploadColor() {
+ gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
+ gl.bufferData(gl.ARRAY_BUFFER, colorTypedArray, gl.STREAM_DRAW);
+ }
+
+ function createColorTypedArray() {
+ var colors = [];
+ var pOffset = 0;
+ for (var yy = 0; yy <= gridRes; ++yy) {
+ for (var xx = 0; xx <= gridRes; ++xx) {
+ colors[pOffset + 0] = testColor[0];
+ colors[pOffset + 1] = testColor[1];
+ colors[pOffset + 2] = testColor[2];
+ colors[pOffset + 3] = testColor[3];
+ pOffset += 4;
+ }
+ }
+ return new Float32Array(colors);
+ }
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object.html
new file mode 100644
index 000000000..eec1b21be
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object.html
@@ -0,0 +1,659 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL OES_vertex_array_object Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<!-- comment in the script tag below to test through JS emulation of the extension. -->
+<!--
+<script src="../../../demos/google/resources/OESVertexArrayObject.js"></script>
+-->
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 a_position;
+attribute vec4 a_color;
+varying vec4 v_color;
+void main(void) {
+ gl_Position = a_position;
+ v_color = a_color;
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 v_color;
+void main(void) {
+ gl_FragColor = v_color;
+}
+</script>
+<script>
+"use strict";
+description("This test verifies the functionality of the OES_vertex_array_object extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+var vao = null;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Setup emulated OESVertexArrayObject if it has been included.
+ if (window.setupVertexArrayObject) {
+ debug("using emulated OES_vertex_array_object");
+ setupVertexArrayObject(gl);
+ }
+
+ // Run tests with extension disabled
+ runBindingTestDisabled();
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = gl.getExtension("OES_vertex_array_object");
+ if (!ext) {
+ testPassed("No OES_vertex_array_object support -- this is legal");
+
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled OES_vertex_array_object extension");
+
+ runSupportedTest(true);
+ runBindingTestEnabled();
+ runObjectTest();
+ runAttributeTests();
+ runAttributeValueTests();
+ runDrawTests();
+ runDeleteTests();
+ runArrayBufferBindTests();
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var supported = gl.getSupportedExtensions();
+ if (supported.indexOf("OES_vertex_array_object") >= 0) {
+ if (extensionEnabled) {
+ testPassed("OES_vertex_array_object listed as supported and getExtension succeeded");
+ } else {
+ testFailed("OES_vertex_array_object listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("OES_vertex_array_object not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("OES_vertex_array_object not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runBindingTestDisabled() {
+ debug("");
+ debug("Testing binding enum with extension disabled");
+
+ // Use the constant directly as we don't have the extension
+ var VERTEX_ARRAY_BINDING_OES = 0x85B5;
+
+ gl.getParameter(VERTEX_ARRAY_BINDING_OES);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "VERTEX_ARRAY_BINDING_OES should not be queryable if extension is disabled");
+}
+
+function runBindingTestEnabled() {
+ debug("");
+ debug("Testing binding enum with extension enabled");
+
+ shouldBe("ext.VERTEX_ARRAY_BINDING_OES", "0x85B5");
+
+ gl.getParameter(ext.VERTEX_ARRAY_BINDING_OES);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "VERTEX_ARRAY_BINDING_OES query should succeed if extension is enabled");
+
+ // Default value is null
+ if (gl.getParameter(ext.VERTEX_ARRAY_BINDING_OES) === null) {
+ testPassed("Default value of VERTEX_ARRAY_BINDING_OES is null");
+ } else {
+ testFailed("Default value of VERTEX_ARRAY_BINDING_OES is not null");
+ }
+
+ debug("");
+ debug("Testing binding a VAO");
+ var vao0 = ext.createVertexArrayOES();
+ var vao1 = ext.createVertexArrayOES();
+ shouldBeNull("gl.getParameter(ext.VERTEX_ARRAY_BINDING_OES)");
+ ext.bindVertexArrayOES(vao0);
+ if (gl.getParameter(ext.VERTEX_ARRAY_BINDING_OES) == vao0) {
+ testPassed("gl.getParameter(ext.VERTEX_ARRAY_BINDING_OES) is expected VAO");
+ } else {
+ testFailed("gl.getParameter(ext.VERTEX_ARRAY_BINDING_OES) is not expected VAO")
+ }
+ ext.bindVertexArrayOES(vao1);
+ if (gl.getParameter(ext.VERTEX_ARRAY_BINDING_OES) == vao1) {
+ testPassed("gl.getParameter(ext.VERTEX_ARRAY_BINDING_OES) is expected VAO");
+ } else {
+ testFailed("gl.getParameter(ext.VERTEX_ARRAY_BINDING_OES) is not expected VAO")
+ }
+ ext.deleteVertexArrayOES(vao1);
+ shouldBeNull("gl.getParameter(ext.VERTEX_ARRAY_BINDING_OES)");
+ ext.bindVertexArrayOES(vao1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "binding a deleted vertex array object");
+ ext.bindVertexArrayOES(null);
+ shouldBeNull("gl.getParameter(ext.VERTEX_ARRAY_BINDING_OES)");
+ ext.deleteVertexArrayOES(vao1);
+}
+
+function runObjectTest() {
+ debug("");
+ debug("Testing object creation");
+
+ vao = ext.createVertexArrayOES();
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "createVertexArrayOES should not set an error");
+ shouldBeNonNull("vao");
+
+ // Expect false if never bound
+ shouldBeFalse("ext.isVertexArrayOES(vao)");
+ ext.bindVertexArrayOES(vao);
+ shouldBeTrue("ext.isVertexArrayOES(vao)");
+ ext.bindVertexArrayOES(null);
+ shouldBeTrue("ext.isVertexArrayOES(vao)");
+
+ shouldBeFalse("ext.isVertexArrayOES(null)");
+
+ ext.deleteVertexArrayOES(vao);
+ vao = null;
+}
+
+function runAttributeTests() {
+ debug("");
+ debug("Testing attributes work across bindings");
+
+ var states = [];
+
+ var attrCount = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);
+ for (var n = 0; n < attrCount; n++) {
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+
+ var state = {};
+ states.push(state);
+
+ var vao = state.vao = ext.createVertexArrayOES();
+ ext.bindVertexArrayOES(vao);
+
+ var enableArray = (n % 2 == 0);
+ if (enableArray) {
+ gl.enableVertexAttribArray(n);
+ } else {
+ gl.disableVertexAttribArray(n);
+ }
+
+ if (enableArray) {
+ var buffer = state.buffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
+ gl.bufferData(gl.ARRAY_BUFFER, 1024, gl.STATIC_DRAW);
+
+ gl.vertexAttribPointer(n, 1 + n % 4, gl.FLOAT, true, n * 4, n * 4);
+ }
+
+ if (enableArray) {
+ var elbuffer = state.elbuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elbuffer);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, 1024, gl.STATIC_DRAW);
+ }
+
+ ext.bindVertexArrayOES(null);
+ }
+
+ var anyMismatch = false;
+ for (var n = 0; n < attrCount; n++) {
+ var state = states[n];
+
+ ext.bindVertexArrayOES(state.vao);
+
+ var shouldBeEnabled = (n % 2 == 0);
+ var isEnabled = gl.getVertexAttrib(n, gl.VERTEX_ATTRIB_ARRAY_ENABLED);
+ if (shouldBeEnabled != isEnabled) {
+ testFailed("VERTEX_ATTRIB_ARRAY_ENABLED not preserved");
+ anyMismatch = true;
+ }
+
+ var buffer = gl.getVertexAttrib(n, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING);
+ if (shouldBeEnabled) {
+ if (buffer == state.buffer) {
+ // Matched
+ if ((gl.getVertexAttrib(n, gl.VERTEX_ATTRIB_ARRAY_SIZE) == 1 + n % 4) &&
+ (gl.getVertexAttrib(n, gl.VERTEX_ATTRIB_ARRAY_TYPE) == gl.FLOAT) &&
+ (gl.getVertexAttrib(n, gl.VERTEX_ATTRIB_ARRAY_NORMALIZED) == true) &&
+ (gl.getVertexAttrib(n, gl.VERTEX_ATTRIB_ARRAY_STRIDE) == n * 4) &&
+ (gl.getVertexAttribOffset(n, gl.VERTEX_ATTRIB_ARRAY_POINTER) == n * 4)) {
+ // Matched
+ } else {
+ testFailed("VERTEX_ATTRIB_ARRAY_* not preserved");
+ anyMismatch = true;
+ }
+ } else {
+ testFailed("VERTEX_ATTRIB_ARRAY_BUFFER_BINDING not preserved");
+ anyMismatch = true;
+ }
+ } else {
+ // GL_CURRENT_VERTEX_ATTRIB is not preserved
+ if (buffer) {
+ testFailed("VERTEX_ATTRIB_ARRAY_BUFFER_BINDING not preserved");
+ anyMismatch = true;
+ }
+ }
+
+ var elbuffer = gl.getParameter(gl.ELEMENT_ARRAY_BUFFER_BINDING);
+ if (shouldBeEnabled) {
+ if (elbuffer == state.elbuffer) {
+ // Matched
+ } else {
+ testFailed("ELEMENT_ARRAY_BUFFER_BINDING not preserved");
+ anyMismatch = true;
+ }
+ } else {
+ if (elbuffer == null) {
+ // Matched
+ } else {
+ testFailed("ELEMENT_ARRAY_BUFFER_BINDING not preserved");
+ anyMismatch = true;
+ }
+ }
+ }
+ ext.bindVertexArrayOES(null);
+ if (!anyMismatch) {
+ testPassed("All attributes preserved across bindings");
+ }
+
+ for (var n = 0; n < attrCount; n++) {
+ var state = states[n];
+ ext.deleteVertexArrayOES(state.vao);
+ }
+}
+
+function runAttributeValueTests() {
+ debug("");
+ debug("Testing that attribute values are not attached to bindings");
+
+ var v;
+ var vao0 = ext.createVertexArrayOES();
+ var anyFailed = false;
+
+ ext.bindVertexArrayOES(null);
+ gl.vertexAttrib4f(0, 0, 1, 2, 3);
+
+ v = gl.getVertexAttrib(0, gl.CURRENT_VERTEX_ATTRIB);
+ if (!(v[0] == 0 && v[1] == 1 && v[2] == 2 && v[3] == 3)) {
+ testFailed("Vertex attrib value not round-tripped?");
+ anyFailed = true;
+ }
+
+ ext.bindVertexArrayOES(vao0);
+
+ v = gl.getVertexAttrib(0, gl.CURRENT_VERTEX_ATTRIB);
+ if (!(v[0] == 0 && v[1] == 1 && v[2] == 2 && v[3] == 3)) {
+ testFailed("Vertex attrib value reset across bindings");
+ anyFailed = true;
+ }
+
+ gl.vertexAttrib4f(0, 4, 5, 6, 7);
+ ext.bindVertexArrayOES(null);
+
+ v = gl.getVertexAttrib(0, gl.CURRENT_VERTEX_ATTRIB);
+ if (!(v[0] == 4 && v[1] == 5 && v[2] == 6 && v[3] == 7)) {
+ testFailed("Vertex attrib value bound to buffer");
+ anyFailed = true;
+ }
+
+ if (!anyFailed) {
+ testPassed("Vertex attribute values are not attached to bindings")
+ }
+
+ ext.bindVertexArrayOES(null);
+ ext.deleteVertexArrayOES(vao0);
+}
+
+function runDrawTests() {
+ debug("");
+ debug("Testing draws with various VAO bindings");
+
+ canvas.width = 50; canvas.height = 50;
+ gl.viewport(0, 0, canvas.width, canvas.height);
+
+ var vao0 = ext.createVertexArrayOES();
+ var vao1 = ext.createVertexArrayOES();
+ var vao2 = ext.createVertexArrayOES();
+
+ var positionLocation = 0;
+ var colorLocation = 1;
+
+ var program = wtu.setupSimpleVertexColorProgram(gl, positionLocation, colorLocation);
+
+ function setupQuad(s, colorsInArray) {
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ 1.0 * s, 1.0 * s, 0.0,
+ -1.0 * s, 1.0 * s, 0.0,
+ -1.0 * s, -1.0 * s, 0.0,
+ 1.0 * s, 1.0 * s, 0.0,
+ -1.0 * s, -1.0 * s, 0.0,
+ 1.0 * s, -1.0 * s, 0.0]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(positionLocation);
+ gl.vertexAttribPointer(positionLocation, 3, gl.FLOAT, false, 0, 0);
+
+ // Test switching between VAOs that have different number of enabled arrays
+ if (colorsInArray) {
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ 0.0, 0.0, 0.0, 1.0,
+ 0.0, 0.0, 0.0, 1.0,
+ 0.0, 0.0, 0.0, 1.0,
+ 0.0, 0.0, 0.0, 1.0,
+ 0.0, 0.0, 0.0, 1.0,
+ 0.0, 0.0, 0.0, 1.0]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(colorLocation);
+ gl.vertexAttribPointer(colorLocation, 4, gl.FLOAT, false, 0, 0);
+ } else {
+ gl.disableVertexAttribArray(colorLocation);
+ }
+ };
+
+ function verifyDiagonalPixels(s, expectedInside, drawDescription) {
+ // Tests pixels along a diagonal running from the center of the canvas to the (0, 0) corner.
+ // Values on the points list indicate relative position along this diagonal.
+ var points = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0];
+ for (var n = 0; n < points.length; n++) {
+ var expected = points[n] <= s ? expectedInside : 255;
+ var x = Math.round((1 - points[n]) * canvas.width / 2);
+ var y = Math.round((1 - points[n]) * canvas.height / 2);
+ wtu.checkCanvasRect(gl, x, y, 1, 1, [expected, expected, expected, 255],
+ "Drawing " + drawDescription + " should pass", 2);
+ }
+ };
+ function verifyDraw(drawDescription, s, colorsInArray) {
+ wtu.clearAndDrawUnitQuad(gl);
+ var expectedInside = colorsInArray ? 0 : 128;
+ verifyDiagonalPixels(s, expectedInside, drawDescription);
+ };
+
+ // Setup all bindings
+ setupQuad(1, true);
+ ext.bindVertexArrayOES(vao0);
+ setupQuad(0.5, true);
+ ext.bindVertexArrayOES(vao1);
+ setupQuad(0.25, true);
+ ext.bindVertexArrayOES(vao2);
+ setupQuad(0.75, false);
+
+ gl.vertexAttrib4f(colorLocation, 0.5, 0.5, 0.5, 1);
+
+ // Verify drawing
+ ext.bindVertexArrayOES(null);
+ verifyDraw("with the default VAO", 1, true);
+ ext.bindVertexArrayOES(vao0);
+ verifyDraw("with VAO #0", 0.5, true);
+ ext.bindVertexArrayOES(vao1);
+ verifyDraw("with VAO #1", 0.25, true);
+ ext.bindVertexArrayOES(vao2);
+ verifyDraw("with VAO that has the color array disabled", 0.75, false);
+
+ // Verify bound VAO after delete
+ ext.bindVertexArrayOES(vao1);
+ ext.deleteVertexArrayOES(vao0);
+ verifyDraw("after deleting another VAO", 0.25, true);
+ ext.deleteVertexArrayOES(vao1);
+ verifyDraw("after deleting the VAO that was bound", 1, true);
+
+ // Disable global vertex attrib array
+ gl.disableVertexAttribArray(positionLocation);
+ gl.disableVertexAttribArray(colorLocation);
+
+ // Check that constant values are treated correctly as not being part of VAO state.
+ var positionLoc = 0;
+ var colorLoc = 1;
+ var gridRes = 1;
+ wtu.setupIndexedQuad(gl, gridRes, positionLoc);
+ // Set the vertex color to red.
+ gl.vertexAttrib4f(colorLoc, 1, 0, 0, 1);
+
+ var vao0 = ext.createVertexArrayOES();
+ ext.bindVertexArrayOES(vao0);
+ var program = wtu.setupSimpleVertexColorProgram(gl, positionLoc, colorLoc);
+ wtu.setupIndexedQuad(gl, gridRes, positionLoc);
+ // Set the vertex color to green.
+ gl.vertexAttrib4f(colorLoc, 0, 1, 0, 1);
+ wtu.clearAndDrawIndexedQuad(gl, gridRes);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+ ext.deleteVertexArrayOES(vao0);
+ wtu.clearAndDrawIndexedQuad(gl, gridRes);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+}
+
+function runDeleteTests() {
+ debug("");
+ debug("Testing using deleted buffers referenced by VAOs");
+
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["a_position", "a_color"]);
+ gl.useProgram(program);
+
+ var positionBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);
+ gl.bufferData(
+ gl.ARRAY_BUFFER,
+ new Float32Array([
+ 1.0, 1.0,
+ -1.0, 1.0,
+ -1.0, -1.0,
+ 1.0, -1.0]),
+ gl.STATIC_DRAW);
+
+ var colors = [
+ [255, 0, 0, 255],
+ [ 0, 255, 0, 255],
+ [ 0, 0, 255, 255],
+ [ 0, 255, 255, 255]
+ ];
+ var colorBuffers = [];
+ var elementBuffers = [];
+ var vaos = [];
+ for (var ii = 0; ii < colors.length; ++ii) {
+ var vao = ext.createVertexArrayOES();
+ vaos.push(vao);
+ ext.bindVertexArrayOES(vao);
+ // Set the position buffer
+ gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+
+ var elementBuffer = gl.createBuffer();
+ elementBuffers.push(elementBuffer);
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementBuffer);
+ gl.bufferData(
+ gl.ELEMENT_ARRAY_BUFFER,
+ new Uint8Array([0, 1, 2, 0, 2, 3]),
+ gl.STATIC_DRAW);
+
+ // Setup the color attrib
+ var color = colors[ii];
+ if (ii < 3) {
+ var colorBuffer = gl.createBuffer();
+ colorBuffers.push(colorBuffer);
+ gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);
+ gl.bufferData(gl.ARRAY_BUFFER, new Uint8Array(
+ [ color[0], color[1], color[2], color[3],
+ color[0], color[1], color[2], color[3],
+ color[0], color[1], color[2], color[3],
+ color[0], color[1], color[2], color[3]
+ ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(1);
+ gl.vertexAttribPointer(1, 4, gl.UNSIGNED_BYTE, true, 0, 0);
+ } else {
+ gl.vertexAttrib4f(1, color[0] / 255, color[1] / 255, color[2] / 255, color[3] / 255);
+ }
+ }
+
+ // delete the color buffers AND the position buffer.
+ ext.bindVertexArrayOES(null);
+ for (var ii = 0; ii < colorBuffers.length; ++ii) {
+ gl.deleteBuffer(colorBuffers[ii]);
+ gl.deleteBuffer(elementBuffers[ii]);
+ ext.bindVertexArrayOES(vaos[ii]);
+ var boundBuffer = gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING);
+ // The buffers should still be valid at this point, since it was attached to the VAO
+ if(boundBuffer != colorBuffers[ii]) {
+ testFailed("buffer removed even though it is still attached to a VAO");
+ }
+ }
+
+ ext.bindVertexArrayOES(null);
+ gl.deleteBuffer(positionBuffer);
+
+ // Render with the deleted buffers. As they are referenced by VAOs they
+ // must still be around.
+ for (var ii = 0; ii < colors.length; ++ii) {
+ var color = colors[ii];
+ ext.bindVertexArrayOES(vaos[ii]);
+ gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_BYTE, 0);
+ wtu.checkCanvas(gl, color, "should be " + color);
+ }
+
+ // Clean up.
+ for (var ii = 0; ii < colorBuffers.length; ++ii) {
+ ext.deleteVertexArrayOES(vaos[ii]);
+ }
+
+ for (var ii = 0; ii < colorBuffers.length; ++ii) {
+ // The buffers should no longer be valid now that the VAOs are deleted
+ if(gl.isBuffer(colorBuffers[ii])) {
+ testFailed("buffer not properly cleaned up after VAO deletion");
+ }
+ }
+}
+
+function runArrayBufferBindTests() {
+ debug("");
+ debug("Testing that buffer bindings on VAOs don't affect default VAO ARRAY_BUFFER binding.");
+
+ ext.bindVertexArrayOES(null);
+
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["a_color", "a_position"]);
+ gl.useProgram(program);
+
+ // create shared element buffer
+ var elementBuffer = gl.createBuffer();
+ // bind to default
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementBuffer);
+ gl.bufferData(
+ gl.ELEMENT_ARRAY_BUFFER,
+ new Uint8Array([0, 1, 2, 0, 2, 3]),
+ gl.STATIC_DRAW);
+
+ // first create the buffers for no VAO draw.
+ var nonVAOColorBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, nonVAOColorBuffer);
+ gl.bufferData(gl.ARRAY_BUFFER, new Uint8Array(
+ [ 0, 255, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255,
+ ]), gl.STATIC_DRAW);
+
+ // shared position buffer.
+ var positionBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);
+ gl.bufferData(
+ gl.ARRAY_BUFFER,
+ new Float32Array([
+ 1.0, 1.0,
+ -1.0, 1.0,
+ -1.0, -1.0,
+ 1.0, -1.0]),
+ gl.STATIC_DRAW);
+
+ // attach position buffer to default
+ gl.enableVertexAttribArray(1);
+ gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, 0);
+
+ // now create VAO
+ var vao = ext.createVertexArrayOES();
+ ext.bindVertexArrayOES(vao);
+
+ // attach the position buffer VAO
+ gl.enableVertexAttribArray(1);
+ gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, 0);
+
+ var vaoColorBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vaoColorBuffer);
+ gl.bufferData(gl.ARRAY_BUFFER, new Uint8Array(
+ [ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 4, gl.UNSIGNED_BYTE, true, 0, 0);
+
+ // now set the buffer back to the nonVAOColorBuffer
+ gl.bindBuffer(gl.ARRAY_BUFFER, nonVAOColorBuffer);
+
+ // bind to VAO
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementBuffer);
+ gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_BYTE, 0);
+ wtu.checkCanvas(gl, [255, 0, 0, 255], "should be red");
+
+ // unbind VAO
+ ext.bindVertexArrayOES(null);
+
+ // At this point the nonVAOColorBuffer should be still be bound.
+ // If the WebGL impl is emulating VAOs it must make sure
+ // it correctly restores this binding.
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 4, gl.UNSIGNED_BYTE, true, 0, 0);
+ gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_BYTE, 0);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html
new file mode 100644
index 000000000..7c4ff09e1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html
@@ -0,0 +1,422 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<title>WebGL WEBGL_compressed_texture_atc Conformance Tests</title>
+<style>
+img {
+ border: 1px solid black;
+ margin-right: 1em;
+}
+.testimages {
+}
+
+.testimages br {
+ clear: both;
+}
+
+.testimages > div {
+ float: left;
+ margin: 1em;
+}
+</style>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" width="8" height="8" style="width: 8px; height: 8px;"></canvas>
+<div id="console"></div>
+<script>
+"use strict";
+description("This test verifies the functionality of the WEBGL_compressed_texture_atc extension, if it is available.");
+
+debug("");
+
+// Compressed textures generated with AMD's Compressonator tool
+// http://developer.amd.com/resources/archive/archived-tools/gpu-tools-archive/the-compressonator/
+var img_4x4_rgba_raw = new Uint8Array([
+ 0xff,0x00,0x00,0x69,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,
+ 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,
+ 0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,
+ 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,
+]);
+var img_4x4_rgb_atc = new Uint8Array([
+ 0x00,0x7c,0xe0,0x07,0xcc,0xcf,0xc0,0xff,
+]);
+var img_4x4_rgba_atc_explicit = new Uint8Array([
+ 0xf6,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x7c,0xe0,0x07,0xcc,0xcf,0xc0,0xff,
+]);
+var img_4x4_rgba_atc_interpolated = new Uint8Array([
+ 0xff,0x6a,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0xe0,0x07,0xcc,0xcf,0xc0,0xff,
+]);
+var img_8x8_rgba_raw = new Uint8Array([
+ 0xff,0x00,0x00,0x69,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,
+ 0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,
+ 0x00,0xff,0x00,0x69,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,
+ 0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,
+ 0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,
+ 0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,
+ 0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,
+ 0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,
+ 0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,
+ 0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,
+ 0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,
+ 0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,
+ 0x00,0xff,0x00,0x69,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,
+ 0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,
+ 0xff,0x00,0xff,0x69,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,
+ 0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,
+]);
+var img_8x8_rgb_atc = new Uint8Array([
+ 0x00,0x7c,0xe0,0x07,0xcc,0xcf,0xc0,0xff,0x1f,0x00,0xe0,0xff,0x33,0x30,0x3f,0x00,
+ 0x1f,0x7c,0xe0,0x07,0x33,0x30,0x3f,0x00,0x1f,0x00,0xff,0x07,0xcc,0xcf,0xc0,0xff,
+]);
+var img_8x8_rgba_atc_explicit = new Uint8Array([
+ 0xf6,0xff,0xf6,0xff,0xff,0xff,0xff,0xff,0x00,0x7c,0xe0,0x07,0xcc,0xcf,0xc0,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0xe0,0xff,0x33,0x30,0x3f,0x00,
+ 0xff,0xff,0xff,0xff,0xf6,0xff,0xf6,0xff,0x1f,0x7c,0xe0,0x07,0x33,0x30,0x3f,0x00,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0xff,0x07,0xcc,0xcf,0xc0,0xff,
+]);
+var img_8x8_rgba_atc_interpolated = new Uint8Array([
+ 0xff,0x6a,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0x7c,0xe0,0x07,0xcc,0xcf,0xc0,0xff,
+ 0x00,0xff,0x49,0x92,0x24,0x49,0x92,0x24,0x1f,0x00,0xe0,0xff,0x33,0x30,0x3f,0x00,
+ 0xff,0x69,0x00,0x00,0x00,0x01,0x10,0x00,0x1f,0x7c,0xe0,0x07,0x33,0x30,0x3f,0x00,
+ 0x00,0xff,0x49,0x92,0x24,0x49,0x92,0x24,0x1f,0x00,0xff,0x07,0xcc,0xcf,0xc0,0xff,
+]);
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas, {antialias: false});
+var program = wtu.setupTexturedQuad(gl);
+var ext = null;
+var vao = null;
+var validFormats = {
+ COMPRESSED_RGB_ATC_WEBGL : 0x8C92,
+ COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL : 0x8C93,
+ COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL : 0x87EE,
+};
+var name;
+var supportedFormats;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Run tests with extension disabled
+ runTestDisabled();
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = wtu.getExtensionWithKnownPrefixes(gl, "WEBGL_compressed_texture_atc");
+ if (!ext) {
+ testPassed("No WEBGL_compressed_texture_atc support -- this is legal");
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled WEBGL_compressed_texture_atc extension");
+
+ runSupportedTest(true);
+ runTestExtension();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var name = wtu.getSupportedExtensionWithKnownPrefixes(gl, "WEBGL_compressed_texture_atc");
+ if (name !== undefined) {
+ if (extensionEnabled) {
+ testPassed("WEBGL_compressed_texture_atc listed as supported and getExtension succeeded");
+ } else {
+ testFailed("WEBGL_compressed_texture_atc listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("WEBGL_compressed_texture_atc not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("WEBGL_compressed_texture_atc not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+
+function runTestDisabled() {
+ debug("Testing binding enum with extension disabled");
+
+ shouldBe('gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS)', '[]');
+}
+
+function formatExists(format, supportedFormats) {
+ for (var ii = 0; ii < supportedFormats.length; ++ii) {
+ if (format == supportedFormats[ii]) {
+ testPassed("supported format " + formatToString(format) + " is exists");
+ return;
+ }
+ }
+ testFailed("supported format " + formatToString(format) + " does not exist");
+}
+
+function formatToString(format) {
+ for (var p in ext) {
+ if (ext[p] == format) {
+ return p;
+ }
+ }
+ return "0x" + format.toString(16);
+}
+
+function runTestExtension() {
+ debug("Testing WEBGL_compressed_texture_atc");
+
+ // check that all format enums exist.
+ for (name in validFormats) {
+ var expected = "0x" + validFormats[name].toString(16);
+ var actual = "ext['" + name + "']";
+ shouldBe(actual, expected);
+ }
+
+ supportedFormats = gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS);
+ // There should be exactly 3 formats
+ shouldBe("supportedFormats.length", "3");
+
+ // check that all 3 formats exist
+ for (var name in validFormats.length) {
+ formatExists(validFormats[name], supportedFormats);
+ }
+
+ // Test each format
+ testATC_RGB();
+ testATC_RGBA_Explicit();
+ testATC_RGBA_Interpolated();
+}
+
+function testATC_RGB() {
+ var tests = [
+ { width: 4,
+ height: 4,
+ channels: 3,
+ data: img_4x4_rgb_atc,
+ raw: img_4x4_rgba_raw,
+ format: ext.COMPRESSED_RGB_ATC_WEBGL
+ },
+ { width: 8,
+ height: 8,
+ channels: 3,
+ data: img_8x8_rgb_atc,
+ raw: img_8x8_rgba_raw,
+ format: ext.COMPRESSED_RGB_ATC_WEBGL
+ }
+ ];
+ testACTTextures(tests);
+}
+
+function testATC_RGBA_Explicit() {
+ var tests = [
+ { width: 4,
+ height: 4,
+ channels: 4,
+ data: img_4x4_rgba_atc_explicit,
+ raw: img_4x4_rgba_raw,
+ format: ext.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL
+ },
+ { width: 8,
+ height: 8,
+ channels: 4,
+ data: img_8x8_rgba_atc_explicit,
+ raw: img_8x8_rgba_raw,
+ format: ext.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL
+ }
+ ];
+ testACTTextures(tests);
+}
+
+function testATC_RGBA_Interpolated() {
+ var tests = [
+ { width: 4,
+ height: 4,
+ channels: 4,
+ data: img_4x4_rgba_atc_interpolated,
+ raw: img_4x4_rgba_raw,
+ format: ext.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL
+ },
+ { width: 8,
+ height: 8,
+ channels: 4,
+ data: img_8x8_rgba_atc_interpolated,
+ raw: img_8x8_rgba_raw,
+ format: ext.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL
+ }
+ ];
+ testACTTextures(tests);
+}
+
+function testACTTextures(tests) {
+ debug("<hr/>");
+ for (var ii = 0; ii < tests.length; ++ii) {
+ testACTTexture(tests[ii]);
+ }
+}
+
+function testACTTexture(test) {
+ var data = new Uint8Array(test.data);
+ var width = test.width;
+ var height = test.height;
+ var format = test.format;
+ var uncompressedData = test.raw;
+
+ canvas.width = width;
+ canvas.height = height;
+ gl.viewport(0, 0, width, height);
+ debug("testing " + formatToString(format) + " " + width + "x" + height);
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture");
+ gl.generateMipmap(gl.TEXTURE_2D);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "trying to generate mipmaps from compressed texture");
+ wtu.clearAndDrawUnitQuad(gl);
+ compareRect(width, height, test.channels, width, height, uncompressedData, data, format);
+
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width + 4, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height + 4, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 4, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 4, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 1, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 2, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 1, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 2, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+
+ gl.compressedTexImage2D(gl.TEXTURE_2D, -1, format, 1, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "cannot specify negative mip level");
+
+ // ATC Does not allow use of CompressedTexSubImage
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "compressedTexSubImage2D not allowed");
+}
+
+function insertImg(element, caption, img) {
+ var div = document.createElement("div");
+ div.appendChild(img);
+ var label = document.createElement("div");
+ label.appendChild(document.createTextNode(caption));
+ div.appendChild(label);
+ element.appendChild(div);
+}
+
+function makeImage(imageWidth, imageHeight, dataWidth, data, alpha) {
+ var scale = 8;
+ var c = document.createElement("canvas");
+ c.width = imageWidth * scale;
+ c.height = imageHeight * scale;
+ var ctx = c.getContext("2d");
+ for (var yy = 0; yy < imageHeight; ++yy) {
+ for (var xx = 0; xx < imageWidth; ++xx) {
+ var offset = (yy * dataWidth + xx) * 4;
+ ctx.fillStyle = "rgba(" +
+ data[offset + 0] + "," +
+ data[offset + 1] + "," +
+ data[offset + 2] + "," +
+ (alpha ? data[offset + 3] / 255 : 1) + ")";
+ ctx.fillRect(xx * scale, yy * scale, scale, scale);
+ }
+ }
+ return wtu.makeImageFromCanvas(c);
+}
+function compareRect(
+ actualWidth, actualHeight, actualChannels,
+ dataWidth, dataHeight, expectedData,
+ testData, testFormat, tolerance) {
+ if(typeof(tolerance) == 'undefined') { tolerance = 5; }
+ var actual = new Uint8Array(actualWidth * actualHeight * 4);
+ gl.readPixels(
+ 0, 0, actualWidth, actualHeight, gl.RGBA, gl.UNSIGNED_BYTE, actual);
+
+ var div = document.createElement("div");
+ div.className = "testimages";
+ insertImg(div, "expected", makeImage(
+ actualWidth, actualHeight, dataWidth, expectedData,
+ actualChannels == 4));
+ insertImg(div, "actual", makeImage(
+ actualWidth, actualHeight, actualWidth, actual,
+ actualChannels == 4));
+ div.appendChild(document.createElement('br'));
+ document.getElementById("console").appendChild(div);
+
+ var failed = false;
+ for (var yy = 0; yy < actualHeight; ++yy) {
+ for (var xx = 0; xx < actualWidth; ++xx) {
+ var actualOffset = (yy * actualWidth + xx) * 4;
+ var expectedOffset = (yy * dataWidth + xx) * 4;
+ var expected = [
+ expectedData[expectedOffset + 0],
+ expectedData[expectedOffset + 1],
+ expectedData[expectedOffset + 2],
+ (actualChannels == 3 ? 255 : expectedData[expectedOffset + 3])
+ ];
+ for (var jj = 0; jj < 4; ++jj) {
+ if (Math.abs(actual[actualOffset + jj] - expected[jj]) > tolerance) {
+ failed = true;
+ var was = actual[actualOffset + 0].toString();
+ for (j = 1; j < 4; ++j) {
+ was += "," + actual[actualOffset + j];
+ }
+ testFailed('at (' + xx + ', ' + yy +
+ ') expected: ' + expected + ' was ' + was);
+ }
+ }
+ }
+ }
+ if (!failed) {
+ testPassed("texture rendered correctly");
+ }
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html
new file mode 100644
index 000000000..5c771b8dc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html
@@ -0,0 +1,387 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<title>WebGL WEBGL_compressed_texture_pvrtc Conformance Tests</title>
+<style>
+img {
+ border: 1px solid black;
+ margin-right: 1em;
+}
+.testimages {
+}
+
+.testimages br {
+ clear: both;
+}
+
+.testimages > div {
+ float: left;
+ margin: 1em;
+}
+</style>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" width="8" height="8" style="width: 8px; height: 8px;"></canvas>
+<div id="console"></div>
+<script>
+"use strict";
+description("This test verifies the functionality of the WEBGL_compressed_texture_pvrtc extension, if it is available.");
+
+debug("");
+
+var pvrtc_4x4_2bpp = new Uint8Array([
+ 0x77, 0x22, 0x77, 0x22, 0xbb, 0x2b, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+]);
+
+var pvrtc_4x4_4bpp = new Uint8Array([
+ 0x1b, 0x1b, 0x1b, 0x1b, 0xba, 0x2b, 0x00, 0x80, 0x1b, 0x1b, 0x1b, 0x1b, 0xba, 0x2b, 0x00, 0x80,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+]);
+
+var pvrtc_4x4_rgba_decoded = new Uint8Array([
+ 0x00, 0x00, 0x00, 0xff, 0x46, 0x46, 0x46, 0xb8, 0x76, 0x76, 0x71, 0x8a, 0xbd, 0xbd, 0xba, 0x44,
+ 0x00, 0x00, 0x00, 0xff, 0x46, 0x46, 0x43, 0xb8, 0x76, 0x76, 0x71, 0x8a, 0xbd, 0xbd, 0xb5, 0x44,
+ 0x00, 0x00, 0x00, 0xff, 0x46, 0x46, 0x43, 0xb8, 0x76, 0x76, 0x71, 0x8a, 0xbd, 0xbd, 0xb5, 0x44,
+ 0x00, 0x00, 0x00, 0xff, 0x46, 0x46, 0x46, 0xb8, 0x76, 0x76, 0x71, 0x8a, 0xbd, 0xbd, 0xb7, 0x44,
+]);
+
+var pvrtc_4x4_rgb_decoded = new Uint8Array([
+ 0x00, 0x00, 0x00, 0xff, 0x46, 0x46, 0x46, 0xff, 0x76, 0x76, 0x71, 0xff, 0xbd, 0xbd, 0xba, 0xff,
+ 0x00, 0x00, 0x00, 0xff, 0x46, 0x46, 0x43, 0xff, 0x76, 0x76, 0x71, 0xff, 0xbd, 0xbd, 0xb5, 0xff,
+ 0x00, 0x00, 0x00, 0xff, 0x46, 0x46, 0x43, 0xff, 0x76, 0x76, 0x71, 0xff, 0xbd, 0xbd, 0xb5, 0xff,
+ 0x00, 0x00, 0x00, 0xff, 0x46, 0x46, 0x46, 0xff, 0x76, 0x76, 0x71, 0xff, 0xbd, 0xbd, 0xb7, 0xff,
+]);
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas, {antialias: false});
+var program = wtu.setupTexturedQuad(gl);
+var ext = null;
+var vao = null;
+var validFormats = {
+ COMPRESSED_RGB_PVRTC_4BPPV1_IMG : 0x8C00,
+ COMPRESSED_RGB_PVRTC_2BPPV1_IMG : 0x8C01,
+ COMPRESSED_RGBA_PVRTC_4BPPV1_IMG : 0x8C02,
+ COMPRESSED_RGBA_PVRTC_2BPPV1_IMG : 0x8C03,
+};
+var name;
+var supportedFormats;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Run tests with extension disabled
+ runTestDisabled();
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = wtu.getExtensionWithKnownPrefixes(gl, "WEBGL_compressed_texture_pvrtc");
+ if (!ext) {
+ testPassed("No WEBGL_compressed_texture_pvrtc support -- this is legal");
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled WEBGL_compressed_texture_pvrtc extension");
+
+ runSupportedTest(true);
+ runTestExtension();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var name = wtu.getSupportedExtensionWithKnownPrefixes(gl, "WEBGL_compressed_texture_pvrtc");
+ if (name !== undefined) {
+ if (extensionEnabled) {
+ testPassed("WEBGL_compressed_texture_pvrtc listed as supported and getExtension succeeded");
+ } else {
+ testFailed("WEBGL_compressed_texture_pvrtc listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("WEBGL_compressed_texture_pvrtc not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("WEBGL_compressed_texture_pvrtc not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+
+function runTestDisabled() {
+ debug("Testing binding enum with extension disabled");
+
+ shouldBe('gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS)', '[]');
+}
+
+function formatExists(format, supportedFormats) {
+ for (var ii = 0; ii < supportedFormats.length; ++ii) {
+ if (format == supportedFormats[ii]) {
+ testPassed("supported format " + formatToString(format) + " is exists");
+ return;
+ }
+ }
+ testFailed("supported format " + formatToString(format) + " does not exist");
+}
+
+function formatToString(format) {
+ for (var p in ext) {
+ if (ext[p] == format) {
+ return p;
+ }
+ }
+ return "0x" + format.toString(16);
+}
+
+function runTestExtension() {
+ debug("Testing WEBGL_compressed_texture_pvrtc");
+
+ // check that all format enums exist.
+ for (name in validFormats) {
+ var expected = "0x" + validFormats[name].toString(16);
+ var actual = "ext['" + name + "']";
+ shouldBe(actual, expected);
+ }
+
+ supportedFormats = gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS);
+ // There should be exactly 4 formats
+ shouldBe("supportedFormats.length", "4");
+
+ // check that all 4 formats exist
+ for (var name in validFormats.length) {
+ formatExists(validFormats[name], supportedFormats);
+ }
+
+ // Test each format
+ testPVRTC_RGBA_2BPP();
+ testPVRTC_RGB_2BPP();
+ testPVRTC_RGBA_4BPP();
+ testPVRTC_RGB_4BPP();
+}
+
+function testPVRTC_RGBA_2BPP() {
+ var tests = [
+ { width: 4,
+ height: 4,
+ channels: 4,
+ data: pvrtc_4x4_2bpp,
+ raw: pvrtc_4x4_rgba_decoded,
+ format: ext.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG
+ }
+ ];
+ testPVRTCTextures(tests);
+}
+
+function testPVRTC_RGB_2BPP() {
+ var tests = [
+ { width: 4,
+ height: 4,
+ channels: 4,
+ data: pvrtc_4x4_2bpp,
+ raw: pvrtc_4x4_rgb_decoded,
+ format: ext.COMPRESSED_RGB_PVRTC_2BPPV1_IMG
+ }
+ ];
+ testPVRTCTextures(tests);
+}
+
+function testPVRTC_RGBA_4BPP() {
+ var tests = [
+ { width: 4,
+ height: 4,
+ channels: 4,
+ data: pvrtc_4x4_4bpp,
+ raw: pvrtc_4x4_rgba_decoded,
+ format: ext.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG
+ }
+ ];
+ testPVRTCTextures(tests);
+}
+
+function testPVRTC_RGB_4BPP() {
+ var tests = [
+ { width: 4,
+ height: 4,
+ channels: 4,
+ data: pvrtc_4x4_4bpp,
+ raw: pvrtc_4x4_rgb_decoded,
+ format: ext.COMPRESSED_RGB_PVRTC_4BPPV1_IMG
+ }
+ ];
+ testPVRTCTextures(tests);
+}
+
+function testPVRTCTextures(tests) {
+ debug("<hr/>");
+ for (var ii = 0; ii < tests.length; ++ii) {
+ testPVRTCTexture(tests[ii]);
+ }
+}
+
+function testPVRTCTexture(test) {
+ var data = new Uint8Array(test.data);
+ var width = test.width;
+ var height = test.height;
+ var format = test.format;
+ var uncompressedData = test.raw;
+
+ canvas.width = width;
+ canvas.height = height;
+ gl.viewport(0, 0, width, height);
+ debug("testing " + formatToString(format) + " " + width + "x" + height);
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture");
+ gl.generateMipmap(gl.TEXTURE_2D);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "trying to generate mipmaps from compressed texture");
+ wtu.drawQuad(gl);
+ compareRect(width, height, test.channels, width, height, uncompressedData, data, format);
+
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height, 1, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "non 0 border");
+
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 1, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 2, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 1, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 2, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height, format, data);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "compressedTexSubImage2D allowed for reloading of complete textures");
+
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width - 2, height, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "compressedTexSubImage2D not allowed for partial texture updates");
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height - 2, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "compressedTexSubImage2D not allowed for partial texture updates");
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 2, 0, width - 2, height, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "compressedTexSubImage2D not allowed for partial texture updates");
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 2, width, height - 2, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "compressedTexSubImage2D not allowed for partial texture updates");
+}
+
+function insertImg(element, caption, img) {
+ var div = document.createElement("div");
+ div.appendChild(img);
+ var label = document.createElement("div");
+ label.appendChild(document.createTextNode(caption));
+ div.appendChild(label);
+ element.appendChild(div);
+}
+
+function makeImage(imageWidth, imageHeight, dataWidth, data, alpha) {
+ var scale = 8;
+ var c = document.createElement("canvas");
+ c.width = imageWidth * scale;
+ c.height = imageHeight * scale;
+ var ctx = c.getContext("2d");
+ for (var yy = 0; yy < imageHeight; ++yy) {
+ for (var xx = 0; xx < imageWidth; ++xx) {
+ var offset = (yy * dataWidth + xx) * 4;
+ ctx.fillStyle = "rgba(" +
+ data[offset + 0] + "," +
+ data[offset + 1] + "," +
+ data[offset + 2] + "," +
+ (alpha ? data[offset + 3] / 255 : 1) + ")";
+ ctx.fillRect(xx * scale, yy * scale, scale, scale);
+ }
+ }
+ return wtu.makeImageFromCanvas(c);
+}
+function compareRect(
+ actualWidth, actualHeight, actualChannels,
+ dataWidth, dataHeight, expectedData,
+ testData, testFormat, tolerance) {
+ if(typeof(tolerance) == 'undefined') { tolerance = 5; }
+ var actual = new Uint8Array(actualWidth * actualHeight * 4);
+ gl.readPixels(
+ 0, 0, actualWidth, actualHeight, gl.RGBA, gl.UNSIGNED_BYTE, actual);
+
+ var div = document.createElement("div");
+ div.className = "testimages";
+ insertImg(div, "expected", makeImage(
+ actualWidth, actualHeight, dataWidth, expectedData,
+ actualChannels == 4));
+ insertImg(div, "actual", makeImage(
+ actualWidth, actualHeight, actualWidth, actual,
+ actualChannels == 4));
+ div.appendChild(document.createElement('br'));
+ document.getElementById("console").appendChild(div);
+
+ var failed = false;
+ for (var yy = 0; yy < actualHeight; ++yy) {
+ for (var xx = 0; xx < actualWidth; ++xx) {
+ var actualOffset = (yy * actualWidth + xx) * 4;
+ var expectedOffset = (yy * dataWidth + xx) * 4;
+ var expected = [
+ expectedData[expectedOffset + 0],
+ expectedData[expectedOffset + 1],
+ expectedData[expectedOffset + 2],
+ (actualChannels == 3 ? 255 : expectedData[expectedOffset + 3])
+ ];
+ for (var jj = 0; jj < 4; ++jj) {
+ if (Math.abs(actual[actualOffset + jj] - expected[jj]) > tolerance) {
+ failed = true;
+ var was = actual[actualOffset + 0].toString();
+ for (var j = 1; j < 4; ++j) {
+ was += "," + actual[actualOffset + j];
+ }
+ testFailed('at (' + xx + ', ' + yy +
+ ') expected: ' + expected + ' was ' + was);
+ }
+ }
+ }
+ }
+ if (!failed) {
+ testPassed("texture rendered correctly");
+ }
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html
new file mode 100644
index 000000000..418af1bb9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html
@@ -0,0 +1,635 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<title>WebGL WEBGL_compressed_texture_s3tc Conformance Tests</title>
+<style>
+img {
+ border: 1px solid black;
+ margin-right: 1em;
+}
+.testimages {
+}
+
+.testimages br {
+ clear: both;
+}
+
+.testimages > div {
+ float: left;
+ margin: 1em;
+}
+</style>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" width="8" height="8" style="width: 8px; height: 8px;"></canvas>
+<div id="console"></div>
+<script>
+"use strict";
+description("This test verifies the functionality of the WEBGL_compressed_texture_s3tc extension, if it is available.");
+
+debug("");
+
+var img_4x4_rgba_raw = new Uint8Array([
+ 0xff,0x00,0x00,0x69,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,
+]);
+var img_4x4_rgb_dxt1 = new Uint8Array([
+ 0xe0,0x07,0x00,0xf8,0x11,0x10,0x15,0x00,
+]);
+var img_4x4_rgba_dxt1 = new Uint8Array([
+ 0xe0,0x07,0x00,0xf8,0x13,0x10,0x15,0x00,
+]);
+var img_4x4_rgba_dxt3 = new Uint8Array([
+ 0xf6,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xf8,0xe0,0x07,0x44,0x45,0x40,0x55,
+]);
+var img_4x4_rgba_dxt5 = new Uint8Array([
+ 0xf6,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xf8,0xe0,0x07,0x44,0x45,0x40,0x55,
+]);
+var img_8x8_rgba_raw = new Uint8Array([
+ 0xff,0x00,0x00,0x69,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0x00,0x69,0x00,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0x00,0x69,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0xff,0x00,0xff,0x69,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,
+]);
+var img_8x8_rgb_dxt1 = new Uint8Array([
+ 0xe0,0x07,0x00,0xf8,0x11,0x10,0x15,0x00,0x1f,0x00,0xe0,0xff,0x11,0x10,0x15,0x00,0xe0,0x07,0x1f,0xf8,0x44,0x45,0x40,0x55,0x1f,0x00,0xff,0x07,0x44,0x45,0x40,0x55,
+]);
+var img_8x8_rgba_dxt1 = new Uint8Array([
+ 0xe0,0x07,0x00,0xf8,0x13,0x13,0x15,0x00,0x1f,0x00,0xe0,0xff,0x11,0x10,0x15,0x00,0xe0,0x07,0x1f,0xf8,0x44,0x45,0x43,0x57,0x1f,0x00,0xff,0x07,0x44,0x45,0x40,0x55,
+]);
+var img_8x8_rgba_dxt3 = new Uint8Array([
+ 0xf6,0xff,0xf6,0xff,0xff,0xff,0xff,0xff,0x00,0xf8,0xe0,0x07,0x44,0x45,0x40,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0x1f,0x00,0x44,0x45,0x40,0x55,0xff,0xff,0xff,0xff,0xf6,0xff,0xf6,0xff,0x1f,0xf8,0xe0,0x07,0x11,0x10,0x15,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x1f,0x00,0x11,0x10,0x15,0x00,
+]);
+var img_8x8_rgba_dxt5 = new Uint8Array([
+ 0xff,0x69,0x01,0x10,0x00,0x00,0x00,0x00,0x00,0xf8,0xe0,0x07,0x44,0x45,0x40,0x55,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x1f,0x00,0x44,0x45,0x40,0x55,0xff,0x69,0x00,0x00,0x00,0x01,0x10,0x00,0x1f,0xf8,0xe0,0x07,0x11,0x10,0x15,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0x1f,0x00,0x11,0x10,0x15,0x00,
+]);
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas, {antialias: false});
+var program = wtu.setupTexturedQuad(gl);
+var ext = null;
+var vao = null;
+var validFormats = {
+ COMPRESSED_RGB_S3TC_DXT1_EXT : 0x83F0,
+ COMPRESSED_RGBA_S3TC_DXT1_EXT : 0x83F1,
+ COMPRESSED_RGBA_S3TC_DXT3_EXT : 0x83F2,
+ COMPRESSED_RGBA_S3TC_DXT5_EXT : 0x83F3,
+};
+var name;
+var supportedFormats;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Run tests with extension disabled
+ runTestDisabled();
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = wtu.getExtensionWithKnownPrefixes(gl, "WEBGL_compressed_texture_s3tc");
+ if (!ext) {
+ testPassed("No WEBGL_compressed_texture_s3tc support -- this is legal");
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled WEBGL_compressed_texture_s3tc extension");
+
+ runSupportedTest(true);
+ runTestExtension();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var name = wtu.getSupportedExtensionWithKnownPrefixes(gl, "WEBGL_compressed_texture_s3tc");
+ if (name !== undefined) {
+ if (extensionEnabled) {
+ testPassed("WEBGL_compressed_texture_s3tc listed as supported and getExtension succeeded");
+ } else {
+ testFailed("WEBGL_compressed_texture_s3tc listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("WEBGL_compressed_texture_s3tc not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("WEBGL_compressed_texture_s3tc not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+
+function runTestDisabled() {
+ debug("Testing binding enum with extension disabled");
+
+ shouldBe('gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS)', '[]');
+}
+
+function formatExists(format, supportedFormats) {
+ for (var ii = 0; ii < supportedFormats.length; ++ii) {
+ if (format == supportedFormats[ii]) {
+ testPassed("supported format " + formatToString(format) + " is exists");
+ return;
+ }
+ }
+ testFailed("supported format " + formatToString(format) + " does not exist");
+}
+
+function formatToString(format) {
+ for (var p in ext) {
+ if (ext[p] == format) {
+ return p;
+ }
+ }
+ return "0x" + format.toString(16);
+}
+
+function runTestExtension() {
+ debug("Testing WEBGL_compressed_texture_s3tc");
+
+ // check that all format enums exist.
+ for (name in validFormats) {
+ var expected = "0x" + validFormats[name].toString(16);
+ var actual = "ext['" + name + "']";
+ shouldBe(actual, expected);
+ }
+
+ supportedFormats = gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS);
+ // There should be exactly 4 formats
+ shouldBe("supportedFormats.length", "4");
+
+ // check that all 4 formats exist
+ for (var name in validFormats.length) {
+ formatExists(validFormats[name], supportedFormats);
+ }
+
+ // Test each format
+ testDXT1_RGB();
+ testDXT1_RGBA();
+ testDXT3_RGBA();
+ testDXT5_RGBA();
+}
+
+function testDXT1_RGB() {
+ var tests = [
+ { width: 4,
+ height: 4,
+ channels: 3,
+ data: img_4x4_rgb_dxt1,
+ format: ext.COMPRESSED_RGB_S3TC_DXT1_EXT
+ },
+ { width: 8,
+ height: 8,
+ channels: 3,
+ data: img_8x8_rgb_dxt1,
+ format: ext.COMPRESSED_RGB_S3TC_DXT1_EXT
+ }
+ ];
+ testDXTTextures(tests);
+}
+
+function testDXT1_RGBA() {
+ var tests = [
+ { width: 4,
+ height: 4,
+ channels: 4,
+ data: img_4x4_rgba_dxt1,
+ format: ext.COMPRESSED_RGBA_S3TC_DXT1_EXT
+ },
+ { width: 8,
+ height: 8,
+ channels: 4,
+ data: img_8x8_rgba_dxt1,
+ format: ext.COMPRESSED_RGBA_S3TC_DXT1_EXT
+ }
+ ];
+ testDXTTextures(tests);
+}
+
+function testDXT3_RGBA() {
+ var tests = [
+ { width: 4,
+ height: 4,
+ channels: 4,
+ data: img_4x4_rgba_dxt3,
+ format: ext.COMPRESSED_RGBA_S3TC_DXT3_EXT
+ },
+ { width: 8,
+ height: 8,
+ channels: 4,
+ data: img_8x8_rgba_dxt3,
+ format: ext.COMPRESSED_RGBA_S3TC_DXT3_EXT
+ }
+ ];
+ testDXTTextures(tests);
+}
+
+function testDXT5_RGBA() {
+ var tests = [
+ { width: 4,
+ height: 4,
+ channels: 4,
+ data: img_4x4_rgba_dxt5,
+ format: ext.COMPRESSED_RGBA_S3TC_DXT5_EXT
+ },
+ { width: 8,
+ height: 8,
+ channels: 4,
+ data: img_8x8_rgba_dxt5,
+ format: ext.COMPRESSED_RGBA_S3TC_DXT5_EXT
+ }
+ ];
+ testDXTTextures(tests);
+}
+
+function testDXTTextures(tests) {
+ debug("<hr/>");
+ for (var ii = 0; ii < tests.length; ++ii) {
+ testDXTTexture(tests[ii]);
+ }
+}
+
+function uncompressDXTBlock(
+ destBuffer, destX, destY, destWidth, src, srcOffset, format) {
+ function make565(src, offset) {
+ return src[offset + 0] + src[offset + 1] * 256;
+ }
+ function make8888From565(c) {
+ return [
+ Math.floor(((c >> 11) & 0x1F) * 255 / 31),
+ Math.floor(((c >> 5) & 0x3F) * 255 / 63),
+ Math.floor(((c >> 0) & 0x1F) * 255 / 31),
+ 255
+ ];
+ }
+ function mix(mult, c0, c1, div) {
+ var r = [];
+ for (var ii = 0; ii < c0.length; ++ii) {
+ r[ii] = Math.floor((c0[ii] * mult + c1[ii]) / div);
+ }
+ return r;
+ }
+ var isDXT1 = format == ext.COMPRESSED_RGB_S3TC_DXT1_EXT ||
+ format == ext.COMPRESSED_RGBA_S3TC_DXT1_EXT;
+ var colorOffset = srcOffset + (isDXT1 ? 0 : 8);
+ var color0 = make565(src, colorOffset + 0);
+ var color1 = make565(src, colorOffset + 2);
+ var c0gtc1 = color0 > color1 || !isDXT1;
+ var rgba0 = make8888From565(color0);
+ var rgba1 = make8888From565(color1);
+ var colors = [
+ rgba0,
+ rgba1,
+ c0gtc1 ? mix(2, rgba0, rgba1, 3) : mix(1, rgba0, rgba1, 2),
+ c0gtc1 ? mix(2, rgba1, rgba0, 3) : [0, 0, 0, 255]
+ ];
+
+ // yea I know there is a lot of math in this inner loop.
+ // so sue me.
+ for (var yy = 0; yy < 4; ++yy) {
+ var pixels = src[colorOffset + 4 + yy];
+ for (var xx = 0; xx < 4; ++xx) {
+ var dstOff = ((destY + yy) * destWidth + destX + xx) * 4;
+ var code = (pixels >> (xx * 2)) & 0x3;
+ var srcColor = colors[code];
+ var alpha;
+ switch (format) {
+ case ext.COMPRESSED_RGB_S3TC_DXT1_EXT:
+ alpha = 255;
+ break;
+ case ext.COMPRESSED_RGBA_S3TC_DXT1_EXT:
+ alpha = (code == 3 && !c0gtc1) ? 0 : 255;
+ break;
+ case ext.COMPRESSED_RGBA_S3TC_DXT3_EXT:
+ {
+ var alpha0 = src[srcOffset + yy * 2 + Math.floor(xx / 2)];
+ var alpha1 = (alpha0 >> ((xx % 2) * 4)) & 0xF;
+ alpha = alpha1 | (alpha1 << 4);
+ }
+ break;
+ case ext.COMPRESSED_RGBA_S3TC_DXT5_EXT:
+ {
+ var alpha0 = src[srcOffset + 0];
+ var alpha1 = src[srcOffset + 1];
+ var alphaOff = Math.floor(yy / 2) * 3 + 2;
+ var alphaBits =
+ src[srcOffset + alphaOff + 0] +
+ src[srcOffset + alphaOff + 1] * 256 +
+ src[srcOffset + alphaOff + 2] * 65536;
+ var alphaShift = (yy % 2) * 12 + xx * 3;
+ var alphaCode = (alphaBits >> alphaShift) & 0x7;
+ if (alpha0 > alpha1) {
+ switch (alphaCode) {
+ case 0:
+ alpha = alpha0;
+ break;
+ case 1:
+ alpha = alpha1;
+ break;
+ default:
+ alpha = ((8 - alphaCode) * alpha0 + (alphaCode - 1) * alpha1) / 7;
+ break;
+ }
+ } else {
+ switch (alphaCode) {
+ case 0:
+ alpha = alpha0;
+ break;
+ case 1:
+ alpha = alpha1;
+ break;
+ case 6:
+ alpha = 0;
+ break;
+ case 7:
+ alpha = 255;
+ break;
+ default:
+ alpha = ((6 - alphaCode) * alpha0 + (alphaCode - 1) * alpha1) / 5;
+ break;
+ }
+ }
+ }
+ break;
+ default:
+ throw "bad format";
+ }
+ destBuffer[dstOff + 0] = srcColor[0];
+ destBuffer[dstOff + 1] = srcColor[1];
+ destBuffer[dstOff + 2] = srcColor[2];
+ destBuffer[dstOff + 3] = alpha;
+ }
+ }
+}
+
+function getBlockSize(format) {
+ var isDXT1 = format == ext.COMPRESSED_RGB_S3TC_DXT1_EXT ||
+ format == ext.COMPRESSED_RGBA_S3TC_DXT1_EXT;
+ return isDXT1 ? 8 : 16;
+}
+
+function uncompressDXT(width, height, data, format) {
+ if (width % 4 || height % 4) throw "bad width or height";
+
+ var dest = new Uint8Array(width * height * 4);
+ var blocksAcross = width / 4;
+ var blocksDown = height / 4;
+ var blockSize = getBlockSize(format);
+ for (var yy = 0; yy < blocksDown; ++yy) {
+ for (var xx = 0; xx < blocksAcross; ++xx) {
+ uncompressDXTBlock(
+ dest, xx * 4, yy * 4, width, data,
+ (yy * blocksAcross + xx) * blockSize, format);
+ }
+ }
+ return dest;
+}
+
+function copyRect(data, srcX, srcY, dstX, dstY, width, height, stride) {
+ var bytesPerLine = width * 4;
+ var srcOffset = srcX * 4 + srcY * stride;
+ var dstOffset = dstX * 4 + dstY * stride;
+ for (; height > 0; --height) {
+ for (var ii = 0; ii < bytesPerLine; ++ii) {
+ data[dstOffset + ii] = data[srcOffset + ii];
+ }
+ srcOffset += stride;
+ dstOffset += stride;
+ }
+}
+
+function testDXTTexture(test) {
+ var data = new Uint8Array(test.data);
+ var width = test.width;
+ var height = test.height;
+ var format = test.format;
+
+ var uncompressedData = uncompressDXT(width, height, data, format);
+
+ canvas.width = width;
+ canvas.height = height;
+ gl.viewport(0, 0, width, height);
+ debug("testing " + formatToString(format) + " " + width + "x" + height);
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture");
+ gl.generateMipmap(gl.TEXTURE_2D);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "trying to generate mipmaps from compressed texture");
+ wtu.clearAndDrawUnitQuad(gl);
+ compareRect(width, height, test.channels, width, height, uncompressedData, data, format);
+
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height, 1, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "non 0 border");
+
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width + 4, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height + 4, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 4, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 4, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 1, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width - 2, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 1, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 0, format, width, height - 2, 0, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+
+ if (width == 4) {
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 1, format, 1, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "valid dimensions for level > 0");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 1, format, 2, height, 0, data);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "valid dimensions for level > 0");
+ }
+ if (height == 4) {
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 1, format, width, 1, 0, data);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "valid dimensions for level > 0");
+ gl.compressedTexImage2D(gl.TEXTURE_2D, 1, format, width, 2, 0, data);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "valid dimensions for level > 0");
+ }
+
+ // pick a wrong format that uses the same amount of data.
+ var wrongFormat;
+ switch (format) {
+ case ext.COMPRESSED_RGB_S3TC_DXT1_EXT:
+ wrongFormat = ext.COMPRESSED_RGBA_S3TC_DXT1_EXT;
+ break;
+ case ext.COMPRESSED_RGBA_S3TC_DXT1_EXT:
+ wrongFormat = ext.COMPRESSED_RGB_S3TC_DXT1_EXT;
+ break;
+ case ext.COMPRESSED_RGBA_S3TC_DXT3_EXT:
+ wrongFormat = ext.COMPRESSED_RGBA_S3TC_DXT5_EXT;
+ break;
+ case ext.COMPRESSED_RGBA_S3TC_DXT5_EXT:
+ wrongFormat = ext.COMPRESSED_RGBA_S3TC_DXT3_EXT;
+ break;
+ }
+
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height, wrongFormat, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "format does not match");
+
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width + 4, height, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height + 4, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width - 4, height, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height - 4, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "data size does not match dimensions");
+
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width - 1, height, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width - 2, height, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height - 1, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height - 2, format, data);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid dimensions");
+
+ var subData = new Uint8Array(data.buffer, 0, getBlockSize(format));
+
+ if (width == 8 && height == 8) {
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 1, 0, 4, 4, format, subData);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid offset");
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 1, 4, 4, format, subData);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "invalid offset");
+ }
+
+ var stride = width * 4;
+ for (var yoff = 0; yoff < height; yoff += 4) {
+ for (var xoff = 0; xoff < width; xoff += 4) {
+ copyRect(uncompressedData, 0, 0, xoff, yoff, 4, 4, stride);
+ gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, xoff, yoff, 4, 4, format, subData);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture");
+ wtu.clearAndDrawUnitQuad(gl);
+ compareRect(width, height, test.channels, width, height, uncompressedData, data, format);
+ }
+ }
+}
+
+function insertImg(element, caption, img) {
+ var div = document.createElement("div");
+ div.appendChild(img);
+ var label = document.createElement("div");
+ label.appendChild(document.createTextNode(caption));
+ div.appendChild(label);
+ element.appendChild(div);
+}
+
+function makeImage(imageWidth, imageHeight, dataWidth, data, alpha) {
+ var scale = 8;
+ var c = document.createElement("canvas");
+ c.width = imageWidth * scale;
+ c.height = imageHeight * scale;
+ var ctx = c.getContext("2d");
+ for (var yy = 0; yy < imageHeight; ++yy) {
+ for (var xx = 0; xx < imageWidth; ++xx) {
+ var offset = (yy * dataWidth + xx) * 4;
+ ctx.fillStyle = "rgba(" +
+ data[offset + 0] + "," +
+ data[offset + 1] + "," +
+ data[offset + 2] + "," +
+ (alpha ? data[offset + 3] / 255 : 1) + ")";
+ ctx.fillRect(xx * scale, yy * scale, scale, scale);
+ }
+ }
+ return wtu.makeImageFromCanvas(c);
+}
+function compareRect(
+ actualWidth, actualHeight, actualChannels,
+ dataWidth, dataHeight, expectedData,
+ testData, testFormat) {
+ var actual = new Uint8Array(actualWidth * actualHeight * 4);
+ gl.readPixels(
+ 0, 0, actualWidth, actualHeight, gl.RGBA, gl.UNSIGNED_BYTE, actual);
+
+ var div = document.createElement("div");
+ div.className = "testimages";
+ insertImg(div, "expected", makeImage(
+ actualWidth, actualHeight, dataWidth, expectedData,
+ actualChannels == 4));
+ insertImg(div, "actual", makeImage(
+ actualWidth, actualHeight, actualWidth, actual,
+ actualChannels == 4));
+ div.appendChild(document.createElement('br'));
+ document.getElementById("console").appendChild(div);
+
+ var failed = false;
+ for (var yy = 0; yy < actualHeight; ++yy) {
+ for (var xx = 0; xx < actualWidth; ++xx) {
+ var actualOffset = (yy * actualWidth + xx) * 4;
+ var expectedOffset = (yy * dataWidth + xx) * 4;
+ var expected = [
+ expectedData[expectedOffset + 0],
+ expectedData[expectedOffset + 1],
+ expectedData[expectedOffset + 2],
+ (actualChannels == 3 ? 255 : expectedData[expectedOffset + 3])
+ ];
+ for (var jj = 0; jj < 4; ++jj) {
+ if (actual[actualOffset + jj] != expected[jj]) {
+ failed = true;
+ var was = actual[actualOffset + 0].toString();
+ for (var j = 1; j < 4; ++j) {
+ was += "," + actual[actualOffset + j];
+ }
+ testFailed('at (' + xx + ', ' + yy +
+ ') expected: ' + expected + ' was ' + was);
+ }
+ }
+ }
+ }
+ if (!failed) {
+ testPassed("texture rendered correctly");
+ }
+}
+
+function testPVRTCTextures() {
+ testFailed("PVRTC test not yet implemented");
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-size-limit.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-size-limit.html
new file mode 100644
index 000000000..4cb09baee
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-size-limit.html
@@ -0,0 +1,248 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL compressed texture size limit conformance test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="32" height="32" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+enableJSTestPreVerboseLogging();
+description("Checks size limit of the webgl compressed textures")
+var canvas;
+
+function numLevelsFromSize(size) {
+ var levels = 0;
+ while ((size >> levels) > 0) {
+ ++levels;
+ }
+ return levels;
+}
+
+// More formats can be added here when more texture compression extensions are enabled in WebGL.
+var validFormats = {
+ COMPRESSED_RGB_S3TC_DXT1_EXT : 0x83F0,
+ COMPRESSED_RGBA_S3TC_DXT1_EXT : 0x83F1,
+ COMPRESSED_RGBA_S3TC_DXT3_EXT : 0x83F2,
+ COMPRESSED_RGBA_S3TC_DXT5_EXT : 0x83F3,
+};
+
+// format specific restrictions for COMPRESSED_RGB_S3TC_DXT1_EXT and COMPRESSED_RGBA_S3TC_DXT1_EXT
+// on the byteLength of the ArrayBufferView, pixels
+function func1 (width, height)
+{
+ return Math.floor((width + 3) / 4) * Math.floor((height + 3) / 4) * 8;
+}
+
+// format specific restrictions for COMPRESSED_RGBA_S3TC_DXT3_EXT and COMPRESSED_RGBA_S3TC_DXT5_EXT
+// on the byteLength of the ArrayBufferView, pixels
+function func2 (width, height)
+{
+ return Math.floor((width + 3) / 4) * Math.floor((height + 3) / 4) * 16;
+}
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var tests = [
+ // More tests can be added here when more texture compression extensions are enabled in WebGL.
+ // Level 0 image width and height must be a multiple of the sizeStep.
+ { extension: "WEBGL_compressed_texture_s3tc", format: validFormats.COMPRESSED_RGB_S3TC_DXT1_EXT, dataType: Uint8Array, func: func1, sizeStep: 4},
+ { extension: "WEBGL_compressed_texture_s3tc", format: validFormats.COMPRESSED_RGBA_S3TC_DXT1_EXT, dataType: Uint8Array, func: func1, sizeStep: 4},
+ { extension: "WEBGL_compressed_texture_s3tc", format: validFormats.COMPRESSED_RGBA_S3TC_DXT3_EXT, dataType: Uint8Array, func: func2, sizeStep: 4},
+ { extension: "WEBGL_compressed_texture_s3tc", format: validFormats.COMPRESSED_RGBA_S3TC_DXT5_EXT, dataType: Uint8Array, func: func2, sizeStep: 4},
+];
+
+// Note: We expressly only use 2 textures because first a texture will be defined
+// using all mip levels of 1 format, then for a moment it will have mixed formats which
+// may uncover bugs.
+var targets = [
+ { target: gl.TEXTURE_2D,
+ maxSize: gl.getParameter(gl.MAX_TEXTURE_SIZE),
+ tex: gl.createTexture(),
+ targets: [gl.TEXTURE_2D]
+ },
+ { target: gl.TEXTURE_CUBE_MAP,
+ maxSize: gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE),
+ tex: gl.createTexture(),
+ targets: [
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+ ]
+ }
+];
+
+function getSharedArrayBufferSize() {
+ var sharedArrayBufferSize = 0;
+ for (var tt = 0; tt < tests.length; ++tt) {
+ var test = tests[tt];
+ for (var trg = 0; trg < targets.length; ++trg) {
+ var t = targets[trg];
+ var bufferSizeNeeded;
+ if (t.target === gl.TEXTURE_CUBE_MAP) {
+ var positiveTestSize = Math.min(2048, t.maxSize);
+ bufferSizeNeeded = test.func(positiveTestSize, positiveTestSize);
+ } else {
+ bufferSizeNeeded = test.func(t.maxSize, test.sizeStep);
+ }
+ if (bufferSizeNeeded > sharedArrayBufferSize) {
+ sharedArrayBufferSize = bufferSizeNeeded;
+ }
+ bufferSizeNeeded = test.func(t.maxSize + test.sizeStep, t.maxSize + test.sizeStep);
+ // ArrayBuffers can be at most 4GB (minus 1 byte)
+ if (bufferSizeNeeded > sharedArrayBufferSize && bufferSizeNeeded <= 4294967295) {
+ sharedArrayBufferSize = bufferSizeNeeded;
+ }
+ }
+ }
+ return sharedArrayBufferSize;
+}
+
+// Share an ArrayBuffer among tests to avoid too many large allocations
+var sharedArrayBuffer = new ArrayBuffer(getSharedArrayBufferSize());
+
+gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);
+
+var trg = 0;
+var tt = 0;
+runNextTest();
+
+function runNextTest() {
+ var t = targets[trg];
+
+ if (tt == 0) {
+ var tex = t.tex;
+ gl.bindTexture(t.target, tex);
+
+ debug("");
+ debug("max size for " + wtu.glEnumToString(gl, t.target) + ": " + t.maxSize);
+ }
+
+ var test = tests[tt];
+ testFormatType(t, test);
+ ++tt;
+ if (tt == tests.length) {
+ tt = 0;
+ ++trg;
+ if (trg == targets.length) {
+ finishTest();
+ return;
+ }
+ }
+ wtu.waitForComposite(runNextTest);
+}
+
+function testFormatType(t, test) {
+ var positiveTestSize = t.maxSize;
+ var positiveTestOtherDimension = test.sizeStep;
+ if (t.target === gl.TEXTURE_CUBE_MAP) {
+ // Can't always test the maximum size since that can cause OOM:
+ positiveTestSize = Math.min(2048, t.maxSize);
+ // Cube map textures need to be square:
+ positiveTestOtherDimension = positiveTestSize;
+ }
+ var positiveTestLevels = numLevelsFromSize(positiveTestSize);
+ var numLevels = numLevelsFromSize(t.maxSize);
+ debug("");
+ debug("num levels: " + numLevels + ", levels used in positive test: " + positiveTestLevels);
+
+ debug("");
+
+ // Query the extension and store globally so shouldBe can access it
+ var ext = wtu.getExtensionWithKnownPrefixes(gl, test.extension);
+ if (ext) {
+
+ testPassed("Successfully enabled " + test.extension + " extension");
+
+ for (var j = 0; j < t.targets.length; ++j) {
+ var target = t.targets[j];
+ debug("");
+ debug(wtu.glEnumToString(gl, target));
+
+ // positive test
+ var size = positiveTestSize;
+ var otherDimension = positiveTestOtherDimension;
+ for (var i = 0; i < positiveTestLevels; i++) {
+ var pixels = new test.dataType(sharedArrayBuffer, 0, test.func(size, otherDimension));
+ gl.compressedTexImage2D(target, i, test.format, size, otherDimension, 0, pixels);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "uploading compressed texture should generate NO_ERROR."
+ + "level is " + i + ", size is " + size + "x" + otherDimension);
+ size /= 2;
+ otherDimension /= 2;
+ if (otherDimension < 1) {
+ otherDimension = 1;
+ }
+ }
+
+ var numLevels = numLevelsFromSize(t.maxSize);
+
+ // out of bounds tests
+ // width and height out of bounds
+ var dataSize = test.func(t.maxSize + test.sizeStep, t.maxSize + test.sizeStep);
+ // this check assumes that each element is 1 byte
+ if (dataSize > sharedArrayBuffer.byteLength) {
+ testPassed("Unable to test texture larger than maximum size due to ArrayBuffer size limitations -- this is legal");
+ } else {
+ var pixelsNegativeTest1 = new test.dataType(sharedArrayBuffer, 0, dataSize);
+ gl.compressedTexImage2D(target, 0, test.format, t.maxSize + test.sizeStep, t.maxSize + test.sizeStep, 0, pixelsNegativeTest1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "width or height out of bounds: should generate INVALID_VALUE."
+ + " level is 0, size is " + (t.maxSize + test.sizeStep) + "x" + (t.maxSize + test.sizeStep));
+ }
+ // level out of bounds
+ var pixelsNegativeTest2 = new test.dataType(sharedArrayBuffer, 0, test.func(256, 256));
+ gl.compressedTexImage2D(target, numLevels, test.format, 256, 256, 0, pixelsNegativeTest2);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "level out of bounds: should generate INVALID_VALUE."
+ + " level is " + numLevels + ", size is 256x256");
+ //width and height out of bounds for specified level
+ gl.compressedTexImage2D(target, numLevels - 1, test.format, 256, 256, 0, pixelsNegativeTest2);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "width or height out of bounds for specified level: should generate INVALID_VALUE."
+ + " level is " + (numLevels - 1) + ", size is 256x256");
+ }
+ }
+ else
+ testPassed("No " + test.extension + " extension support -- this is legal");
+}
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-renderer-info.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-renderer-info.html
new file mode 100644
index 000000000..27e61c8cc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-renderer-info.html
@@ -0,0 +1,127 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL WebGL_debug_renderer_info Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 1px; height: 1px;"> </canvas>
+<div id="console"></div>
+<!-- Shaders for testing standard derivatives -->
+
+<script>
+"use strict";
+description("This test verifies the functionality of the WEBGL_debug_renderer_info extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+var ext = null;
+var vao = null;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Run tests with extension disabled
+ runTestDisabled();
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = gl.getExtension("WEBGL_debug_renderer_info");
+ if (!ext) {
+ testPassed("No WEBGL_debug_renderer_info support -- this is legal");
+
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled WEBGL_debug_renderer_info extension");
+
+ runSupportedTest(true);
+ runTestEnabled();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var supported = gl.getSupportedExtensions();
+ if (supported.indexOf("WEBGL_debug_renderer_info") >= 0) {
+ if (extensionEnabled) {
+ testPassed("WEBGL_debug_renderer_info listed as supported and getExtension succeeded");
+ } else {
+ testFailed("WEBGL_debug_renderer_info listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("WEBGL_debug_renderer_info not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("WEBGL_debug_renderer_info not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runTestDisabled() {
+ debug("Testing enums with extension disabled");
+
+ // Use the constants directly as we don't have the extension
+
+ var UNMASKED_VENDOR_WEBGL = 0x9245;
+ gl.getParameter(UNMASKED_VENDOR_WEBGL);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "UNMASKED_VENDOR_WEBGL should not be queryable if extension is disabled");
+
+ var UNMASKED_RENDERER_WEBGL = 0x9246;
+ gl.getParameter(UNMASKED_RENDERER_WEBGL);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "UNMASKED_RENDERER_WEBGL should not be queryable if extension is disabled");
+}
+
+function runTestEnabled() {
+ debug("Testing enums with extension enabled");
+
+ shouldBe("ext.UNMASKED_VENDOR_WEBGL", "0x9245");
+ gl.getParameter(ext.UNMASKED_VENDOR_WEBGL);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "UNMASKED_VENDOR_WEBGL query should succeed if extension is enable");
+
+ shouldBe("ext.UNMASKED_RENDERER_WEBGL", "0x9246");
+ gl.getParameter(ext.UNMASKED_RENDERER_WEBGL);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "UNMASKED_RENDERER_WEBGL query should succeed if extension is enable");
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-shaders.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-shaders.html
new file mode 100644
index 000000000..c4040f652
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-shaders.html
@@ -0,0 +1,166 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL WebGL_debug_shaders Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" style="width: 1px; height: 1px;"> </canvas>
+<div id="console"></div>
+<!-- Shaders for testing standard derivatives -->
+
+<script>
+"use strict";
+description("This test verifies the functionality of the WEBGL_debug_shaders extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+var ext = null;
+var shader = null;
+var program = null;
+var info = null;
+var translatedSource;
+var newTranslatedSource;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = gl.getExtension("WEBGL_debug_shaders");
+ if (!ext) {
+ testPassed("No WEBGL_debug_shaders support -- this is legal");
+
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled WEBGL_debug_shaders extension");
+
+ runSupportedTest(true);
+ runTestEnabled();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var supported = gl.getSupportedExtensions();
+ if (supported.indexOf("WEBGL_debug_shaders") >= 0) {
+ if (extensionEnabled) {
+ testPassed("WEBGL_debug_shaders listed as supported and getExtension succeeded");
+ } else {
+ testFailed("WEBGL_debug_shaders listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("WEBGL_debug_shaders not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("WEBGL_debug_shaders not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runTestEnabled() {
+ debug("Testing function with extension enabled");
+
+ var shaderInfos = [
+ {
+ source: "void main() { gl_Position = vec4(1.0, 0.0, 0.0, 1.0); }",
+ type: gl.VERTEX_SHADER
+ },
+ {
+ source: "void main() { gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); }",
+ type: gl.FRAGMENT_SHADER
+ }
+ ];
+
+ // Do this twice to test for caching issues.
+ for (var jj = 0; jj < 2; ++jj) {
+ debug("pass:" + (jj + 1));
+ program = gl.createProgram();
+ for (var ii = 0; ii < shaderInfos.length; ++ii) {
+ info = shaderInfos[ii];
+
+ shader = gl.createShader(info.type);
+
+ // if no source has been defined or compileShader() has not been called,
+ // getTranslatedShaderSource() should return an empty string.
+ shouldBe("ext.getTranslatedShaderSource(shader)", '""');
+ gl.shaderSource(shader, info.source);
+ shouldBe("ext.getTranslatedShaderSource(shader)", '""');
+ gl.compileShader(shader);
+ shouldBeTrue("gl.getShaderParameter(shader, gl.COMPILE_STATUS)");
+ translatedSource = ext.getTranslatedShaderSource(shader);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "No gl error should occur");
+ if (translatedSource && translatedSource.length > 0) {
+ testPassed("Successfully called getTranslatedShaderSource()");
+ } else {
+ testFailed("Calling getTranslatedShaderSource() failed");
+ }
+ gl.attachShader(program, shader);
+ }
+ gl.linkProgram(program);
+ shouldBeTrue("gl.getProgramParameter(program, gl.LINK_STATUS)");
+ }
+
+ // Test changing the source. Make sure we get the correct source each time.
+ debug("test changing source");
+ shader = gl.createShader(gl.FRAGMENT_SHADER);
+ gl.shaderSource(shader, "void main() { gl_FragColor = vec4(gl_FragCoord.x, 0.0, 0.0, 1.0); }");
+ gl.compileShader(shader);
+ shouldBeTrue("gl.getShaderParameter(shader, gl.COMPILE_STATUS)");
+ translatedSource = ext.getTranslatedShaderSource(shader);
+ shouldBeTrue('translatedSource && translatedSource.indexOf("gl_FragCoord") >= 0');
+ // change the source but don't compile.
+ gl.shaderSource(shader, "void main() { gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); }");
+ // the source should NOT change. It should be the same as the old source.
+ newTranslatedSource = ext.getTranslatedShaderSource(shader);
+ shouldBe('newTranslatedSource', 'translatedSource');
+ // now compile.
+ gl.compileShader(shader);
+ shouldBeTrue("gl.getShaderParameter(shader, gl.COMPILE_STATUS)");
+ // the source should have change.
+ newTranslatedSource = ext.getTranslatedShaderSource(shader);
+ shouldNotBe('newTranslatedSource', 'translatedSource');
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-depth-texture.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-depth-texture.html
new file mode 100644
index 000000000..6bb81d7c1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-depth-texture.html
@@ -0,0 +1,338 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<title>WebGL WEBGL_depth_texture Conformance Tests</title>
+</head>
+<body>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 a_position;
+void main()
+{
+ gl_Position = a_position;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform sampler2D u_texture;
+uniform vec2 u_resolution;
+void main()
+{
+ vec2 texcoord = gl_FragCoord.xy / u_resolution;
+ gl_FragColor = texture2D(u_texture, texcoord);
+}
+</script>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="8" height="8" style="width: 8px; height: 8px;"></canvas>
+<script>
+"use strict";
+description("This test verifies the functionality of the WEBGL_depth_texture extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas, {antialias: false});
+var program = wtu.setupTexturedQuad(gl);
+var ext = null;
+var vao = null;
+var tex;
+var name;
+var supportedFormats;
+var canvas2;
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Run tests with extension disabled
+ runTestDisabled();
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = wtu.getExtensionWithKnownPrefixes(gl, "WEBGL_depth_texture");
+ if (!ext) {
+ testPassed("No WEBGL_depth_texture support -- this is legal");
+ runSupportedTest(false);
+ } else {
+ testPassed("Successfully enabled WEBGL_depth_texture extension");
+
+ runSupportedTest(true);
+ runTestExtension();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var name = wtu.getSupportedExtensionWithKnownPrefixes(gl, "WEBGL_depth_texture");
+ if (name !== undefined) {
+ if (extensionEnabled) {
+ testPassed("WEBGL_depth_texture listed as supported and getExtension succeeded");
+ } else {
+ testFailed("WEBGL_depth_texture listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("WEBGL_depth_texture not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("WEBGL_depth_texture not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+
+function runTestDisabled() {
+ debug("Testing binding enum with extension disabled");
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ wtu.shouldGenerateGLError(gl, [gl.INVALID_ENUM, gl.INVALID_VALUE], 'gl.texImage2D(gl.TEXTURE_2D, 0, gl.DEPTH_COMPONENT, 1, 1, 0, gl.DEPTH_COMPONENT, gl.UNSIGNED_SHORT, null)');
+ wtu.shouldGenerateGLError(gl, [gl.INVALID_ENUM, gl.INVALID_VALUE], 'gl.texImage2D(gl.TEXTURE_2D, 0, gl.DEPTH_COMPONENT, 1, 1, 0, gl.DEPTH_COMPONENT, gl.UNSIGNED_INT, null)');
+}
+
+
+function dumpIt(gl, res, msg) {
+ return; // comment out to debug
+ debug(msg);
+ var actualPixels = new Uint8Array(res * res * 4);
+ gl.readPixels(0, 0, res, res, gl.RGBA, gl.UNSIGNED_BYTE, actualPixels);
+
+ for (var yy = 0; yy < res; ++yy) {
+ var strs = [];
+ for (var xx = 0; xx < res; ++xx) {
+ var actual = (yy * res + xx) * 4;
+ strs.push("(" + actualPixels[actual] + "," + actualPixels[actual+1] + "," + actualPixels[actual + 2] + "," + actualPixels[actual + 3] + ")");
+ }
+ debug(strs.join(" "));
+ }
+}
+function runTestExtension() {
+ debug("Testing WEBGL_depth_texture");
+
+ var res = 8;
+
+ // make canvas for testing.
+ canvas2 = document.createElement("canvas");
+ canvas2.width = res;
+ canvas2.height = res;
+ var ctx = canvas2.getContext("2d");
+ ctx.fillStyle = "blue";
+ ctx.fillRect(0, 0, canvas2.width, canvas2.height);
+
+ var program = wtu.setupProgram(gl, ['vshader', 'fshader'], ['a_position']);
+ gl.useProgram(program);
+ gl.uniform2f(gl.getUniformLocation(program, "u_resolution"), res, res);
+
+ var buffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
+ gl.bufferData(
+ gl.ARRAY_BUFFER,
+ new Float32Array(
+ [ 1, 1, 1,
+ -1, 1, 0,
+ -1, -1, -1,
+ 1, 1, 1,
+ -1, -1, -1,
+ 1, -1, 0,
+ ]),
+ gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ var types = [
+ {obj: 'gl', attachment: 'DEPTH_ATTACHMENT', format: 'DEPTH_COMPONENT', type: 'UNSIGNED_SHORT', data: 'new Uint16Array(1)', depthBits: "16"},
+ {obj: 'gl', attachment: 'DEPTH_ATTACHMENT', format: 'DEPTH_COMPONENT', type: 'UNSIGNED_INT', data: 'new Uint32Array(1)', depthBits: "16"},
+ {obj: 'ext', attachment: 'DEPTH_STENCIL_ATTACHMENT', format: 'DEPTH_STENCIL', type: 'UNSIGNED_INT_24_8_WEBGL', data: 'new Uint32Array(1)', depthBits: "24", stencilBits: "8"}
+ ];
+
+ for (var ii = 0; ii < types.length; ++ii) {
+ var typeInfo = types[ii];
+ var type = typeInfo.type;
+ var typeStr = typeInfo.obj + '.' + type;
+
+ debug("");
+ debug("testing: " + type);
+
+ // check that cubemaps are not allowed.
+ var cubeTex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, cubeTex);
+ var targets = [
+ 'TEXTURE_CUBE_MAP_POSITIVE_X',
+ 'TEXTURE_CUBE_MAP_NEGATIVE_X',
+ 'TEXTURE_CUBE_MAP_POSITIVE_Y',
+ 'TEXTURE_CUBE_MAP_NEGATIVE_Y',
+ 'TEXTURE_CUBE_MAP_POSITIVE_Z',
+ 'TEXTURE_CUBE_MAP_NEGATIVE_Z'
+ ];
+ for (var tt = 0; tt < targets.length; ++tt) {
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.texImage2D(gl.' + targets[ii] + ', 1, gl.' + typeInfo.format + ', 1, 1, 0, gl.' + typeInfo.format + ', ' + typeStr + ', null)');
+ }
+
+ // check 2d textures.
+ tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+
+ // test level > 0
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.texImage2D(gl.TEXTURE_2D, 1, gl.' + typeInfo.format + ', 1, 1, 0, gl.' + typeInfo.format + ', ' + typeStr + ', null)');
+
+ // test with data
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.texImage2D(gl.TEXTURE_2D, 0, gl.' + typeInfo.format + ', 1, 1, 0, gl.' + typeInfo.format + ', ' + typeStr + ', ' + typeInfo.data + ')');
+
+ // test with canvas
+ wtu.shouldGenerateGLError(gl, [gl.INVALID_VALUE, gl.INVALID_ENUM, gl.INVALID_OPERATION], 'gl.texImage2D(gl.TEXTURE_2D, 0, gl.' + typeInfo.format + ', gl.' + typeInfo.format + ', ' + typeStr + ', canvas2)');
+
+ // test copyTexImage2D
+ wtu.shouldGenerateGLError(gl, [gl.INVALID_ENUM, gl.INVALID_OPERATION], 'gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.' + typeInfo.format + ', 0, 0, 1, 1, 0)');
+
+ // test real thing
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, 'gl.texImage2D(gl.TEXTURE_2D, 0, gl.' + typeInfo.format + ', ' + res + ', ' + res + ', 0, gl.' + typeInfo.format + ', ' + typeStr + ', null)');
+
+ // test texSubImage2D
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 1, 1, gl.' + typeInfo.format + ', ' + typeStr + ', ' + typeInfo.data + ')');
+
+ // test copyTexSubImage2D
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, 1, 1)');
+
+ // test generateMipmap
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, 'gl.generateMipmap(gl.TEXTURE_2D)');
+
+ var fbo = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl[typeInfo.attachment], gl.TEXTURE_2D, tex, 0);
+
+ // Ensure DEPTH_BITS returns >= 16 bits for UNSIGNED_SHORT and UNSIGNED_INT, >= 24 UNSIGNED_INT_24_8_WEBGL.
+ // If there is stencil, ensure STENCIL_BITS reports >= 8 for UNSIGNED_INT_24_8_WEBGL.
+ shouldBeGreaterThanOrEqual('gl.getParameter(gl.DEPTH_BITS)', typeInfo.depthBits);
+ if (typeInfo.stencilBits === undefined) {
+ shouldBe('gl.getParameter(gl.STENCIL_BITS)', '0');
+ } else {
+ shouldBeGreaterThanOrEqual('gl.getParameter(gl.STENCIL_BITS)', typeInfo.stencilBits);
+ }
+
+ // TODO: remove this check if the spec is updated to require these combinations to work.
+ if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE)
+ {
+ // try adding a color buffer.
+ var colorTex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, colorTex);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, res, res, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, colorTex, 0);
+ }
+
+ shouldBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+
+ // use the default texture to render with while we return to the depth texture.
+ gl.bindTexture(gl.TEXTURE_2D, null);
+
+ // render the z-quad
+ gl.enable(gl.DEPTH_TEST);
+ gl.clearColor(1, 0, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+ dumpIt(gl, res, "--first--");
+
+ // render the depth texture.
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.clearColor(0, 0, 1, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+ var actualPixels = new Uint8Array(res * res * 4);
+ gl.readPixels(0, 0, res, res, gl.RGBA, gl.UNSIGNED_BYTE, actualPixels);
+
+ dumpIt(gl, res, "--depth--");
+
+ // Check that each pixel's R value is less than that of the previous pixel
+ // in either direction. Basically verify we have a gradient.
+ var success = true;
+ for (var yy = 0; yy < res; ++yy) {
+ for (var xx = 0; xx < res; ++xx) {
+ var actual = (yy * res + xx) * 4;
+ var left = actual - 4;
+ var down = actual - res * 4;
+
+ if (xx > 0) {
+ if (actualPixels[actual] <= actualPixels[left]) {
+ testFailed("actual(" + actualPixels[actual] + ") < left(" + actualPixels[left] + ")");
+ success = false;
+ }
+ }
+ if (yy > 0) {
+ if (actualPixels[actual] <= actualPixels[down]) {
+ testFailed("actual(" + actualPixels[actual] + ") < down(" + actualPixels[down] + ")");
+ success = false;
+ }
+ }
+ }
+ }
+
+ // Check that bottom left corner is vastly different thatn top right.
+ if (actualPixels[(res * res - 1) * 4] - actualPixels[0] < 0xC0) {
+ testFailed("corners are not different enough");
+ success = false;
+ }
+
+ if (success) {
+ testPassed("depth texture rendered correctly.");
+ }
+
+ // check limitations
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl[typeInfo.attachment], gl.TEXTURE_2D, null, 0);
+ var badAttachment = typeInfo.attachment == 'DEPTH_ATTACHMENT' ? 'DEPTH_STENCIL_ATTACHMENT' : 'DEPTH_ATTACHMENT';
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, 'gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.' + badAttachment + ', gl.TEXTURE_2D, tex, 0)');
+ shouldNotBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+ wtu.shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, 'gl.clear(gl.DEPTH_BUFFER_BIT)');
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+ }
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-draw-buffers.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-draw-buffers.html
new file mode 100644
index 000000000..7c963616c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-draw-buffers.html
@@ -0,0 +1,734 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL WEBGL_draw_buffers Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" width="64" height="64"> </canvas>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 a_position;
+void main() {
+ gl_Position = a_position;
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+#extension GL_EXT_draw_buffers : require
+precision mediump float;
+uniform vec4 u_colors[$(numDrawingBuffers)];
+void main() {
+ for (int i = 0; i < $(numDrawingBuffers); ++i) {
+ gl_FragData[i] = u_colors[i];
+ }
+}
+</script>
+<script id="fshaderRed" type="x-shader/x-fragment">
+precision mediump float;
+void main() {
+ gl_FragColor = vec4(1,0,0,1);
+}
+</script>
+<script id="fshaderMacroDisabled" type="x-shader/x-fragment">
+#ifdef GL_EXT_draw_buffers
+ bad code here
+#endif
+precision mediump float;
+void main() {
+ gl_FragColor = vec4(0,0,0,0);
+}
+</script>
+<script id="fshaderMacroEnabled" type="x-shader/x-fragment">
+#ifdef GL_EXT_draw_buffers
+ #if GL_EXT_draw_buffers == 1
+ #define CODE
+ #else
+ #define CODE this_code_is_bad_it_should_have_compiled
+ #endif
+#else
+ #define CODE this_code_is_bad_it_should_have_compiled
+#endif
+CODE
+precision mediump float;
+void main() {
+ gl_FragColor = vec4(0,0,0,0);
+}
+</script>
+<script id="fshaderBuiltInConstEnabled" type="x-shader/x-fragment">
+precision mediump float;
+void main() {
+ gl_FragColor = (gl_MaxDrawBuffers == $(numDrawingBuffers)) ? vec4(0,1,0,1) : vec4(1,0,0,1);
+}
+</script>
+<script>
+"use strict";
+description("This test verifies the functionality of the WEBGL_draw_buffers extension, if it is available.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var output = document.getElementById("console");
+var gl = wtu.create3DContext(canvas);
+var ext = null;
+var vao = null;
+
+var extensionConstants = [
+ { name: "MAX_COLOR_ATTACHMENTS_WEBGL", enum: 0x8CDF, expectedFn: function(v) { return v >= 4; }, passMsg: " should be >= 4"},
+ { name: "MAX_DRAW_BUFFERS_WEBGL", enum: 0x8824, expectedFn: function(v) { return v > 0; }, passMsg: " should be > 0"},
+
+ { name: "COLOR_ATTACHMENT0_WEBGL", enum: 0x8CE0, },
+ { name: "COLOR_ATTACHMENT1_WEBGL", enum: 0x8CE1, },
+ { name: "COLOR_ATTACHMENT2_WEBGL", enum: 0x8CE2, },
+ { name: "COLOR_ATTACHMENT3_WEBGL", enum: 0x8CE3, },
+ { name: "COLOR_ATTACHMENT4_WEBGL", enum: 0x8CE4, },
+ { name: "COLOR_ATTACHMENT5_WEBGL", enum: 0x8CE5, },
+ { name: "COLOR_ATTACHMENT6_WEBGL", enum: 0x8CE6, },
+ { name: "COLOR_ATTACHMENT7_WEBGL", enum: 0x8CE7, },
+ { name: "COLOR_ATTACHMENT8_WEBGL", enum: 0x8CE8, },
+ { name: "COLOR_ATTACHMENT9_WEBGL", enum: 0x8CE9, },
+ { name: "COLOR_ATTACHMENT10_WEBGL", enum: 0x8CEA, },
+ { name: "COLOR_ATTACHMENT11_WEBGL", enum: 0x8CEB, },
+ { name: "COLOR_ATTACHMENT12_WEBGL", enum: 0x8CEC, },
+ { name: "COLOR_ATTACHMENT13_WEBGL", enum: 0x8CED, },
+ { name: "COLOR_ATTACHMENT14_WEBGL", enum: 0x8CEE, },
+ { name: "COLOR_ATTACHMENT15_WEBGL", enum: 0x8CEF, },
+
+ { name: "DRAW_BUFFER0_WEBGL", enum: 0x8825, },
+ { name: "DRAW_BUFFER1_WEBGL", enum: 0x8826, },
+ { name: "DRAW_BUFFER2_WEBGL", enum: 0x8827, },
+ { name: "DRAW_BUFFER3_WEBGL", enum: 0x8828, },
+ { name: "DRAW_BUFFER4_WEBGL", enum: 0x8829, },
+ { name: "DRAW_BUFFER5_WEBGL", enum: 0x882A, },
+ { name: "DRAW_BUFFER6_WEBGL", enum: 0x882B, },
+ { name: "DRAW_BUFFER7_WEBGL", enum: 0x882C, },
+ { name: "DRAW_BUFFER8_WEBGL", enum: 0x882D, },
+ { name: "DRAW_BUFFER9_WEBGL", enum: 0x882E, },
+ { name: "DRAW_BUFFER10_WEBGL", enum: 0x882F, },
+ { name: "DRAW_BUFFER11_WEBGL", enum: 0x8830, },
+ { name: "DRAW_BUFFER12_WEBGL", enum: 0x8831, },
+ { name: "DRAW_BUFFER13_WEBGL", enum: 0x8832, },
+ { name: "DRAW_BUFFER14_WEBGL", enum: 0x8833, },
+ { name: "DRAW_BUFFER15_WEBGL", enum: 0x8834, },
+];
+
+if (!gl) {
+ testFailed("WebGL context does not exist");
+} else {
+ testPassed("WebGL context exists");
+
+ // Run tests with extension disabled
+ runEnumTestDisabled();
+ runShadersTestDisabled();
+ runAttachmentTestDisabled();
+
+ debug("");
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = gl.getExtension("WEBGL_draw_buffers");
+ if (!ext) {
+ testPassed("No WEBGL_draw_buffers support -- this is legal");
+
+ runSupportedTest(false);
+ finishTest();
+ } else {
+ testPassed("Successfully enabled WEBGL_draw_buffers extension");
+
+ runSupportedTest(true);
+ runEnumTestEnabled();
+ runShadersTestEnabled();
+ runAttachmentTestEnabled();
+ runDrawTests();
+ runPreserveTests();
+ }
+}
+
+function createExtDrawBuffersProgram(scriptId, sub) {
+ var fsource = wtu.getScript(scriptId);
+ fsource = wtu.replaceParams(fsource, sub);
+ wtu.addShaderSource(output, "fragment shader", fsource);
+ return wtu.setupProgram(gl, ["vshader", fsource], ["a_position"]);
+}
+
+function runSupportedTest(extensionEnabled) {
+ var supported = gl.getSupportedExtensions();
+ if (supported.indexOf("WEBGL_draw_buffers") >= 0) {
+ if (extensionEnabled) {
+ testPassed("WEBGL_draw_buffers listed as supported and getExtension succeeded");
+ } else {
+ testFailed("WEBGL_draw_buffers listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("WEBGL_draw_buffers not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("WEBGL_draw_buffers not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runEnumTestDisabled() {
+ debug("");
+ debug("Testing binding enum with extension disabled");
+
+ // Use the constant directly as we don't have the extension
+ extensionConstants.forEach(function(c) {
+ if (c.expectedFn) {
+ gl.getParameter(c.enum);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, c.name + " should not be queryable if extension is disabled");
+ }
+ });
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+}
+
+function runEnumTestEnabled() {
+ debug("");
+ debug("Testing enums with extension enabled");
+
+ extensionConstants.forEach(function(c) {
+ shouldBe("ext." + c.name, "0x" + c.enum.toString(16));
+ if (c.expectedFn) {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "before getParameter");
+ debug(c.name + ": 0x" + ext[c.name].toString(16));
+ expectTrue(c.expectedFn(gl.getParameter(ext[c.name])), "gl.getParameter(ext." + c.name + ")" + c.passMsg);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, c.name + " query should succeed if extension is enabled");
+ }
+ });
+
+ shouldBeTrue("gl.getParameter(ext.MAX_COLOR_ATTACHMENTS_WEBGL) >= gl.getParameter(ext.MAX_DRAW_BUFFERS_WEBGL)");
+
+ debug("Testing drawBuffersWEBGL with default drawing buffer");
+ shouldBe("gl.getParameter(ext.DRAW_BUFFER0_WEBGL)", "gl.BACK");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "ext.drawBuffersWEBGL([])");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "ext.drawBuffersWEBGL([gl.NONE, gl.NONE])");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "ext.drawBuffersWEBGL([ext.COLOR_ATTACHMENT0_WEBGL])");
+ shouldBe("gl.getParameter(ext.DRAW_BUFFER0_WEBGL)", "gl.BACK");
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "ext.drawBuffersWEBGL([gl.NONE])");
+ shouldBe("gl.getParameter(ext.DRAW_BUFFER0_WEBGL)", "gl.NONE");
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "ext.drawBuffersWEBGL([gl.BACK])");
+ shouldBe("gl.getParameter(ext.DRAW_BUFFER0_WEBGL)", "gl.BACK");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+}
+
+function testShaders(tests, sub) {
+ tests.forEach(function(test) {
+ var shaders = [wtu.getScript(test.shaders[0]), wtu.replaceParams(wtu.getScript(test.shaders[1]), sub)];
+ wtu.addShaderSource(output, "vertex shader", shaders[0]);
+ wtu.addShaderSource(output, "fragment shader", shaders[1]);
+ var program = wtu.setupProgram(gl, shaders, ["a_position"]);
+ var programLinkedSuccessfully = (program != null);
+ var expectedProgramToLinkSuccessfully = (test.expectFailure == true);
+ expectTrue(programLinkedSuccessfully != expectedProgramToLinkSuccessfully, test.msg);
+ gl.deleteProgram(program);
+ });
+}
+
+function runShadersTestDisabled() {
+ debug("");
+ debug("test shaders disabled");
+
+ testShaders([
+ { shaders: ["vshader", "fshaderMacroDisabled"],
+ msg: "GL_EXT_draw_buffers should not be defined in GLSL",
+ },
+ { shaders: ["vshader", "fshader"],
+ msg: "#extension GL_EXT_draw_buffers should not be allowed in GLSL",
+ expectFailure: true,
+ },
+ ], {numDrawingBuffers: 1});
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+}
+
+function runShadersTestEnabled() {
+ debug("");
+ debug("test shaders enabled");
+
+ var sub = {numDrawingBuffers: gl.getParameter(ext.MAX_DRAW_BUFFERS_WEBGL)};
+ testShaders([
+ { shaders: ["vshader", "fshaderMacroEnabled"],
+ msg: "GL_EXT_draw_buffers should be defined as 1 in GLSL",
+ },
+ { shaders: ["vshader", "fshader"],
+ msg: "fragment shader containing the #extension directive should compile",
+ },
+ ], sub);
+
+ var program = createExtDrawBuffersProgram("fshaderBuiltInConstEnabled", sub);
+ wtu.setupUnitQuad(gl);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+ gl.deleteProgram(program);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+}
+
+function runAttachmentTestDisabled() {
+ debug("");
+ debug("test attachment disabled");
+ var tex = gl.createTexture();
+ var fb = gl.createFramebuffer();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 1, gl.TEXTURE_2D, tex, 0);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "should not be able to attach to gl.COLOR_ATTACHMENT1");
+ gl.deleteFramebuffer(fb);
+ gl.deleteTexture(tex);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+}
+
+function makeArray(size, value) {
+ var array = []
+ for (var ii = 0; ii < size; ++ii) {
+ array.push(value);
+ }
+ return array;
+}
+
+function makeColorAttachmentArray(size) {
+ var array = []
+ for (var ii = 0; ii < size; ++ii) {
+ array.push(gl.COLOR_ATTACHMENT0 + ii);
+ }
+ return array;
+}
+
+function runAttachmentTestEnabled() {
+ debug("");
+ debug("test attachment enabled");
+
+ var maxDrawingBuffers = gl.getParameter(ext.MAX_DRAW_BUFFERS_WEBGL);
+ var maxColorAttachments = gl.getParameter(ext.MAX_COLOR_ATTACHMENTS_WEBGL);
+
+ var tex = gl.createTexture();
+ var fb = gl.createFramebuffer();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + maxColorAttachments, gl.TEXTURE_2D, tex, 0);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "should not be able to attach pass the max attachment point: gl.COLOR_ATTACHMENT0 + " + maxColorAttachments);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + maxColorAttachments - 1, gl.TEXTURE_2D, tex, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be able to attach to the max attachment point: gl.COLOR_ATTACHMENT0 + " + (maxColorAttachments - 1));
+ ext.drawBuffersWEBGL(makeArray(maxDrawingBuffers, gl.NONE));
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be able to call drawBuffersWEBGL with array NONE of size " + maxColorAttachments);
+ var bufs = makeColorAttachmentArray(maxDrawingBuffers);
+ ext.drawBuffersWEBGL(bufs);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be able to call drawBuffersWEBGL with array attachments of size " + maxColorAttachments);
+ bufs[0] = gl.NONE;
+ ext.drawBuffersWEBGL(bufs);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be able to call drawBuffersWEBGL with mixed array attachments of size " + maxColorAttachments);
+ if (maxDrawingBuffers > 1) {
+ bufs[0] = ext.COLOR_ATTACHMENT1_WEBGL;
+ bufs[1] = ext.COLOR_ATTACHMENT0_WEBGL;
+ ext.drawBuffersWEBGL(bufs);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "should not be able to call drawBuffersWEBGL with out of order attachments of size " + maxColorAttachments);
+ var bufs = makeColorAttachmentArray(Math.floor(maxDrawingBuffers / 2));
+ ext.drawBuffersWEBGL(bufs);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be able to call drawBuffersWEBGL with short array of attachments of size " + bufs.length);
+ }
+
+ gl.deleteFramebuffer(fb);
+ gl.deleteTexture(tex);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+}
+
+function makeColorByIndex(index) {
+ var low = (index - 1) % 15 + 1;
+ var high = (index - 1) / 15;
+
+ var zeroOrOne = function(v) {
+ return v ? 1 : 0;
+ };
+
+ var oneOrTwo = function(v) {
+ return v ? 2 : 1;
+ }
+
+ var makeComponent = function(b0, b1, b2) {
+ return Math.floor(255 * zeroOrOne(b0) / oneOrTwo(b1) / oneOrTwo(b2));
+ };
+ return [
+ makeComponent(low & (1 << 0), high & (1 << 0), high & (1 << 4)),
+ makeComponent(low & (1 << 1), high & (1 << 1), high & (1 << 5)),
+ makeComponent(low & (1 << 2), high & (1 << 2), high & (1 << 6)),
+ makeComponent(low & (1 << 3), high & (1 << 3), high & (1 << 7)),
+ ];
+}
+
+function runDrawTests() {
+ debug("");
+ debug("--------- draw tests -----------");
+ var fb = gl.createFramebuffer();
+ var fb2 = gl.createFramebuffer();
+ var halfFB1 = gl.createFramebuffer();
+ var halfFB2 = gl.createFramebuffer();
+ var endsFB = gl.createFramebuffer();
+ var middleFB = gl.createFramebuffer();
+
+ var maxDrawingBuffers = gl.getParameter(ext.MAX_DRAW_BUFFERS_WEBGL);
+ var maxColorAttachments = gl.getParameter(ext.MAX_COLOR_ATTACHMENTS_WEBGL);
+ var maxUniformVectors = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS);
+ var maxUsable = Math.min(maxDrawingBuffers, maxColorAttachments, maxUniformVectors);
+ var half = Math.floor(maxUsable / 2);
+ var bufs = makeColorAttachmentArray(maxUsable);
+ var nones = makeArray(maxUsable, gl.NONE);
+
+ [fb, fb2, halfFB1, halfFB2, endsFB, middleFB].forEach(function(fbo) {
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ ext.drawBuffersWEBGL(bufs);
+ });
+
+ var checkProgram = wtu.setupTexturedQuad(gl);
+ var redProgram = wtu.setupProgram(gl, ["vshader", "fshaderRed"], ["a_position"]);
+ var drawProgram = createExtDrawBuffersProgram("fshader", {numDrawingBuffers: maxDrawingBuffers});
+ var width = 64;
+ var height = 64;
+ var attachments = [];
+ // Makes 6 framebuffers.
+ // fb and fb2 have all the attachments.
+ // halfFB1 has the first half of the attachments
+ // halfFB2 has the second half of the attachments
+ // endsFB has the first and last attachments
+ // middleFB has all but the first and last attachments
+ for (var ii = 0; ii < maxUsable; ++ii) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + ii, gl.TEXTURE_2D, tex, 0);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + ii, gl.TEXTURE_2D, tex, 0);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, ii < half ? halfFB1 : halfFB2);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + ii, gl.TEXTURE_2D, tex, 0);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, (ii == 0 || ii == (maxUsable - 1)) ? endsFB : middleFB);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + ii, gl.TEXTURE_2D, tex, 0);
+ var location = gl.getUniformLocation(drawProgram, "u_colors[" + ii + "]");
+ var color = makeColorByIndex(ii + 1);
+ var floatColor = [color[0] / 255, color[1] / 255, color[2] / 255, color[3] / 255];
+ gl.uniform4fv(location, floatColor);
+ attachments.push({
+ texture: tex,
+ location: location,
+ color: color
+ });
+ }
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+
+ var checkAttachmentsForColorFn = function(attachments, colorFn) {
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ gl.useProgram(checkProgram);
+ attachments.forEach(function(attachment, index) {
+ gl.bindTexture(gl.TEXTURE_2D, attachment.texture);
+ wtu.clearAndDrawUnitQuad(gl);
+ var expectedColor = colorFn(attachment, index);
+ var tolerance = 0;
+ expectedColor.forEach(function(v) {
+ if (v != 0 && v != 255) {
+ tolerance = 8;
+ }
+ });
+ wtu.checkCanvas(gl, expectedColor, "attachment " + index + " should be " + expectedColor.toString(), tolerance);
+ });
+ debug("");
+ };
+
+ var checkAttachmentsForColor = function(attachments, color) {
+ checkAttachmentsForColorFn(attachments, function(attachment, index) {
+ return color || attachment.color;
+ });
+ };
+
+ var drawAndCheckAttachments = function(testFB, msg, testFn) {
+ debug("test clearing " + msg);
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, testFB);
+
+ attachments.forEach(function(attachment, index) {
+ debug("attachment: " + index + " = " + wtu.glEnumToString(gl, gl.getParameter(ext.DRAW_BUFFER0_WEBGL + index)) +
+ ", " + wtu.glEnumToString(gl, gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + index, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)));
+ });
+
+ if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE) {
+ debug("framebuffer not complete");
+ debug("");
+ return;
+ }
+
+ // Clear all the attachments
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+ gl.clearColor(0, 0, 0, 0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ //checkAttachmentsForColorFn(attachments, function(attachment, index) {
+ // return [0, 0, 0, 0];
+ //});
+ //debug("--");
+
+ // Clear some attachments using testFB
+ gl.bindFramebuffer(gl.FRAMEBUFFER, testFB);
+
+ gl.clearColor(0, 1, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ checkAttachmentsForColorFn(attachments, function(attachment, index) {
+ return testFn(attachment, index) ? [0, 255, 0, 255] : [0, 0, 0, 0];
+ });
+
+ debug("test drawing to " + msg);
+
+ // Draw to some attachments using testFB
+ gl.useProgram(drawProgram);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, testFB);
+ wtu.drawUnitQuad(gl);
+
+ checkAttachmentsForColorFn(attachments, function(attachment, index) {
+ return testFn(attachment, index) ? attachment.color : [0, 0, 0, 0];
+ });
+ };
+
+ gl.useProgram(drawProgram);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+ ext.drawBuffersWEBGL(bufs);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ ext.drawBuffersWEBGL(bufs);
+
+ wtu.drawUnitQuad(gl);
+
+ debug("test that each texture got the correct color.");
+
+ checkAttachmentsForColor(attachments);
+
+ debug("test clearing clears all the textures");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ gl.clearColor(0, 1, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ checkAttachmentsForColor(attachments, [0, 255, 0, 255]);
+
+ debug("test that NONE draws nothing");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ ext.drawBuffersWEBGL(nones);
+ gl.useProgram(redProgram);
+ wtu.clearAndDrawUnitQuad(gl);
+
+ checkAttachmentsForColor(attachments, [0, 255, 0, 255]);
+
+ debug("test that gl_FragColor broadcasts");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ ext.drawBuffersWEBGL(bufs);
+ gl.useProgram(redProgram);
+ wtu.drawUnitQuad(gl);
+
+ checkAttachmentsForColor(attachments, [255, 0, 0, 255]);
+
+ if (maxUsable > 1) {
+ var bufs1 = makeColorAttachmentArray(maxUsable);
+ var bufs2 = makeColorAttachmentArray(maxUsable);
+ for (var ii = 0; ii < maxUsable; ++ii) {
+ if (ii < half) {
+ bufs1[ii] = gl.NONE;
+ } else {
+ bufs2[ii] = gl.NONE;
+ }
+ }
+
+ debug("test setting first half to NONE and clearing");
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ ext.drawBuffersWEBGL(bufs1);
+ gl.clearColor(0, 1, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ checkAttachmentsForColorFn(attachments, function(attachment, index) {
+ return index < half ? [255, 0, 0, 255] : [0, 255, 0, 255];
+ });
+
+ debug("test setting first half to NONE and drawing");
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ gl.useProgram(drawProgram);
+ wtu.drawUnitQuad(gl);
+
+ checkAttachmentsForColorFn(attachments, function(attachment, index) {
+ return index < half ? [255, 0, 0, 255] : attachment.color;
+ });
+
+ debug("test setting second half to NONE and clearing");
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ ext.drawBuffersWEBGL(bufs);
+ gl.clearColor(1, 0, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ ext.drawBuffersWEBGL(bufs2);
+ gl.clearColor(0, 0, 1, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ checkAttachmentsForColorFn(attachments, function(attachment, index) {
+ return index < half ? [0, 0, 255, 255] : [255, 0, 0, 255];
+ });
+
+ debug("test setting second half to NONE and drawing");
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ gl.useProgram(drawProgram);
+ wtu.drawUnitQuad(gl);
+
+ checkAttachmentsForColorFn(attachments, function(attachment, index) {
+ return index < half ? attachment.color : [255, 0, 0, 255];
+ });
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, halfFB1);
+ ext.drawBuffersWEBGL(bufs);
+ drawAndCheckAttachments(
+ halfFB1, "framebuffer that only has first half of attachments",
+ function(attachment, index) {
+ return index < half;
+ });
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, halfFB2);
+ ext.drawBuffersWEBGL(bufs);
+ drawAndCheckAttachments(
+ halfFB2, "framebuffer that only has second half of attachments",
+ function(attachment, index) {
+ return index >= half;
+ });
+
+ if (maxUsable > 2) {
+ gl.bindFramebuffer(gl.FRAMEBUFFER, endsFB);
+ ext.drawBuffersWEBGL(bufs);
+ drawAndCheckAttachments(
+ endsFB, "framebuffer that only has first and last attachments",
+ function(attachment, index) {
+ return index == 0 || index == (maxUsable - 1);
+ });
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, middleFB);
+ ext.drawBuffersWEBGL(bufs);
+ drawAndCheckAttachments(
+ middleFB,
+ "framebuffer that has all but the first and last attachments",
+ function(attachment, index) {
+ return index != 0 && index != (maxUsable - 1);
+ });
+ }
+ }
+
+ debug("test switching between fbos does not affect any color attachment contents");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+ ext.drawBuffersWEBGL(nones);
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ ext.drawBuffersWEBGL(bufs);
+ gl.clearColor(1, 0, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ checkAttachmentsForColor(attachments, [255, 0, 0, 255]);
+
+ // fb2 still has the NONE draw buffers from before, so this draw should be a no-op.
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+ gl.useProgram(drawProgram);
+ wtu.drawUnitQuad(gl);
+ checkAttachmentsForColor(attachments, [255, 0, 0, 255]);
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ gl.useProgram(drawProgram);
+ wtu.drawUnitQuad(gl);
+ checkAttachmentsForColor(attachments);
+
+ debug("test queries");
+ debug("check framebuffer with all attachments on");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ for (var ii = 0; ii < maxUsable; ++ii) {
+ shouldBe("gl.getParameter(ext.DRAW_BUFFER0_WEBGL + " + ii + ")", "gl.COLOR_ATTACHMENT0 + " + ii);
+ }
+
+ debug("check framebuffer with all attachments off");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+ for (var ii = 0; ii < maxUsable; ++ii) {
+ shouldBe("gl.getParameter(ext.DRAW_BUFFER0_WEBGL + " + ii + ")", "gl.NONE");
+ }
+
+ debug("test attachment size mis-match");
+ gl.bindTexture(gl.TEXTURE_2D, attachments[0].texture);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width * 2, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ shouldBeTrue("gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+ shouldBeTrue("gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE");
+
+ gl.deleteFramebuffer(fb);
+ gl.deleteFramebuffer(fb2);
+ gl.deleteFramebuffer(halfFB1);
+ gl.deleteFramebuffer(halfFB2);
+ attachments.forEach(function(attachment) {
+ gl.deleteTexture(attachment.texture);
+ });
+ gl.deleteProgram(checkProgram);
+ gl.deleteProgram(redProgram);
+ gl.deleteProgram(drawProgram);
+}
+
+function runPreserveTests() {
+ debug("");
+ debug("--------- preserve tests -----------");
+
+ debug("Testing that frame buffer is cleared after compositing");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+
+ gl.clearColor(1, 1, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.checkCanvas(gl, [255, 255, 0, 255], "should be yellow");
+
+ // set the draw buffer to NONE
+ ext.drawBuffersWEBGL([gl.NONE]);
+ gl.clearColor(1, 0, 1, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ // make sure the canvas is still clear
+ wtu.checkCanvas(gl, [255, 255, 0, 255], "should be yellow");
+
+ wtu.waitForComposite(function() {
+ gl.clearColor(1, 0, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.checkCanvas(gl, [0, 0, 0, 0], "should be clear");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+
+ finishTest();
+ });
+}
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-shared-resources.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-shared-resources.html
new file mode 100644
index 000000000..a490773dd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/extensions/webgl-shared-resources.html
@@ -0,0 +1,863 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL WEBGL_Shared_Resources Conformance Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 a_position;
+void main() {
+ gl_Position = a_position;
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform vec4 u_color;
+void main() {
+ gl_FragColor = u_color;
+}
+</script>
+<style>
+canvas {
+ border: 1px solid black;
+}
+</style>
+<canvas id="canvas1" width="64" height="64"> </canvas>
+<canvas id="canvas2" width="64" height="64"> </canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description();
+
+var wtu = WebGLTestUtils;
+var shouldGenerateGLError = wtu.shouldGenerateGLError;
+var canvas1 = document.getElementById("canvas1");
+var gl = wtu.create3DContext(canvas1);
+var gl2;
+var ext = null;
+var ext2;
+var ext3;
+var buf;
+var elementBuf;
+var tex;
+var tex3;
+var rb;
+var fb;
+var id;
+var resource;
+var shader;
+var program;
+var uniformLocation;
+var acquiredFlag;
+var shaderProgram; // acquired progam (never released) used for shader testing
+var programShader; // acquired shader (never released) used for program testing
+
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ // Run tests with extension disabled
+ runTestDisabled();
+
+ // Query the extension and store globally so shouldBe can access it
+ ext = wtu.getExtensionWithKnownPrefixes(gl, "WEBGL_shared_resources");
+ if (!ext) {
+ testPassed("No WEBGL_shared_resources support -- this is legal");
+ runSupportedTest(false);
+ finishTest();
+ } else {
+ testPassed("Successfully enabled WEBGL_shared_resources extension");
+
+ runSupportedTest(true);
+ runTestExtension();
+ }
+}
+
+function runSupportedTest(extensionEnabled) {
+ var name = wtu.getSupportedExtensionWithKnownPrefixes(gl, "WEBGL_shared_resources");
+ if (name !== undefined) {
+ if (extensionEnabled) {
+ testPassed("WEBGL_shared_resources listed as supported and getExtension succeeded");
+ } else {
+ testFailed("WEBGL_shared_resources listed as supported but getExtension failed");
+ }
+ } else {
+ if (extensionEnabled) {
+ testFailed("WEBGL_shared_resources not listed as supported but getExtension succeeded");
+ } else {
+ testPassed("WEBGL_shared_resources not listed as supported and getExtension failed -- this is legal");
+ }
+ }
+}
+
+function runTestDisabled() {
+ // There is no functionality accessable with this extension disabled.
+}
+
+function makeFailCallback(msg) {
+ return function() {
+ testFailed(msg);
+ }
+};
+
+
+function runTestExtension() {
+ var canvas2 = document.getElementById("canvas2");
+ gl2 = wtu.create3DContext(canvas2, { group: ext.group });
+ ext2 = wtu.getExtensionWithKnownPrefixes(gl2, "WEBGL_shared_resources");
+
+ // Runs an array of functions. Expects each function takes a callback
+ // it will call when finished.
+ var runSequence = function(steps) {
+ var stepNdx = 0;
+ var runNextStep = function() {
+ if (stepNdx < steps.length) {
+ steps[stepNdx++](runNextStep);
+ }
+ };
+ runNextStep();
+ };
+
+ var bufferTests = {
+ resourceType: "buffer",
+
+ setupFunction: function() {
+ buf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ gl.bufferData(gl.ARRAY_BUFFER, 16, gl.STATIC_DRAW);
+ return buf;
+ },
+
+ bindFunction: function(buf) {
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ },
+
+ implicitBindFunctions: function(expectedError) {
+ shouldGenerateGLError(gl, expectedError, "gl.vertexAttribPointer(0, 4, gl.FLOAT, false, 0, 0)");
+ },
+
+ modificationFunctions: function(expectedError) {
+ shouldGenerateGLError(gl, expectedError, "gl.bufferData(gl.ARRAY_BUFFER, 16, gl.STATIC_DRAW)");
+ shouldGenerateGLError(gl, expectedError, "gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Uint8Array(4))");
+ },
+
+ queryFunctions: function(expectedError) {
+ shouldGenerateGLError(gl, expectedError, "gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE)");
+ },
+ };
+
+ var programTests = {
+ resourceType: "program",
+
+ setupFunction: function() {
+ // We need a valid a program with valid shaders to share because the only way to 'bind'
+ // a program is to call gl.useProgram and you can't call gl.useProgram on an invalid program.
+ program = wtu.setupProgram(gl, ["vshader", "fshader"]);
+ programShader = gl.getAttachedShaders(program)[0];
+ uniformLocation = gl.getUniformLocation(program, "u_color");
+ return program;
+ },
+
+ bindFunction: function(program) {
+ gl.useProgram(program);
+ },
+
+ implicitBindFunctions: function(expectedError) {
+ },
+
+ modificationFunctions: function(expectedError) {
+ if (expectedError == gl.NO_ERROR) {
+ // Need to get a new location because we may have re-linked.
+ uniformLocation = gl.getUniformLocation(program, 'u_color');
+ }
+ shouldGenerateGLError(gl, expectedError, "gl.uniform4f(uniformLocation, 0, 1, 2, 3)");
+ shouldGenerateGLError(gl, expectedError, "gl.detachShader(program, programShader)");
+ shouldGenerateGLError(gl, expectedError, "gl.attachShader(program, programShader)");
+ shouldGenerateGLError(gl, expectedError, "gl.bindAttribLocation(program, 0, 'foo')");
+ shouldGenerateGLError(gl, expectedError, "gl.linkProgram(program)");
+ },
+
+ queryFunctions: function(expectedError) {
+ shouldGenerateGLError(gl, expectedError, "gl.getProgramParameter(program, gl.LINK_STATUS)");
+ shouldGenerateGLError(gl, expectedError, "gl.getProgramInfoLog(program)");
+ shouldGenerateGLError(gl, expectedError, "gl.getAttachedShaders(program)");
+ shouldGenerateGLError(gl, expectedError, "gl.getAttribLocation(program, 'foo')");
+ shouldGenerateGLError(gl, expectedError, "gl.getUniformLocation(program, 'foo')");
+ shouldGenerateGLError(gl, expectedError, "gl.getActiveAttrib(program, 0)");
+ shouldGenerateGLError(gl, expectedError, "gl.getActiveUniform(program, 0)");
+ shouldGenerateGLError(gl, expectedError, "gl.getUniform(program, uniformLocation)");
+ },
+ };
+
+ var renderbufferTests = {
+ resourceType: "renderbuffer",
+
+ setupFunction: function() {
+ rb = gl.createRenderbuffer();
+ gl.bindRenderbuffer(gl.RENDERBUFFER, rb);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16);
+ fb = gl.createFramebuffer();
+ return rb;
+ },
+
+ bindFunction: function(rb) {
+ gl.bindRenderbuffer(gl.RENDERBUFFER, rb);
+ },
+
+ implicitBindFunctions: function(expectedError) {
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ shouldGenerateGLError(gl, expectedError, "gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rb)");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ },
+
+ modificationFunctions: function(expectedError) {
+ shouldGenerateGLError(gl, expectedError, "gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16)");
+ },
+
+ queryFunctions: function(expectedError) {
+ shouldGenerateGLError(gl, expectedError, "gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_WIDTH)");
+ },
+ };
+
+
+ var shaderTests = {
+ resourceType: "shader",
+
+ setupFunction: function() {
+ var shaderSource = "Hello World";
+ shader = gl.createShader(gl.VERTEX_SHADER);
+ gl.shaderSource(shader, shaderSource);
+ shaderProgram = gl.createProgram();
+ gl.attachShader(shaderProgram, shader);
+ return shader;
+ },
+
+ bindFunction: function(shader) {
+ gl.detachShader(shaderProgram, shader); // you can't attach if a shader is already attached.
+ gl.attachShader(shaderProgram, shader);
+ },
+
+ implicitBindFunctions: function(expectedError) {
+ },
+
+ modificationFunctions: function(expectedError) {
+ shouldGenerateGLError(gl, expectedError, "gl.shaderSource(shader, 'foo')");
+ shouldGenerateGLError(gl, expectedError, "gl.compileShader(shader)");
+ },
+
+ queryFunctions: function(expectedError) {
+ shouldGenerateGLError(gl, expectedError, "gl.getShaderParameter(shader, gl.COMPILE_STATUS)");
+ shouldGenerateGLError(gl, expectedError, "gl.getShaderInfoLog(shader)");
+ },
+ };
+
+ var textureTests = {
+ resourceType: "texture",
+
+ setupFunction: function() {
+ tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 16, 16, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ return tex;
+ },
+
+ bindFunction: function(tex) {
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ },
+
+ implicitBindFunctions: function(expectedError) {
+ },
+
+ modificationFunctions: function(expectedError) {
+ shouldGenerateGLError(gl, expectedError, "gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT)");
+ shouldGenerateGLError(gl, expectedError, "gl.generateMipmap(gl.TEXTURE_2D)");
+ shouldGenerateGLError(gl, expectedError, "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 16, 16, 0, gl.RGBA, gl.UNSIGNED_BYTE, null)");
+ shouldGenerateGLError(gl, expectedError, "gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4))");
+ shouldGenerateGLError(gl, expectedError, "gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, 16, 16, 0)");
+ shouldGenerateGLError(gl, expectedError, "gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, 16, 16)");
+ // TODO: Add compressed texture test if extension exists?
+ },
+
+ queryFunctions: function(expectedError) {
+ shouldGenerateGLError(gl, expectedError, "gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S)");
+ },
+ };
+
+ var testResourceWithSingleContext = function(info, callback) {
+ var resourceType = info.resourceType;
+
+ debug("")
+ debug("test " + resourceType);
+ var resource = info.setupFunction();
+ ext.releaseSharedResource(resource);
+
+ debug("");
+ debug("test " + resourceType + " functions can not be called on released " + resourceType);
+ info.modificationFunctions(gl.INVALID_OPERATION);
+ info.implicitBindFunctions(gl.INVALID_OPERATION);
+ info.queryFunctions(gl.INVALID_OPERATION);
+
+ debug("");
+ debug("test acquring " + resourceType);
+ ext.acquireSharedResource(resource, ext.READ_ONLY, function() {
+ debug("");
+ debug("test " + resourceType + " functions can not be called on READ_ONLY acquired " + resourceType + " that has not been bound");
+ info.queryFunctions(gl.INVALID_OPERATION);
+ info.modificationFunctions(gl.INVALID_OPERATION);
+
+ debug("");
+ debug("test query " + resourceType + " functions can be called on READ_ONLY acquired " + resourceType + " that has been bound but not " + resourceType + " modification functions");
+ info.bindFunction(resource);
+ info.queryFunctions(gl.NO_ERROR);
+ info.modificationFunctions(gl.INVALID_OPERATION);
+
+ ext.releaseSharedResource(resource);
+ ext.acquireSharedResource(resource, ext.EXCLUSIVE, function() {
+ debug("");
+ debug("test " + resourceType + " functions can not be called on EXCLUSIVE acquired " + resourceType + " that has not been bound");
+ info.queryFunctions(gl.INVALID_OPERATION);
+ info.modificationFunctions(gl.INVALID_OPERATION);
+
+ debug("");
+ debug("test all " + resourceType + " functions can be called on EXCLUSIVE acquired " + resourceType + " that has been bound.");
+ info.bindFunction(resource)
+ info.queryFunctions(gl.NO_ERROR);
+ info.modificationFunctions(gl.NO_ERROR);
+ callback();
+ });
+ });
+ };
+
+ var makeSingleContextResourceTest = function(info) {
+ return function(callback) {
+ testResourceWithSingleContext(info, callback);
+ };
+ };
+
+ var testCommonResourceFeatures = function(info, callback) {
+ var type = info.resourceType.charAt(0).toUpperCase() + info.resourceType.slice(1);
+ acquiredFlag = false;
+ debug("");
+ debug("test common features of " + type);
+
+ resource = info.setupFunction();
+ info.bindFunction(resource);
+
+ debug("Test a deleted resource can still be acquired.");
+ var checkAcquireAfterDelete = function() {
+ debug("check Acquire After Delete");
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.delete" + type + "(resource)");
+// TODO: fix spec then comment this in shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.bind" + type + "(gl." + target + ", resource)"); // You can't bind a deleted resource
+ shouldGenerateGLError(gl, gl.NO_ERROR, "ext.releaseSharedResource(resource)");
+ callback();
+ };
+
+ var checkDeleteExclusive = function() {
+ debug("check delete EXLUSIVE");
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.delete" + type + "(resource)");
+ info.bindFunction(resource);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no error deleting exclusively acquired resource");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.delete" + type + "(resource)");
+ ext.releaseSharedResource(resource);
+ ext.acquireSharedResource(resource, ext.EXCLUSIVE, checkAcquireAfterDelete);
+ };
+
+ var checkDeleteReadOnly = function() {
+ acquiredFlag = true;
+ debug("check delete READ_ONLY");
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.delete" + type + "(resource)");
+ info.bindFunction(resource);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no error bind read only acquired resource");
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.delete" + type + "(resource)"); // We're READ_ONLY so this should fail
+ ext.releaseSharedResource(resource);
+ ext.acquireSharedResource(resource, ext.EXCLUSIVE, checkDeleteExclusive);
+ };
+
+ debug("Test you can't have 2 outstanding requests for the same resource.");
+ ext.releaseSharedResource(resource);
+ ext.acquireSharedResource(resource, ext.READ_ONLY, checkDeleteReadOnly);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no error from 1st acquire request");
+ ext.acquireSharedResource(resource, ext.READ_ONLY, checkDeleteReadOnly);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "should be INVALID_OPERATION from 2nd acquire request");
+
+ debug("Test acquire does not happen immediately on release (must exit current event)");
+ shouldBeTrue("acquiredFlag === false");
+ };
+
+ var makeCommonResourceFeatureTest = function(info) {
+ return function(callback) {
+ testCommonResourceFeatures(info, callback);
+ };
+ };
+
+ // acquire multiple resources in multiple contexts.
+ var acquireMultipleResources = function(extensions, resources, mode, callback) {
+ var numNeeded = resources.length * extensions.length;
+
+ var checkAcquire = function() {
+ --numNeeded;
+ if (numNeeded == 0) {
+ callback();
+ }
+ };
+
+ resources.forEach(function(resource) {
+ extensions.forEach(function(ext) {
+ ext.acquireSharedResource(resource, mode, checkAcquire);
+ });
+ });
+ };
+
+ // release multiple resources in multiple contexts.
+ var releaseMultipleResources = function(extensions, resources) {
+ resources.forEach(function(resource) {
+ extensions.forEach(function(ext) {
+ ext.releaseSharedResource(resource);
+ });
+ });
+ };
+
+ var testRendering = function(callback) {
+ debug("");
+ debug("test rendering");
+ var positionLocation = 0;
+ var texcoordLocation = 1;
+ var program = wtu.setupSimpleTextureProgram(gl, positionLocation, texcoordLocation);
+ var buffers = wtu.setupUnitQuad(gl, positionLocation, texcoordLocation);
+ var rb = gl.createRenderbuffer();
+ var fb = gl.createFramebuffer();
+
+ var elementBuf = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementBuf);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array([0, 1, 2, 3, 4, 5]), gl.STATIC_DRAW);
+
+ var width = 16;
+ var height = 16;
+
+ gl.bindRenderbuffer(gl.RENDERBUFFER, rb);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, width, height);
+
+ var destTex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, destTex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rb);
+ // It's not clear if gl.RGBA4 must be framebuffer complete.
+ var canCheckRenderbuffer = (gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE);
+
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, destTex, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "setup");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE");
+
+ var tex = gl.createTexture();
+ wtu.fillTexture(gl, tex, 1, 1, [0, 255, 0, 255]);
+
+ if (!program) {
+ testFailed("could not link program");
+ callback();
+ return;
+ }
+
+ var releaseAndAcquireResources = function(callback) {
+ var resources = [buffers[0], buffers[1], tex, program, elementBuf];
+ releaseMultipleResources([ext], resources);
+ acquireMultipleResources([ext, ext2], resources, ext.READ_ONLY, callback);
+ };
+
+ var doRenderTest = function(callback) {
+ debug("Test 2 contexts can render with read only resources.");
+
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+ gl.bindBuffer(gl.ARRAY_BUFFER, buffers[0]);
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+ gl.bindBuffer(gl.ARRAY_BUFFER, buffers[1]);
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+ gl.useProgram(program);
+
+ // Render to canvas1;
+ debug("render with context 1");
+ wtu.checkCanvasRect(gl, 0, 0, width, height, [0, 0, 0, 0]);
+ wtu.drawUnitQuad(gl);
+ wtu.checkCanvasRect(gl, 0, 0, width, height, [0, 255, 0, 255]);
+
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0)");
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementBuf);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0)");
+ wtu.checkCanvasRect(gl, 0, 0, width, height, [0, 255, 0, 255]);
+
+ // Render to canvas2;
+ debug("render with context 2");
+ gl2.useProgram(program);
+
+ gl2.bindBuffer(gl.ARRAY_BUFFER, buffers[0]);
+ gl2.enableVertexAttribArray(positionLocation);
+ gl2.vertexAttribPointer(positionLocation, 2, gl.FLOAT, false, 0, 0);
+ gl2.bindBuffer(gl.ARRAY_BUFFER, buffers[1]);
+ gl2.enableVertexAttribArray(texcoordLocation);
+ gl2.vertexAttribPointer(texcoordLocation, 2, gl.FLOAT, false, 0, 0);
+
+ gl2.bindTexture(gl.TEXTURE_2D, tex);
+
+ wtu.checkCanvas(gl2, [0, 0, 0, 0]);
+ wtu.drawUnitQuad(gl2);
+ wtu.checkCanvas(gl2, [0, 255, 0, 255]);
+
+ shouldGenerateGLError(gl2, gl2.INVALID_OPERATION, "gl2.drawElements(gl2.TRIANGLES, 6, gl2.UNSIGNED_SHORT, 0)");
+ gl2.bindBuffer(gl2.ELEMENT_ARRAY_BUFFER, elementBuf);
+ gl2.clear(gl2.COLOR_BUFFER_BIT);
+ shouldGenerateGLError(gl2, gl2.NO_ERROR, "gl2.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0)");
+ wtu.checkCanvas(gl2, [0, 255, 0, 255]);
+
+ debug("Test you can't render to a framebuffer with a released texture");
+ ext.releaseSharedResource(destTex);
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.clear(gl.COLOR_BUFFER_BIT)");
+
+ debug("Test you can't read from a framebuffer with a released texture");
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4))");
+
+ ext.acquireSharedResource(destTex, ext.READ_ONLY, callback);
+ };
+
+ var checkReadOnlyTextureOnFramebuffer = function(callback) {
+ debug("");
+ debug("test READ_ONLY texture attachment");
+ debug("Test we fail of we haven't bound again");
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4))");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.READ_FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.DRAW_FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE");
+
+ gl.activeTexture(gl.TEXTURE1);
+ gl.bindTexture(gl.TEXTURE_2D, destTex);
+ gl.activeTexture(gl.TEXTURE0);
+ debug("Test we fail to draw because we're read only.");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.DRAW_FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE");
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.clear(gl.COLOR_BUFFER_BIT)");
+
+ debug("Test we can read a READ_ONLY texture.");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.READ_FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4))");
+
+ checkRenderbuffer(callback);
+ };
+
+ var checkRenderbuffer = function(callback) {
+ if (canCheckRenderbuffer) {
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rb);
+ wtu.drawUnitQuad(gl);
+ wtu.checkCanvasRect(gl, 0, 0, width, height, [0, 255, 0, 255]);
+
+ debug("Test you can't render to a framebuffer with a released renderbuffer");
+ ext.releaseSharedResource(rb);
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.clear(gl.COLOR_BUFFER_BIT)");
+
+ debug("Test you can't read from a framebuffer with a released renderbuffer");
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4))");
+ }
+
+ ext.acquireSharedResource(rb, ext.READ_ONLY, callback);
+ };
+
+ var checkReadOnlyRenderbufferOnFramebuffer = function(callback) {
+ if (canCheckRenderbuffer) {
+ debug("");
+ debug("test READ_ONLY renderbuffer attachment");
+ debug("Test we fail of we haven't bound again");
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4))");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.READ_FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.DRAW_FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE");
+
+ gl.bindRenderbuffer(gl.RENDERBUFFER, rb);
+ debug("Test we fail to draw because we're read only.");
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.DRAW_FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE");
+
+ debug("Test we can read a READ_ONLY renderbuffer.");
+ shouldBeTrue("gl.checkFramebufferStatus(gl.READ_FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4))");
+ }
+
+ ext.releaseSharedResource(rb);
+ ext.acquireSharedResource(rb, ext.READ_ONLY, callback);
+ };
+
+ var checkRenderbufferBindsOnAttach = function(callback) {
+ if (canCheckRenderbuffer) {
+ debug("");
+ debug("Test we fail of we haven't bound again");
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4))");
+
+ debug("Test attaching a renderbuffer marks it as bound");
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rb);
+
+ debug("Test we can read a READ_ONLY renderbuffer.");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4))");
+ }
+
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, destTex, 0);
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4))");
+ ext.releaseSharedResource(destTex);
+ ext.acquireSharedResource(destTex, ext.READ_ONLY, callback);
+ };
+
+ var checkTextureBindsOnAttach = function(callback) {
+ debug("");
+ debug("Test we fail of we haven't bound again");
+ shouldGenerateGLError(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4))");
+
+ debug("Test attaching a texture marks it as bound");
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, destTex, 0);
+
+ debug("Test we can read a READ_ONLY texture.");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4))");
+
+ callback();
+ };
+
+ var checkCanNotRenderWithReleasedProgram = function(callback) {
+ debug("");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+
+ ext.releaseSharedResource(program);
+
+ debug("Test we can't draw with a released program.");
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+
+ ext.acquireSharedResource(program, ext.EXCLUSIVE, callback);
+ ext2.releaseSharedResource(program);
+ };
+
+ var checkCanNotRenderWithReleasedBuffer = function(callback) {
+ debug("");
+ gl.useProgram(program);
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+
+ ext.releaseSharedResource(buffers[0]);
+
+ debug("Test we can't draw with a released buffer.");
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+
+ ext.acquireSharedResource(buffers[0], ext.READ_ONLY, callback);
+ };
+
+ var checkCanNotRenderWithReleasedTexture = function(callback) {
+ debug("");
+ gl.bindBuffer(gl.ARRAY_BUFFER, buffers[0]);
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+
+ ext.releaseSharedResource(tex);
+
+ debug("Test we can't draw with a released texture.");
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+
+ ext.acquireSharedResource(tex, ext.READ_ONLY, callback);
+ };
+
+ var checkCanRenderWithReleasedShader = function(callback) {
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ var shaders = gl.getAttachedShaders(program);
+ ext.releaseSharedResource(shaders[0]);
+
+ debug("");
+ debug("Test we can draw with a released shader.");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawArrays(gl.TRIANGLES, 0, 6)");
+ callback();
+ };
+
+ runSequence(
+ [
+ releaseAndAcquireResources,
+ doRenderTest,
+ checkReadOnlyTextureOnFramebuffer,
+ checkReadOnlyRenderbufferOnFramebuffer,
+ checkRenderbufferBindsOnAttach,
+ checkTextureBindsOnAttach,
+ checkCanNotRenderWithReleasedProgram,
+ checkCanNotRenderWithReleasedBuffer,
+ checkCanNotRenderWithReleasedTexture,
+ checkCanRenderWithReleasedShader,
+ callback,
+ ]);
+ };
+
+ var testMisc = function(callback) {
+ debug("");
+ debug("Test you can't release a framebuffer");
+ // TODO: It's not clear what should happen here to me.
+ //shouldThrow("ext.releaseSharedResource(fb)", "TypeError");
+
+ debug("")
+ debug("Test you can compare sharegroups");
+ var gl3 = wtu.create3DContext();
+ ext3 = wtu.getExtensionWithKnownPrefixes(gl3, "WEBGL_shared_resources");
+ // TODO: comment in once this comparison works.
+ //shouldBeTrue("ext.group == ext2.group");
+ shouldBeTrue("ext.group != ext3.group");
+
+ debug("Test you can't use resources from another different group.");
+ tex3 = gl3.createTexture();
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "ext.releaseSharedResource(tex3)");
+ shouldGenerateGLError(gl, gl.INVALID_OPERATION, "ext.acquireSharedResource(tex3, ext.READ_ONLY, makeFailCallback('should not be able to acquire resource from other context'))");
+
+ var failTest = function() {
+ testFailed("cancelled callback was called");
+ };
+
+ var tex = gl.createTexture();
+ debug("test releasing from the wrong context. Should be a no-op");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "ext2.releaseSharedResource(tex)");
+
+ id = ext2.acquireSharedResource(tex, ext.READ_ONLY, failTest);
+ debug("test cancelling a request for which an event has not been posted");
+ ext2.cancelAcquireSharedResource(id);
+
+ debug("test cancelling a request for which an event has already been posted");
+ ext.releaseSharedResource(tex);
+ id = ext.acquireSharedResource(tex, ext.READ_ONLY, failTest);
+ ext.cancelAcquireSharedResource(id);
+
+ debug("test cancelling on the wrong context's extension is ignored");
+ id = ext2.acquireSharedResource(tex, ext.READ_ONLY, callback);
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'ext.cancelAcquireSharedResource(id)');
+ };
+
+ var testLostContext = function(callback) {
+ var WEBGL_lose_context = wtu.getExtensionWithKnownPrefixes(gl, "WEBGL_lose_context");
+ if (!WEBGL_lose_context) {
+ callback();
+ return;
+ }
+
+ var tex = gl.createTexture();
+ var tex2 = gl.createTexture();
+
+ var setupAcquire = function(callback) {
+ var callbacksNeeded = 3;
+ var waitForContextLostAndAcquire = function(e) {
+ if (e && e.preventDefault) {
+ e.preventDefault(); // allow context restore.
+ }
+ --callbacksNeeded;
+ if (callbacksNeeded == 0) {
+ callback();
+ }
+ return false;
+ };
+
+ debug("");
+ debug("Test extension still functions during context lost.");
+ acquireMultipleResources([ext2], [tex, tex2], ext2.READ_ONLY, waitForContextLostAndAcquire);
+ canvas1.addEventListener("webglcontextlost", waitForContextLostAndAcquire, false);
+ canvas2.addEventListener("webglcontextlost", waitForContextLostAndAcquire, false);
+ // Release one before context lost
+ ext.releaseSharedResource(tex);
+ WEBGL_lose_context.loseContext();
+ // Release one after context lost
+ ext.releaseSharedResource(tex2);
+
+ shouldBeTrue('gl.isContextLost()');
+ shouldBeTrue('gl2.isContextLost()');
+ };
+
+ var checkAcquireExt2 = function(callback) {
+ testPassed("was able to acquire resources during context lost");
+ acquireMultipleResources([ext], [tex, tex2], ext.READ_ONLY, callback);
+ };
+
+ var checkAcquireExt = function(callback) {
+ testPassed("was able to request acquire resources during context lost");
+ canvas1.addEventListener("webglcontextrestored", callback, false);
+ WEBGL_lose_context.restoreContext();
+ };
+
+ var passTest = function(callback) {
+ testPassed("extension works during lost context");
+ callback();
+ };
+
+ runSequence(
+ [
+ setupAcquire,
+ checkAcquireExt2,
+ checkAcquireExt,
+ passTest,
+ callback,
+ ]);
+ };
+
+ runSequence(
+ [
+ makeCommonResourceFeatureTest(bufferTests),
+ makeCommonResourceFeatureTest(programTests),
+ makeCommonResourceFeatureTest(shaderTests),
+ makeCommonResourceFeatureTest(renderbufferTests),
+ makeCommonResourceFeatureTest(textureTests),
+ makeSingleContextResourceTest(bufferTests),
+ makeSingleContextResourceTest(programTests),
+ makeSingleContextResourceTest(renderbufferTests),
+ makeSingleContextResourceTest(shaderTests),
+ makeSingleContextResourceTest(textureTests),
+ testRendering,
+ testMisc,
+ testLostContext,
+ finishTest,
+ ]);
+
+}
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/00_test_list.txt
new file mode 100644
index 000000000..a2ee6edb1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/00_test_list.txt
@@ -0,0 +1,11 @@
+bugs/00_test_list.txt
+--min-version 1.0.3 constructors/00_test_list.txt
+functions/00_test_list.txt
+implicit/00_test_list.txt
+--min-version 1.0.2 literals/00_test_list.txt
+--min-version 1.0.2 matrices/00_test_list.txt
+misc/00_test_list.txt
+reserved/00_test_list.txt
+--min-version 1.0.2 samplers/00_test_list.txt
+variables/00_test_list.txt
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/00_test_list.txt
new file mode 100644
index 000000000..5b60206e9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/00_test_list.txt
@@ -0,0 +1,18 @@
+--min-version 1.0.3 angle-d3d11-compiler-error.html
+--min-version 1.0.3 angle-dx-variable-bug.html
+--min-version 1.0.3 array-of-struct-with-int-first-position.html
+--min-version 1.0.3 compare-loop-index-to-uniform.html
+--min-version 1.0.3 complex-glsl-does-not-crash.html
+--min-version 1.0.3 conditional-discard-optimization.html
+--min-version 1.0.3 constant-precision-qualifier.html
+--min-version 1.0.3 floored-division-accuracy.html
+--min-version 1.0.3 fragcoord-linking-bug.html
+--min-version 1.0.3 long-expressions-should-not-crash.html
+--min-version 1.0.3 modulo-arithmetic-accuracy.html
+--min-version 1.0.3 multiplication-assignment.html
+--min-version 1.0.3 nested-functions-should-not-crash.html
+--min-version 1.0.3 sampler-array-using-loop-index.html
+--min-version 1.0.3 temp-expressions-should-not-crash.html
+--min-version 1.0.3 uniforms-should-not-lose-values.html
+--min-version 1.0.3 conditional-discard-in-loop.html
+--min-version 1.0.3 --max-version 1.99 essl3-shaders-with-webgl1.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/README.md b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/README.md
new file mode 100644
index 000000000..d917f6d74
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/README.md
@@ -0,0 +1,18 @@
+BUGS
+====
+
+This folder is for GLSL tests that test driver specific bugs.
+
+Most tests in other folders are fairly generic. While they might
+only fail on specific drivers the tests themselves are designed
+to test something in a generic way.
+
+Tests in this folder on the otherhand are very targeted. They may
+have very specific shaders that only fail under specific circumstances
+on specific drivers.
+
+An example might be if there was a driver that failed only when
+and identifier was named "ABC". It makes no sense to have a generic
+test that says "must allow ABC". A generic test would test some
+subset of all possible identifiers not just one.
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-d3d11-compiler-error.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-d3d11-compiler-error.html
new file mode 100644
index 000000000..211d36c45
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-d3d11-compiler-error.html
@@ -0,0 +1,119 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>ANGLE D3D11 Bug - Shader compilation error</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+
+<script id="vs" type="x-shader/x-fragment">
+precision mediump float;
+uniform float A;
+void main() {
+ bool B = bool(A);
+ float x = B ? -A : 1.+A;
+ float y = B ? 1.+A : -A;
+ gl_Position = vec4(x, y, 0, 0);
+}
+
+</script>
+<script id="fs" type="x-shader/x-fragment">
+precision mediump float;
+void main() {
+ gl_FragColor = vec4(1, 0, 0, 1);
+}
+</script>
+
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+"use strict";
+// See http://crbug.com/371868 for original failing case.
+description("This test checks an ANGLE D3D11 shader compiler error.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking shader compilation and linking.");
+
+ checkCompilation()
+}
+
+function checkCompilation() {
+ var vs = gl.createShader(gl.VERTEX_SHADER);
+ gl.shaderSource(vs, document.getElementById("vs").text);
+ gl.compileShader(vs);
+ if (!gl.getShaderParameter(vs, gl.COMPILE_STATUS)) {
+ testFailed("Vertex Shader failed to compile: " + gl.getShaderInfoLog(vs));
+ return;
+ }
+
+ var fs = gl.createShader(gl.FRAGMENT_SHADER);
+ gl.shaderSource(fs, document.getElementById("fs").text);
+ gl.compileShader(fs);
+ if (!gl.getShaderParameter(fs, gl.COMPILE_STATUS)) {
+ testFailed("Fragment Shader failed to compile: " + gl.getShaderInfoLog(fs));
+ return;
+ }
+
+ var p = gl.createProgram();
+ gl.attachShader(p, vs);
+ gl.attachShader(p, fs);
+ gl.linkProgram(p);
+ if (!gl.getProgramParameter(p, gl.LINK_STATUS)) {
+ testFailed("Program failed to link: " + gl.getProgramInfoLog(p));
+ return;
+ }
+
+ testPassed("Linked Successfully");
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-dx-variable-bug.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-dx-variable-bug.html
new file mode 100644
index 000000000..55f8d214d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-dx-variable-bug.html
@@ -0,0 +1,119 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>ANGLE D3D11 Bug - Variables beginning with "dx_"</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+
+<script id="vs" type="x-shader/x-fragment">
+precision mediump float;
+attribute vec4 position;
+varying float dx_var;
+void main() {
+ gl_Position = position;
+ dx_var = position.x;
+}
+
+</script>
+<script id="fs" type="x-shader/x-fragment">
+precision mediump float;
+varying float dx_var;
+void main() {
+ gl_FragColor = vec4(dx_var, 0, 0, 1);
+}
+</script>
+
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+"use strict";
+// See http://crbug.com/371868 for original failing case.
+description("This test checks an ANGLE D3D11 shader compiler error.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking shader compilation and linking.");
+
+ checkCompilation()
+}
+
+function checkCompilation() {
+ var vs = gl.createShader(gl.VERTEX_SHADER);
+ gl.shaderSource(vs, document.getElementById("vs").text);
+ gl.compileShader(vs);
+ if (!gl.getShaderParameter(vs, gl.COMPILE_STATUS)) {
+ testFailed("Vertex Shader failed to compile: " + gl.getShaderInfoLog(vs));
+ return;
+ }
+
+ var fs = gl.createShader(gl.FRAGMENT_SHADER);
+ gl.shaderSource(fs, document.getElementById("fs").text);
+ gl.compileShader(fs);
+ if (!gl.getShaderParameter(fs, gl.COMPILE_STATUS)) {
+ testFailed("Fragment Shader failed to compile: " + gl.getShaderInfoLog(fs));
+ return;
+ }
+
+ var p = gl.createProgram();
+ gl.attachShader(p, vs);
+ gl.attachShader(p, fs);
+ gl.linkProgram(p);
+ if (!gl.getProgramParameter(p, gl.LINK_STATUS)) {
+ testFailed("Program failed to link: " + gl.getProgramInfoLog(p));
+ return;
+ }
+
+ testPassed("Linked Successfully");
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/array-of-struct-with-int-first-position.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/array-of-struct-with-int-first-position.html
new file mode 100644
index 000000000..e5a0450a5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/array-of-struct-with-int-first-position.html
@@ -0,0 +1,164 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Driver Bug - Array of structs with int or bool in first position</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+
+<body>
+<canvas id="example" style="border: none;" width="788" height="256"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+
+<script id="shader-vs" type="x-shader/x-vertex">
+attribute vec2 pos;
+void main(void) {
+ gl_Position = vec4(pos, 0.0, 1.0);
+}
+</script>
+
+<script id="shader-fs-int" type="x-shader/x-fragment">
+precision mediump float;
+struct Light {
+ int unused;
+ vec3 color;
+};
+const int numLights = 1;
+void main() {
+ Light lights[numLights];
+ lights[0].color = vec3(0.0, 0.5, 0.0);
+
+ vec3 result = vec3(0.0, 0.0, 0.0);
+ for (int i=0; i<numLights; i++) {
+ result += lights[i].color;
+ }
+ gl_FragColor = vec4(result.rgb, 1.0);
+}
+</script>
+
+<script id="shader-fs-bool" type="x-shader/x-fragment">
+precision mediump float;
+struct Light {
+ bool unused;
+ vec3 color;
+};
+const int numLights = 1;
+void main() {
+ Light lights[numLights];
+ lights[0].color = vec3(0.0, 0.5, 0.0);
+
+ vec3 result = vec3(0.0, 0.0, 0.0);
+ for (int i=0; i<numLights; i++) {
+ result += lights[i].color;
+ }
+ gl_FragColor = vec4(result.rgb, 1.0);
+}
+</script>
+
+<script id="shader-fs-bool-read" type="x-shader/x-fragment">
+precision mediump float;
+struct Light {
+ bool useLight;
+ vec3 color;
+};
+const int numLights = 1;
+void main() {
+ Light lights[numLights];
+ lights[0].color = vec3(0.0, 0.5, 0.0);
+ lights[0].useLight = true;
+
+ vec3 result = vec3(0.0, 0.0, 0.0);
+ for (int i=0; i<numLights; i++) {
+ Light light = lights[i];
+ if (light.useLight) {
+ result += light.color;
+ }
+ }
+ gl_FragColor = vec4(result.rgb, 1.0);
+}
+</script>
+
+<script>
+"use strict";
+
+function test() {
+ description();
+ debug(
+ "This test checks accessing an array of structs, where the struct " +
+ "definition has an int or bool in the first position. " +
+ "This test has has failed in OS X on some NVIDIA cards, " +
+ "such as the NVIDIA GeForce GT 650M. If things are working " +
+ "correctly, then there will be a series of 50% green squares.")
+ debug("");
+
+ var wtu = WebGLTestUtils;
+ var canvas = document.getElementById("example");
+ var gl = wtu.create3DContext(canvas);
+
+ var testNum = 0;
+ var border = 10; // border between test squares for visibility
+ var squareSize = 256;
+ var expectedColor = [0, 127, 0, 255]; // 50% green
+
+ function subTest(message, fragmentShader) {
+ debug(message);
+ var startX = (squareSize + border) * testNum;
+ var program = wtu.setupProgram(
+ gl, ["shader-vs", fragmentShader], ["pos"], null, true);
+ gl.viewport(startX, 0, squareSize, squareSize);
+ wtu.drawUnitQuad(gl);
+ wtu.checkCanvasRect(
+ gl, startX, 0, squareSize, squareSize,
+ expectedColor, "square should be 50% green", 1);
+ debug("");
+ testNum++;
+ }
+
+ if (!gl) {
+ testFailed("context does not exist");
+ } else {
+ wtu.setupUnitQuad(gl);
+ subTest("Test unused int in first struct position.", "shader-fs-int");
+ subTest("Test unused bool in first struct position.", "shader-fs-bool");
+ subTest("Test used bool in first struct position.", "shader-fs-bool-read");
+ }
+}
+
+test();
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/compare-loop-index-to-uniform.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/compare-loop-index-to-uniform.html
new file mode 100644
index 000000000..44e01cb4b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/compare-loop-index-to-uniform.html
@@ -0,0 +1,89 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Driver bug - Comparing loop index against uniform in a fragment shader should work</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="256" height="256"> </canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+
+void main() {
+ gl_Position = vec4(aPosition, 1);
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform int uCount;
+
+void main() {
+ float a = 0.0;
+ for (int i = 0; i < 5; ++i) {
+ if (i < uCount) {
+ a += 0.2;
+ }
+ }
+ gl_FragColor = vec4(1.0 - a, a, 0.0, 1.0);
+}
+</script>
+<script type="text/javascript">
+"use strict";
+description("Comparing loop index to an uniform in a fragment shader should work.");
+debug("");
+var wtu = WebGLTestUtils;
+function test() {
+ var gl = wtu.create3DContext("canvas");
+ if (!gl) {
+ testFailed("context does not exist");
+ return;
+ }
+ wtu.setupUnitQuad(gl);
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["aPosition"], undefined, true);
+ var uniformLoc = gl.getUniformLocation(program, 'uCount');
+ gl.uniform1i(uniformLoc, 5);
+ wtu.drawUnitQuad(gl);
+ wtu.checkCanvasRect(gl, 0, 0, 256, 256, [0, 255, 0, 255]);
+};
+
+test();
+var successfullyParsed = true;
+finishTest();
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/complex-glsl-does-not-crash.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/complex-glsl-does-not-crash.html
new file mode 100644
index 000000000..b8758762e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/complex-glsl-does-not-crash.html
@@ -0,0 +1,215 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Driver Bug - complex glsl should not crash</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="example" width="2" height="2"> </canvas>
+<script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 a_position;
+ void main()
+ {
+ gl_Position = a_position;
+ }
+</script>
+<script id="fshader" type="x-shader/x-vertex">
+ precision mediump float;
+ varying vec4 v_varying;
+ void main()
+ {
+ gl_FragColor = v_varying;
+ }
+</script>
+<script id="vshaderArrayTest" type="x-shader/x-vertex">
+ attribute vec4 a_position;
+ varying vec4 v_varying;
+ uniform $(type) u_uniform[$(numTestType)];
+ void main()
+ {
+ v_varying = $(code);
+ gl_Position = a_position;
+ }
+</script>
+<script id="fshaderArrayTest" type="x-shader/x-fragment">
+ precision mediump float;
+ uniform $(type) u_uniform[$(numTestType)];
+ void main()
+ {
+ gl_FragColor = $(code);
+ }
+</script>
+<script id="vshaderUniformTest" type="x-shader/x-fragment">
+ attribute vec4 a_position;
+ varying vec4 v_varying;
+$(uniforms)
+ void main()
+ {
+ v_varying = $(code);
+ gl_Position = a_position;
+ }
+</script>
+<script id="fshaderUniformTest" type="x-shader/x-fragment">
+ precision mediump float;
+$(uniforms)
+ void main()
+ {
+ gl_FragColor = $(code);
+ }
+</script>
+<script>
+"use strict";
+description();
+debug("");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+var uniformTypes = [
+ { type: "bool", componentsPerRow: 1, rows: 1, code: "vec4(u_uniform$(id)$(index), 0, 0, 0)", },
+ { type: "float", componentsPerRow: 1, rows: 1, code: "vec4(u_uniform$(id)$(index), 0, 0, 0)", },
+ { type: "int", componentsPerRow: 1, rows: 1, code: "vec4(u_uniform$(id)$(index), 0, 0, 0)", },
+ { type: "vec2", componentsPerRow: 2, rows: 1, code: "vec4(u_uniform$(id)$(index), 0, 0)", },
+ { type: "ivec2", componentsPerRow: 2, rows: 1, code: "vec4(u_uniform$(id)$(index), 0, 0)", },
+ { type: "bvec2", componentsPerRow: 2, rows: 1, code: "vec4(u_uniform$(id)$(index), 0, 0)", },
+ { type: "vec3", componentsPerRow: 3, rows: 1, code: "vec4(u_uniform$(id)$(index), 0)", },
+ { type: "ivec3", componentsPerRow: 3, rows: 1, code: "vec4(u_uniform$(id)$(index), 0)", },
+ { type: "bvec3", componentsPerRow: 3, rows: 1, code: "vec4(u_uniform$(id)$(index), 0)", },
+ { type: "vec4", componentsPerRow: 4, rows: 1, code: "vec4(u_uniform$(id)$(index))", },
+ { type: "ivec4", componentsPerRow: 4, rows: 1, code: "vec4(u_uniform$(id)$(index))", },
+ { type: "bvec4", componentsPerRow: 4, rows: 1, code: "vec4(u_uniform$(id)$(index))", },
+// Yes, the spec says mat2 takes 4 columns, 2 rows.
+ { type: "mat2", componentsPerRow: 4, rows: 2, code: "vec4(u_uniform$(id)$(index)[0], 0, 0)", },
+ { type: "mat3", componentsPerRow: 3, rows: 3, code: "vec4(u_uniform$(id)$(index)[0], 0)", },
+ { type: "mat4", componentsPerRow: 4, rows: 4, code: "vec4(u_uniform$(id)$(index)[0])", },
+// Samplers generally have more restictive limits.
+// { type: "sampler2D", componentsPerRow: 1, rows: 1, code: "vec4(texture2D(u_uniform[$(index)], vec2(0, 0)))", },
+// { type: "samplerCube", componentsPerRow: 1, rows: 1, code: "vec4(textureCube(u_uniform[$(index)], vec3(0, 0, 0)))", },
+];
+
+var vBaseSource = wtu.getScript("vshader");
+var fBaseSource = wtu.getScript("fshader");
+var vArrayTestSource = wtu.getScript("vshaderArrayTest");
+var fArrayTestSource = wtu.getScript("fshaderArrayTest");
+var vUniformTestSource = wtu.getScript("vshaderUniformTest");
+var fUniformTestSource = wtu.getScript("fshaderUniformTest");
+
+var tests = [];
+var shaderTypes = [
+ { type: "vertex",
+ // For tests that expect failure which shader might fail.
+ vertExpectation: false,
+ fragExpectation: true,
+ vertArrayTest: vArrayTestSource,
+ fragArrayTest: fBaseSource,
+ vertUniformTest: vUniformTestSource,
+ fragUniformTest: fBaseSource,
+ maxVectors: gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS),
+ minVectors: 128, // GLSL ES 1.0.17 Appendix A.7,
+ },
+ { type: "fragment",
+ // For tests that expect failure which shader might fail.
+ vertExpectation: true,
+ fragExpectation: false,
+ vertArrayTest: vBaseSource,
+ fragArrayTest: fArrayTestSource,
+ vertUniformTest: vBaseSource,
+ fragUniformTest: fUniformTestSource,
+ maxVectors: gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS),
+ minVectors: 16, // GLSL ES 1.0.17 Appendix A.7,
+ },
+];
+for (var ss = 0; ss < shaderTypes.length; ++ss) {
+ var shaderType = shaderTypes[ss];
+ debug("max " + shaderType.type + ": " + shaderType.maxVectors);
+ for (var ii = 0; ii < uniformTypes.length; ++ii) {
+ var info = uniformTypes[ii];
+ wtu.log("checking: " + info.type);
+ // Compute the maximum amount of this type allowed in a single array.
+ var numVars = Math.floor(shaderType.maxVectors / info.rows);
+ // Compute the minimum required to work in a single array.
+ var minVars = Math.floor(shaderType.minVectors / info.rows);
+ // Compute the maximum allowed as single elements
+ var numPerRow = Math.floor(4 / info.componentsPerRow);
+ var numMax = Math.floor(shaderType.maxVectors * numPerRow / info.rows);
+
+ // Test array[max] of the type
+ // Note: We can't test for success or failer as actual GL drivers are only required to be able to
+ // do the minimum number. After that it can fail for any reason.
+ var code = wtu.replaceParams(info.code, {id: "", index: "[" + (numVars - 1) + "]"});
+ tests.push({
+ vShaderSource: wtu.replaceParams(shaderType.vertArrayTest, {numTestType: numVars, code: code}, info),
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(shaderType.fragArrayTest, {numTestType: numVars, code: code}, info),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ ignoreResults: true,
+ passMsg: shaderType.type + " shader with uniform array of " + info.type + " with " + numVars + " elements (the maximum)",
+ });
+
+ var generateCode = function(numVars) {
+ var uniforms = [];
+ var codes = [];
+ for (var uu = 0; uu < numVars; ++uu) {
+ uniforms.push(" uniform " + info.type + " u_uniform" + uu + ";");
+ codes.push(wtu.replaceParams(info.code, {id: uu, index: ""}));
+ }
+ return {
+ uniforms: uniforms.join("\n"),
+ code: codes.join(" + \n "),
+ };
+ };
+
+ // Test max uniforms of type.
+ tests.push({
+ vShaderSource: wtu.replaceParams(shaderType.vertUniformTest, generateCode(numMax), info),
+ vShaderSuccess: shaderType.vertExpectation,
+ fShaderSource: wtu.replaceParams(shaderType.fragUniformTest, generateCode(numMax), info),
+ fShaderSuccess: shaderType.fragExpectation,
+ linkSuccess: true,
+ ignoreResults: true,
+ passMsg: shaderType.type + " shader with " + (numMax) + " uniforms of " + info.type,
+ });
+ }
+}
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-in-loop.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-in-loop.html
new file mode 100644
index 000000000..d15123704
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-in-loop.html
@@ -0,0 +1,163 @@
+<!--
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Conditional discard in loop issue</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+
+<body>
+<canvas id="output" style="border: none;" width="256" height="256"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+
+<script id="shader-vs" type="x-shader/x-vertex">
+// Inputs
+attribute vec4 a_position;
+attribute vec2 a_tex_coords;
+
+// Output
+varying vec2 v_tex_coords;
+
+void main(void) {
+ v_tex_coords = a_tex_coords;
+ gl_Position = a_position;
+}
+</script>
+
+<script id="shader-fs" type="x-shader/x-fragment">
+precision mediump float;
+
+// Constants
+const float TEXEL_COUNT_V = 256.0;
+const float TEXEL_HEIGHT = 1.0 / TEXEL_COUNT_V;
+const float SEP_IX = TEXEL_COUNT_V / 2.0;
+
+const vec4 GREEN = vec4(0.0, 1.0, 0.0, 1.0);
+const vec4 BLUE = vec4(0.0, 0.0, 1.0, 1.0);
+
+// Input
+varying vec2 v_tex_coords;
+
+uniform sampler2D u_data;
+
+// Without this function or directly returning the data, the issue does not occur
+mediump vec4 UnpackData(in vec4 inData) {
+ float s = inData.x;
+ // Note s is always 0
+ // mod(0, 1) = 0
+ // So return value = (0, 0, -1, 0)
+ return vec4(0.0, 0.0, mod(s, 1.0) - 1.0, 0.0);
+
+ // Comment out the line above and uncomment the line below and the test succeeds on angle-dx11
+ // return vec4(0.0, 0.0, -1.0, 0.0);
+}
+
+void main(void) {
+ // Set initial color
+ gl_FragColor = BLUE;
+
+ if (gl_FragCoord.y <= SEP_IX) {
+ mediump vec2 addr = vec2(v_tex_coords.x, TEXEL_HEIGHT);
+
+ for (float e_ix = 0.0; e_ix < TEXEL_COUNT_V; ++e_ix) {
+ vec4 entry = texture2D(u_data, addr);
+ mediump vec4 unpack = UnpackData(entry);
+
+ // Buffer is filled with 0, unpack is always (0, 0, -1, 0)
+ // So discard is always triggered
+ if (unpack.z == -1.0) {
+ discard;
+ }
+
+ addr.y += unpack.z * TEXEL_HEIGHT;
+ }
+ // If discard is not triggered the output color is blue
+ }
+ else {
+ gl_FragColor = GREEN;
+ }
+}
+</script>
+
+
+<script>
+"use strict";
+
+description();
+debug("");
+debug("If the code is executed correctly, the upper half of the viewport will be green, the lower half will be red.");
+debug("This is a conformance suite test for the issue reported here : https://code.google.com/p/angleproject/issues/detail?id=706");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("output");
+var gl = wtu.create3DContext(canvas);
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+
+ // Create texture filled with zero's
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ wtu.fillTexture(gl, tex, 256, 256, [0, 0, 0, 0]);
+
+ // Clear complete viewport to red
+ gl.clearColor(1.0, 0.0, 0.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ var attribBuffers = wtu.setupUnitQuad(gl, 0, 1);
+ var program = wtu.setupProgram(gl, ["shader-vs", "shader-fs"], ["a_position", "a_tex_coords"], [0, 1]);
+
+ // Bind texture
+ var uniformMap = wtu.getUniformMap(gl, program);
+ gl.activeTexture(gl.TEXTURE0);
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.uniform1i(uniformMap.u_data.location, 0);
+
+ // Draw
+ wtu.drawUnitQuad(gl);
+
+ // Verify output
+ wtu.checkCanvasRect(gl, 0, 0, 256, 128, [ 255, 0, 0, 255 ], "should be red", 1);
+ wtu.checkCanvasRect(gl, 0, 128, 256, 128, [ 0, 255, 0, 255 ], "should be green", 1);
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-optimization.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-optimization.html
new file mode 100644
index 000000000..20d7fc659
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-optimization.html
@@ -0,0 +1,111 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!-- author: Bill Baxter (wbaxter at google.com) -->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>ANGLE WebGL Shader Conditionals Repro</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+
+<body>
+<canvas id="repro" style="border: none;" width="256" height="256"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+
+<script id="shader-vs" type="x-shader/x-vertex">
+attribute vec2 pos;
+varying mediump float varA;
+void main(void) {
+ varA = 0.;
+ gl_Position = vec4(pos, 0.0, 1.0);
+}
+</script>
+
+<script id="shader-fs" type="x-shader/x-fragment">
+precision mediump float;
+varying float varA;
+void main(void) {
+ if (varA < -1. || (varA < -1. && varA > 1.)) {
+ discard;
+ }
+ gl_FragColor = vec4(0, 1, 0, 1) + 2. * varA * 2.;
+}
+</script>
+
+<script id="shader-fs-mutable" type="x-shader/x-fragment">
+precision mediump float;
+varying float varA;
+void main(void) {
+ float b = varA;
+ if (varA < (b -= 1.) || (varA < b && varA > (b += 2.))) {
+ discard;
+ }
+ gl_FragColor = vec4(0, 1, 0, 1) + 2. * varA * 2.;
+}
+</script>
+
+<script>
+"use strict";
+
+description();
+debug("");
+debug("If things are working correctly, then there will be a green square.");
+debug("Otherwise it will be a black void.");
+debug("This is a repro for an issue seen on the D3D9 ANGLE implementation of WebGL on Chrome in a shader with a conditional discard, where the conditional is of the form (a || (b && c)).");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("repro");
+var gl = wtu.create3DContext(canvas);
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ gl.clearColor(0.0, 0.0, 0.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ wtu.setupUnitQuad(gl);
+ var program = wtu.setupProgram(gl, ["shader-vs", "shader-fs"], ["pos"], undefined, true);
+ wtu.drawUnitQuad(gl);
+ wtu.checkCanvasRect(gl, 128, 128, 128, 128, [ 0, 255, 0, 255 ], "should be green", 1);
+
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ var programMutable = wtu.setupProgram(gl, ["shader-vs", "shader-fs-mutable"], ["pos"]);
+ wtu.drawUnitQuad(gl);
+ wtu.checkCanvasRect(gl, 128, 128, 128, 128, [ 0, 255, 0, 255 ], "should be green", 1);
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/constant-precision-qualifier.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/constant-precision-qualifier.html
new file mode 100644
index 000000000..da292e6fe
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/constant-precision-qualifier.html
@@ -0,0 +1,101 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Bug - the precision qualifier of a constant variable should affect the precision of a consuming operation</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="256" height="256"> </canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+
+void main() {
+ gl_Position = vec4(aPosition, 1);
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+// It is assumed that uTest is set to 0. It's here to make the expression not constant.
+uniform mediump float uTest;
+
+void main() {
+ // exact representation of 4096.5 requires 13 bits of relative precision.
+ const highp float c = 4096.5;
+ mediump float a = 0.0;
+ // Below, addition should be evaluated at highp, since one of the operands has the highp qualifier.
+ // Thus fract should also be evaluated at highp.
+ // See OpenGL ES Shading Language spec section 4.5.2.
+ // This should make the result 0.5, since highp provides at least 16 bits of relative precision.
+ // (exceptions for operation precision are allowed for a small number of computationally
+ // intensive built-in functions, but it is reasonable to think that fract is not one of those).
+ // However, if fract() is incorrectly evaluated at minimum precision fulfilling mediump criteria,
+ // or at IEEE half float precision, the result is 0.0.
+ a = fract(c + uTest);
+
+ // Multiply by 2.0 to make the color green.
+ gl_FragColor = vec4(0.0, 2.0 * a, 0.0, 1.0);
+}
+</script>
+<script type="text/javascript">
+"use strict";
+description();
+var wtu = WebGLTestUtils;
+
+function test() {
+ var gl = wtu.create3DContext("canvas");
+ if (!gl) {
+ testFailed("context does not exist");
+ return;
+ }
+ if (gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).precision == 0) {
+ testPassed("highp precision not supported");
+ } else {
+ wtu.setupUnitQuad(gl);
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["aPosition"], undefined, true);
+ var uniformLoc = gl.getUniformLocation(program, 'uTest');
+ gl.uniform1f(uniformLoc, 0);
+ wtu.drawUnitQuad(gl);
+ wtu.checkCanvasRect(gl, 0, 0, 256, 256, [0, 255, 0, 255]);
+ }
+};
+
+test();
+var successfullyParsed = true;
+finishTest();
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/essl3-shaders-with-webgl1.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/essl3-shaders-with-webgl1.html
new file mode 100644
index 000000000..c899ad87f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/essl3-shaders-with-webgl1.html
@@ -0,0 +1,136 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Browser bug - WebGL 1 context should not accept OpenGL ES 3 shading language shaders</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<!-- Note that the version directive should be on the very first line in ESSL 3, see ESSL 3 section 3.3 -->
+<script id="ES3VertexShader" type="x-shader/x-vertex">#version 300 es
+precision mediump float;
+in vec4 aPosition;
+
+void main() {
+ gl_Position = aPosition;
+}
+</script>
+<script id="ES3FragmentShader" type="x-shader/x-fragment">#version 300 es
+precision mediump float;
+out vec4 my_FragColor;
+
+void main() {
+ my_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+<script id="emptyES3FragmentShader" type="x-shader/x-fragment">#version 300 es
+precision mediump float;
+void main() {
+}
+</script>
+<script id="vertexShaderWithInQualifier" type="x-shader/x-vertex">
+precision mediump float;
+in vec4 aPosition;
+
+void main() {
+ gl_Position = aPosition;
+}
+</script>
+<script id="fragmentShaderWithOutQualifier" type="x-shader/x-fragment">
+precision mediump float;
+out vec4 my_FragColor;
+
+void main() {
+ my_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+<script type="text/javascript">
+"use strict";
+description("OpenGL ES 3 shading language shaders should not be accepted by WebGL 1.");
+GLSLConformanceTester.runTests([
+ {
+ vShaderId: "ES3VertexShader",
+ vShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "OpenGL ES 3 shading language vertex shader with an in variable should not be accepted by WebGL 1."
+ },
+ {
+ fShaderId: "ES3FragmentShader",
+ fShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "OpenGL ES 3 shading language fragment shader with an out variable should not be accepted by WebGL 1."
+ },
+ {
+ fShaderId: "emptyES3FragmentShader",
+ fShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "OpenGL ES 3 shading language fragment shader with an empty body should not be accepted by WebGL 1."
+ },
+ {
+ vShaderId: "ES3VertexShader",
+ vShaderSuccess: false,
+ fShaderId: "ES3FragmentShader",
+ fShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "OpenGL ES 3 shading language shaders should not be linked by WebGL 1."
+ },
+ {
+ vShaderId: "ES3VertexShader",
+ vShaderSuccess: false,
+ fShaderId: "emptyES3FragmentShader",
+ fShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "OpenGL ES 3 shading language shaders including fragment shader with empty body should not be linked by WebGL 1."
+ },
+ {
+ vShaderId: "vertexShaderWithInQualifier",
+ vShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "Vertex shader with an in qualifier on a global variable should not be accepted by WebGL 1."
+ },
+ {
+ fShaderId: "fragmentShaderWithOutQualifier",
+ fShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "Fragment shader with an out qualifier on a global variable should not be accepted by WebGL 1."
+ }
+]);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/floored-division-accuracy.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/floored-division-accuracy.html
new file mode 100644
index 000000000..f8de50baa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/floored-division-accuracy.html
@@ -0,0 +1,97 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!-- author: Bill Baxter (wbaxter at google.com) -->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Floored Division Accuracy Bug</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+
+<body>
+<canvas id="repro" style="border: none;" width="256" height="256"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+
+<script id="shader-vs" type="x-shader/x-vertex">
+attribute vec2 pos;
+uniform float divisor;
+varying vec4 vColor;
+void main(void) {
+ gl_Position = vec4(pos, 0.0, 1.0);
+ float index = 9.0;
+ // Floating point operations don't have any guaranteed precision, but they
+ // should at least be accurate to 1 part in 10^5.
+ float value = floor((index / divisor) * 1.00001);
+ vColor = (value == 3.) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
+}
+</script>
+
+<script id="shader-fs" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 vColor;
+void main(void) {
+ gl_FragColor = vColor;
+}
+</script>
+<script>
+"use strict";
+
+description();
+debug("");
+// Reproduces bug seen on Mac OS X with AMD Radeon HD 6490 GPU
+debug("If things are working correctly, then the square will be green.");
+debug("If your card thinks floor(9. / 3.) is not 3 to within 1 part in 10^5, ");
+debug("then the square will be red.");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("repro");
+var gl = wtu.create3DContext(canvas);
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ gl.clearColor(0.0, 0.0, 0.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ wtu.setupUnitQuad(gl);
+ var program = wtu.setupProgram(gl, ["shader-vs", "shader-fs"], ["pos"], undefined, true);
+ gl.uniform1f(gl.getUniformLocation(program, "divisor"), 3);
+ wtu.drawUnitQuad(gl);
+ wtu.checkCanvasRect(gl, 128, 128, 128, 128, [ 0, 255, 0, 255 ], "should be green", 1);
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/fragcoord-linking-bug.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/fragcoord-linking-bug.html
new file mode 100644
index 000000000..e9fd73ecf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/fragcoord-linking-bug.html
@@ -0,0 +1,116 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>GLSL compiler bug referencing gl_FragCoord</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<!-- These shaders were extracted from Skia's GPU accelerated backend "Ganesh". -->
+<script id="shader-vs" type="x-shader/x-vertex">
+uniform mat3 uViewM;
+uniform mat3 uStageMatrix_Stage1;
+uniform vec4 urtAdjustment;
+attribute vec2 aPosition;
+attribute vec4 aColor;
+varying vec4 vColor;
+varying vec2 vMatrixCoord_Stage1;
+void main() {
+ vec3 pos3 = uViewM * vec3(aPosition, 1);
+ vColor = aColor;
+ { // Stage 0: XferEffect
+ }
+ vMatrixCoord_Stage1 = (uStageMatrix_Stage1 * vec3(aPosition, 1)).xy;
+ { // Stage 1: Texture
+ }
+ gl_Position = vec4(dot(pos3.xz, urtAdjustment.xy), dot(pos3.yz, urtAdjustment.zw), 0, pos3.z);
+}
+</script>
+
+<script id="shader-fs" type="x-shader/x-fragment">
+precision mediump float;
+uniform sampler2D uDstCopySampler;
+uniform vec2 uDstCopyUpperLeft;
+uniform vec2 uDstCopyCoordScale;
+uniform float uRTHeight;
+uniform sampler2D uSampler0_Stage1;
+varying vec4 vColor;
+varying vec2 vMatrixCoord_Stage1;
+void main() {
+ vec4 fragCoordYDown = vec4(gl_FragCoord.x, uRTHeight - gl_FragCoord.y, gl_FragCoord.zw);
+ // Read color from copy of the destination.
+ vec2 _dstTexCoord = (fragCoordYDown.xy - uDstCopyUpperLeft) * uDstCopyCoordScale;
+ _dstTexCoord.y = 1.0 - _dstTexCoord.y;
+ vec4 _dstColor = texture2D(uDstCopySampler, _dstTexCoord);
+
+ vec4 output_Stage0;
+ { // Stage 0: XferEffect
+ // SkXfermode::Mode: Multiply
+ output_Stage0.a = vColor.a + (1.0 - vColor.a) * _dstColor.a;
+ output_Stage0.rgb = (1.0 - vColor.a) * _dstColor.rgb + (1.0 - _dstColor.a) * vColor.rgb + vColor.rgb * _dstColor.rgb;
+ }
+ vec4 output_Stage1;
+ { // Stage 1: Texture
+ output_Stage1 = texture2D(uSampler0_Stage1, vMatrixCoord_Stage1);
+ }
+ gl_FragColor = ((output_Stage0 * output_Stage1) + ((vec4(1) - output_Stage1) * _dstColor));
+}
+</script>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+description();
+debug("");
+debug('Verify shaders using gl_FragCoord z and w components compile and link correctly');
+debug('Regression test for Qualcomm bug ID CR649654');
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ var program = wtu.setupProgram(gl, ["shader-vs", "shader-fs"], null, null, true);
+ if (program) {
+ testPassed("Program compiled and linked successfully");
+ } else {
+ testFailed("Program failed to compile and link");
+ }
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/long-expressions-should-not-crash.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/long-expressions-should-not-crash.html
new file mode 100644
index 000000000..c969f363e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/long-expressions-should-not-crash.html
@@ -0,0 +1,159 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Driver Bug - long experssions should not crash</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<canvas id="example" width="40" height="40"> </canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+void main(){
+ gl_Position = vec4(0, 0, 0, 1);
+}
+</script>
+<script id="vshaderUniformTest" type="x-shader/x-vertex">
+uniform vec4 u_uniform;
+void main(){
+ gl_Position =
+ $(code)
+ vec4(0, 0, 0, 1);
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+void main()
+{
+ gl_FragColor = vec4(0, 0, 0, 0);
+}
+</script>
+<script id="fshaderUniformTest" type="x-shader/x-fragment">
+precision mediump float;
+uniform vec4 u_uniform;
+void main()
+{
+ gl_FragColor =
+ $(code)
+ vec4(0, 0, 0, 0);
+}
+</script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+
+var vUniformTestSource = wtu.getScript("vshaderUniformTest");
+var fUniformTestSource = wtu.getScript("fshaderUniformTest");
+
+var tests = [
+];
+var counts = [
+ { count:10,
+ mustPass: true,
+ },
+ { count:100,
+ mustPass: true,
+ },
+ { count: 1000,
+ mustPass: false,
+ },
+ { count: 10000,
+ mustPass: false,
+ },
+];
+var operatorSets = [
+ ["+", "-", "/", "*"],
+ ["+"],
+ ["-"],
+];
+counts.forEach(function(info) {
+ operatorSets.forEach(function(operators) {
+ var generateCode = function(numVars) {
+ var codes = [];
+ for (var uu = 0; uu < numVars; ++uu) {
+ codes.push("u_uniform " + operators[uu % operators.length]);
+ }
+ return {
+ code: codes.join("\n "),
+ };
+ };
+
+ var subs = generateCode(info.count);
+ tests.push({
+ vShaderId: "vshader",
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(fUniformTestSource, subs),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ ignoreResults: !info.mustPass,
+ passMsg: "shader with " + info.count + " [" + operators + "] operators in expression in multiple lines",
+ });
+ tests.push({
+ vShaderSource: wtu.replaceParams(vUniformTestSource, subs),
+ vShaderSuccess: true,
+ fShaderId: "fshader",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ ignoreResults: !info.mustPass,
+ passMsg: "shader with " + info.count + " [" + operators + "] operators in expression in multiple lines",
+ });
+ subs.code = subs.code.replace(/\n /g, "")
+ tests.push({
+ vShaderId: "vshader",
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(fUniformTestSource, subs),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ ignoreResults: !info.mustPass,
+ passMsg: "shader with " + info.count + " [" + operators + "] operators in expression in one line",
+ });
+ tests.push({
+ vShaderSource: wtu.replaceParams(vUniformTestSource, subs),
+ vShaderSuccess: true,
+ fShaderId: "fshader",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ ignoreResults: !info.mustPass,
+ passMsg: "shader with " + info.count + " [" + operators + "] operators in expression in one line",
+ });
+ });
+});
+GLSLConformanceTester.runTests(tests);
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/modulo-arithmetic-accuracy.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/modulo-arithmetic-accuracy.html
new file mode 100644
index 000000000..665e59a3c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/modulo-arithmetic-accuracy.html
@@ -0,0 +1,97 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!-- author: Bill Baxter (wbaxter at google.com) -->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Modulo Arithmetic Accuracy Bug</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+
+<body>
+<canvas id="repro" style="border: none;" width="256" height="256"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+
+<script id="shader-vs" type="x-shader/x-vertex">
+attribute vec2 pos;
+uniform float divisor;
+varying vec4 vColor;
+void main(void) {
+ gl_Position = vec4(pos, 0.0, 1.0);
+ float index = 9.0;
+ // mod(x, y) is computed as x-y*floor(x/y). There are no guarantees on
+ // the precision of floating point operations in WebGL shaders, but division
+ // should be accurate to at least 1 part in 10^5.
+ float value = mod(index * 1.00001, divisor);
+ vColor = (value < 1.) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
+}
+</script>
+
+<script id="shader-fs" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 vColor;
+void main(void) {
+ gl_FragColor = vColor;
+}
+</script>
+<script>
+"use strict";
+
+description();
+debug("");
+// Reproduces bug seen on Mac OS X with AMD Radeon HD 6490 GPU
+debug("If things are working correctly, then the square will be green.");
+debug("If your card thinks mod(9,3) is not 0, then the square will be red.");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("repro");
+var gl = wtu.create3DContext(canvas);
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ gl.clearColor(0.0, 0.0, 0.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ wtu.setupUnitQuad(gl);
+ var program = wtu.setupProgram(gl, ["shader-vs", "shader-fs"], ["pos"], undefined, true);
+ gl.uniform1f(gl.getUniformLocation(program, "divisor"), 3);
+ wtu.drawUnitQuad(gl);
+ wtu.checkCanvasRect(gl, 128, 128, 128, 128, [ 0, 255, 0, 255 ], "should be green", 1);
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/multiplication-assignment.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/multiplication-assignment.html
new file mode 100644
index 000000000..d4135d3e2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/multiplication-assignment.html
@@ -0,0 +1,82 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Multiplication assignment operator compilation bug</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<script id="shader-vs" type="x-shader/x-vertex">
+void main(){
+ gl_Position = vec4(0);
+}
+</script>
+<script id="shader-fs" type="x-shader/x-fragment">
+precision mediump float;
+uniform mat3 rot;
+float foo(vec3 bar) {
+ bar *= rot;
+ return 0.0;
+}
+
+void main(void){
+ gl_FragColor = vec4(foo(vec3(0)));
+}
+</script>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+description();
+debug("");
+debug('Verify multiplication assignment operator compiles correctly - regression test for <a href="https://code.google.com/p/chromium/issues/detail?id=384847">Chromium bug 384847</a>');
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ var program = wtu.setupProgram(gl, ["shader-vs", "shader-fs"], null, null, true);
+ if (program) {
+ testPassed("Program compiled and linked successfully");
+ } else {
+ testFailed("Program failed to compile and link");
+ }
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/nested-functions-should-not-crash.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/nested-functions-should-not-crash.html
new file mode 100644
index 000000000..2ac24590f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/nested-functions-should-not-crash.html
@@ -0,0 +1,112 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Driver Bug - nested functions should not crash</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<canvas id="example" width="40" height="40"> </canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+void main(){
+ gl_Position = vec4(0, 0, 0, 1);
+}
+</script>
+<script id="fshaderUniformTest" type="x-shader/x-fragment">
+precision mediump float;
+uniform vec4 u_uniform;
+
+$(code)
+
+void main()
+{
+ gl_FragColor = function0();
+}
+</script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+
+var fUniformTestSource = wtu.getScript("fshaderUniformTest");
+
+var tests = [
+];
+var counts = [
+ { count:10,
+ mustPass: true,
+ },
+ { count:100,
+ mustPass: false,
+ },
+ { count: 1000,
+ mustPass: false,
+ },
+ { count: 10000,
+ mustPass: false,
+ },
+];
+var operators = ["+", "-", "/", "*"];
+counts.forEach(function(info) {
+ var generateCode = function(numVars) {
+ var codes = [];
+ codes.push("vec4 function" + numVars + "() { return u_uniform; }");
+ for (var uu = 0; uu < numVars; ++uu) {
+ var id = numVars - uu - 1;
+ codes.push("vec4 function" + id + "() { return function" + (id + 1) + "(); }");
+ }
+ return {
+ code: codes.join("\n\n"),
+ };
+ };
+
+ var subs = generateCode(info.count);
+ tests.push({
+ vShaderId: "vshader",
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(fUniformTestSource, subs),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ ignoreResults: !info.mustPass,
+ passMsg: "shader with " + info.count + " nested functions",
+ });
+});
+GLSLConformanceTester.runTests(tests);
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index.html
new file mode 100644
index 000000000..a3f5b9706
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index.html
@@ -0,0 +1,104 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Sampler arrays using loop index should compile fine.</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform sampler2D uni[2];
+
+float zero(int x)
+{
+ return float(x) - float(x);
+}
+
+void main()
+{
+ vec4 c = vec4(0,0,0,0);
+ for (int ii = 1; ii < 3; ++ii) {
+ if (c.x > 255.0) {
+ c.x = 255.0 + zero(ii);
+ break;
+ }
+ c += texture2D(uni[ii - 1], vec2(0.5, 0.5));
+ }
+ gl_FragColor = c;
+}
+</script>
+<script>
+"use strict";
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+//------------------------------------------------------------------------------
+var program = wtu.setupProgram(
+ gl, ['vshader', 'fshader'], ['vPosition'], undefined, true);
+
+for (var ii = 0; ii < 2; ++ii) {
+ var loc = gl.getUniformLocation(program, "uni[" + ii + "]");
+ gl.activeTexture(gl.TEXTURE0 + ii);
+ var tex = gl.createTexture();
+ wtu.fillTexture(gl, tex, 1, 1, [32, 16, 8, ii * 9], 0);
+ gl.uniform1i(loc, ii);
+}
+
+wtu.clearAndDrawUnitQuad(gl);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.checkCanvas(gl, [64, 32, 16, 9],
+ "Should render correctly", 1);
+
+var successfullyParsed = true;
+
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/temp-expressions-should-not-crash.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/temp-expressions-should-not-crash.html
new file mode 100644
index 000000000..0f78f01c7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/temp-expressions-should-not-crash.html
@@ -0,0 +1,123 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Driver Bug - temp experssions should not crash</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<canvas id="example" width="40" height="40"> </canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+void main(){
+ gl_Position = vec4(0, 0, 0, 1);
+}
+</script>
+<script id="fshaderUniformTest" type="x-shader/x-fragment">
+precision mediump float;
+uniform vec4 u_uniform;
+void main()
+{
+ vec4 temp = vec4(0, 0, 0, 0);
+$(code)
+ gl_FragColor = temp;
+}
+</script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+
+var fUniformTestSource = wtu.getScript("fshaderUniformTest");
+
+var tests = [
+];
+var counts = [
+ { count:100,
+ mustPass: true,
+ },
+ { count: 1000,
+ mustPass: false,
+ },
+ { count: 10000,
+ mustPass: false,
+ },
+];
+var operators = ["+", "-", "/", "*"];
+counts.forEach(function(info) {
+ var generateCode = function(numVars) {
+ var codes = [];
+ var count = 0;
+ var step = 10;
+ for (var uu = 0; uu < numVars; uu += step) {
+ var subCodes = [""];
+ for (var vv = 0; vv < step; ++vv) {
+ subCodes.push(operators[(count++) % operators.length]);
+ }
+ subCodes.push("");
+ codes.push(" temp += " + subCodes.join("\n u_uniform ") + ";");
+ }
+ return {
+ code: codes.join("\n"),
+ };
+ };
+
+ var subs = generateCode(info.count);
+ tests.push({
+ vShaderId: "vshader",
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(fUniformTestSource, subs),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ ignoreResults: !info.mustPass,
+ passMsg: "shader with uniform with " + info.count + " operators in temp expressions in multiple lines",
+ });
+ subs.code = subs.code.replace(/\n +/g, " ")
+ tests.push({
+ vShaderId: "vshader",
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(fUniformTestSource, subs),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ ignoreResults: !info.mustPass,
+ passMsg: "shader with uniform with " + info.count + " operators in temp expressions in one line",
+ });
+});
+GLSLConformanceTester.runTests(tests);
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/uniforms-should-not-lose-values.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/uniforms-should-not-lose-values.html
new file mode 100644
index 000000000..6ddf9306c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/bugs/uniforms-should-not-lose-values.html
@@ -0,0 +1,104 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Driver Bug - Uniforms should no lose values</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="512" height="256"> </canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+uniform float k,u;
+uniform mat4 l;
+attribute vec3 a;
+void main(){
+ gl_Position=l*vec4(a,1.+u+k);
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform float w,x,y,z;
+void main() {
+ gl_FragColor=vec4(1.-y,y,w+x+z,1);
+}
+</script>
+<script>
+"use strict";
+// Certain drivers fail this test. Specifically Mac NVidia GT 330 on OSX 10.8.2
+description();
+debug("");
+var wtu = WebGLTestUtils;
+function test() {
+ var gl = wtu.create3DContext("canvas");
+ if (!gl) {
+ testFailed("context does not exist");
+ return;
+ }
+
+ wtu.setupUnitQuad(gl);
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["a"], undefined, true);
+
+ var setUniformf = function(name, val) {
+ var loc = gl.getUniformLocation(program, name);
+ var func = 'uniform' + val.length + 'fv';
+ gl[func](loc, val);
+ };
+
+ var setUniformMat = function(name, val) {
+ var loc = gl.getUniformLocation(program, name);
+ var func = 'uniformMatrix' + Math.sqrt(val.length) + 'fv';
+ gl[func](loc, false, val);
+ };
+
+ setUniformMat('l', [1, 0 ,0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
+ gl.viewport(0, 0, 256, 256);
+ setUniformf('y', [0]);
+ wtu.drawUnitQuad(gl);
+ gl.viewport(256, 0, 256, 256);
+ setUniformf('y', [1]);
+ wtu.drawUnitQuad(gl);
+ wtu.checkCanvasRect(gl, 0, 0, 256, 256, [255, 0, 0, 255]);
+ wtu.checkCanvasRect(gl, 256, 0, 256, 256, [0, 255, 0, 255]);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+}
+test();
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/00_test_list.txt
new file mode 100644
index 000000000..6758bea8e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/00_test_list.txt
@@ -0,0 +1,14 @@
+glsl-construct-vec2.html
+glsl-construct-vec3.html
+glsl-construct-vec4.html
+glsl-construct-ivec2.html
+glsl-construct-ivec3.html
+glsl-construct-ivec4.html
+glsl-construct-bvec2.html
+glsl-construct-bvec3.html
+glsl-construct-bvec4.html
+glsl-construct-mat2.html
+glsl-construct-mat3.html
+glsl-construct-mat4.html
+--min-version 1.0.3 glsl-construct-vec-mat-corner-cases.html
+--min-version 1.0.3 glsl-construct-vec-mat-index.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec2.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec2.html
new file mode 100644
index 000000000..67059791e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec2.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<script src="../../resources/glsl-constructor-tests-generator.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var targetType = "bvec2";
+description("Test " + targetType + " constructor expressions.");
+
+var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
+
+// Generate tests
+var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
+
+// Run the tests
+GLSLConformanceTester.runTests(testCases);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec3.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec3.html
new file mode 100644
index 000000000..4c5f381c6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec3.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<script src="../../resources/glsl-constructor-tests-generator.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var targetType = "bvec3";
+description("Test " + targetType + " constructor expressions.");
+
+var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
+
+// Generate tests
+var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
+
+// Run the tests
+GLSLConformanceTester.runTests(testCases);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec4.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec4.html
new file mode 100644
index 000000000..615f8d8c0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec4.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<script src="../../resources/glsl-constructor-tests-generator.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var targetType = "bvec4";
+description("Test " + targetType + " constructor expressions.");
+
+var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
+
+// Generate tests
+var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
+
+// Run the tests
+GLSLConformanceTester.runTests(testCases);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec2.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec2.html
new file mode 100644
index 000000000..0bab45eb8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec2.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<script src="../../resources/glsl-constructor-tests-generator.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var targetType = "ivec2";
+description("Test " + targetType + " constructor expressions.");
+
+var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
+
+// Generate tests
+var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
+
+// Run the tests
+GLSLConformanceTester.runTests(testCases);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec3.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec3.html
new file mode 100644
index 000000000..e437c4d6f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec3.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<script src="../../resources/glsl-constructor-tests-generator.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var targetType = "ivec3";
+description("Test " + targetType + " constructor expressions.");
+
+var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
+
+// Generate tests
+var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
+
+// Run the tests
+GLSLConformanceTester.runTests(testCases);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec4.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec4.html
new file mode 100644
index 000000000..0f430d489
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec4.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<script src="../../resources/glsl-constructor-tests-generator.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var targetType = "ivec4";
+description("Test " + targetType + " constructor expressions.");
+
+var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
+
+// Generate tests
+var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
+
+// Run the tests
+GLSLConformanceTester.runTests(testCases);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat2.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat2.html
new file mode 100644
index 000000000..9ae4b02f3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat2.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<script src="../../resources/glsl-constructor-tests-generator.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var targetType = "mat2";
+description("Test " + targetType + " constructor expressions.");
+
+var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
+
+// Generate tests
+var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
+
+// Run the tests
+GLSLConformanceTester.runTests(testCases);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat3.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat3.html
new file mode 100644
index 000000000..e34b67dda
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat3.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<script src="../../resources/glsl-constructor-tests-generator.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var targetType = "mat3";
+description("Test " + targetType + " constructor expressions.");
+
+var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
+
+// Generate tests
+var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
+
+// Run the tests
+GLSLConformanceTester.runTests(testCases);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat4.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat4.html
new file mode 100644
index 000000000..6af55881a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat4.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<script src="../../resources/glsl-constructor-tests-generator.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var targetType = "mat4";
+description("Test " + targetType + " constructor expressions.");
+
+var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
+
+// Generate tests
+var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
+
+// Run the tests
+GLSLConformanceTester.runTests(testCases);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-corner-cases.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-corner-cases.html
new file mode 100644
index 000000000..ed1571ede
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-corner-cases.html
@@ -0,0 +1,218 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script id="vsVec4Mat2Add" type="text/something-not-javascript">
+void main()
+{
+ mat2 m1 = mat2(1.0, 2.0, 3.0, 4.0);
+ mat2 m2 = mat2(0);
+ vec4 v = vec4(m1 + m2);
+ gl_Position = v;
+}
+</script>
+<script id="fsVec4Mat3Add" type="text/something-not-javascript">
+precision mediump float;
+void main()
+{
+ mat3 m1 = mat3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
+ mat3 m2 = mat3(0);
+ vec4 v = vec4(m1 + m2);
+ gl_FragColor = v;
+}
+</script>
+
+<script id="vsMat2Vec4Sub" type="text/something-not-javascript">
+void main()
+{
+ vec4 v1 = vec4(1.0, 2.0, 3.0, 4.0);
+ vec4 v2 = vec4(0);
+ mat2 m = mat2(v1 - v2);
+ gl_Position = vec4(1.0, m);
+}
+</script>
+<script id="fsMat3Vec4AddSub" type="text/something-not-javascript">
+precision mediump float;
+void main()
+{
+ vec4 v1 = vec4(1.0, 2.0, 3.0, 4.0);
+ vec4 v2 = vec4(0);
+ mat3 m = mat3(v1 + v2, 5.0, v1 - v2);
+ gl_FragColor = vec4(m);
+}
+</script>
+
+<script id="vsVec4Mat2Func" type="text/something-not-javascript">
+mat2 f(mat2 a)
+{
+ return a;
+}
+void main()
+{
+ mat2 m = mat2(1.0, 2.0, 3.0, 4.0);
+ vec4 v = vec4(f(m));
+ gl_Position = vec4(1.0, v);
+}
+</script>
+<script id="fsVec4Mat3Func" type="text/something-not-javascript">
+precision mediump float;
+mat3 f(mat3 a)
+{
+ return a;
+}
+void main()
+{
+ mat3 m = mat3(0);
+ vec4 v = vec4(f(m));
+ gl_FragColor = v;
+}
+</script>
+
+<script id="vsMat2Vec4Func" type="text/something-not-javascript">
+vec4 f(vec4 a)
+{
+ return a;
+}
+void main()
+{
+ vec4 v = vec4(1.0, 2.0, 3.0, 4.0);
+ mat2 m = mat2(f(v));
+ gl_Position = vec4(1.0, m);
+}
+</script>
+<script id="fsMat3Vec4Func" type="text/something-not-javascript">
+precision mediump float;
+vec4 f(vec4 a)
+{
+ return a;
+}
+void main()
+{
+ vec4 v1 = vec4(1.0, 2.0, 3.0, 4.0);
+ vec4 v2 = vec4(0);
+ mat3 m = mat3(f(v1), 5.0, f(v2));
+ gl_FragColor = vec4(m);
+}
+</script>
+
+<script id="vsMat4VecMultiple" type="text/something-not-javascript">
+vec4 f(vec4 a)
+{
+ return a;
+}
+void main()
+{
+ vec2 v2 = vec2(1.0, 2.0);
+ vec3 v3 = vec3(1.0, 2.0, 3.0);
+ vec4 v4 = vec4(1.0, 2.0, 3.0, 4.0);
+ mat4 m = mat4(0.0, v2, 1.0, v3 + vec3(1), 2.0, vec4(0), f(v4));
+ gl_Position = vec4(1.0, m);
+}
+</script>
+<script id="fsMat4VecMultiple" type="text/something-not-javascript">
+precision mediump float;
+vec4 f(vec4 a)
+{
+ return a;
+}
+void main()
+{
+ vec2 v2 = vec2(1.0, 2.0);
+ vec3 v3 = vec3(1.0, 2.0, 3.0);
+ vec4 v4 = vec4(1.0, 2.0, 3.0, 4.0);
+ mat4 m = mat4(0.0, v2, 1.0, v3 + vec3(1), 2.0, vec4(0), f(v4));
+ gl_FragColor = vec4(m);
+}
+</script>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var tests = [];
+
+tests.push({
+ vShaderSource: wtu.getScript("vsVec4Mat2Add"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fsVec4Mat3Add"),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vec(mat +/- mat) works ok",
+});
+tests.push({
+ vShaderSource: wtu.getScript("vsMat2Vec4Sub"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fsMat3Vec4AddSub"),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "mat(vec +/- vec) works ok",
+});
+tests.push({
+ vShaderSource: wtu.getScript("vsVec4Mat2Func"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fsVec4Mat3Func"),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vec(func(mat)) works ok",
+});
+tests.push({
+ vShaderSource: wtu.getScript("vsMat2Vec4Func"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fsMat3Vec4Func"),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "mat(func(vec)) works ok",
+});
+tests.push({
+ vShaderSource: wtu.getScript("vsMat4VecMultiple"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fsMat4VecMultiple"),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "mat4(float, vec2, float, vec3+vec3, float, vec4, f(vec4)) works ok",
+});
+
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-index.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-index.html
new file mode 100644
index 000000000..841878ea5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-index.html
@@ -0,0 +1,99 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">xxx</canvas>
+<div id="description">Check mat2(index++, vec4(index++)) works as intended</div>
+<div id="console"></div>
+
+<script id="vsDefault" type="text/something-not-javascript">
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+<script id="fsPlusPlus" type="text/something-not-javascript">
+precision mediump float;
+bool equal(mat2 m1, mat2 m2)
+{
+ float EPSILON = 0.00001;
+ for (int i = 0; i < 2; i++) {
+ for (int j = 0; j < 2; j++) {
+ if (abs(m1[i][j] - m2[i][j]) > EPSILON)
+ return false;
+ }
+ }
+ return true;
+}
+void main()
+{
+ int i = 0;
+ mat2 m = mat2(i++, vec4(i++));
+ if (equal(m, mat2(0, 1, 1, 1)))
+ gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+ else
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+
+var gl = wtu.create3DContext("example");
+var program = wtu.setupProgram(gl, ["vsDefault", "fsPlusPlus"], ["vPosition"]);
+
+var vertexObject = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+gl.enableVertexAttribArray(0);
+gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+gl.drawArrays(gl.TRIANGLES, 0, 3);
+
+wtu.checkCanvasRect(gl, 25, 25, 1, 1, [0, 255, 0, 255]);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "There should be no error", 1);
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec2.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec2.html
new file mode 100644
index 000000000..d864790bf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec2.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<script src="../../resources/glsl-constructor-tests-generator.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var targetType = "vec2";
+description("Test " + targetType + " constructor expressions.");
+
+var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
+
+// Generate tests
+var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
+
+// Run the tests
+GLSLConformanceTester.runTests(testCases);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec3.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec3.html
new file mode 100644
index 000000000..b7eafb7dd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec3.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<script src="../../resources/glsl-constructor-tests-generator.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var targetType = "vec3";
+description("Test " + targetType + " constructor expressions.");
+
+var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
+
+// Generate tests
+var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
+
+// Run the tests
+GLSLConformanceTester.runTests(testCases);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec4.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec4.html
new file mode 100644
index 000000000..267e0845e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec4.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<script src="../../resources/glsl-constructor-tests-generator.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var targetType = "vec4";
+description("Test " + targetType + " constructor expressions.");
+
+var testSet = GLSLConstructorTestsGenerator.getDefaultTestSet(targetType);
+
+// Generate tests
+var testCases = GLSLConstructorTestsGenerator.getConstructorTests(targetType, testSet);
+
+// Run the tests
+GLSLConformanceTester.runTests(testCases);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/00_test_list.txt
new file mode 100644
index 000000000..dd06ea052
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/00_test_list.txt
@@ -0,0 +1,36 @@
+glsl-function.html
+glsl-function-abs.html
+glsl-function-acos.html
+glsl-function-asin.html
+glsl-function-atan.html
+glsl-function-atan-xy.html
+glsl-function-ceil.html
+glsl-function-clamp-float.html
+glsl-function-clamp-gentype.html
+glsl-function-cos.html
+glsl-function-cross.html
+glsl-function-distance.html
+glsl-function-dot.html
+glsl-function-faceforward.html
+glsl-function-floor.html
+glsl-function-fract.html
+glsl-function-length.html
+#glsl-function-lessThan.html
+glsl-function-max-float.html
+glsl-function-max-gentype.html
+glsl-function-min-float.html
+glsl-function-min-gentype.html
+glsl-function-mix-float.html
+glsl-function-mix-gentype.html
+glsl-function-mod-float.html
+glsl-function-mod-gentype.html
+glsl-function-normalize.html
+glsl-function-reflect.html
+#glsl-function-refract.html
+glsl-function-sign.html
+glsl-function-sin.html
+glsl-function-step-float.html
+glsl-function-step-gentype.html
+glsl-function-smoothstep-float.html
+glsl-function-smoothstep-gentype.html
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-abs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-abs.html
new file mode 100644
index 000000000..a3e107ab3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-abs.html
@@ -0,0 +1,68 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL abs function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "abs",
+ testFunc: "$(func)($(arg0))",
+ emuFunc: ["float $(func)_base(float value) {",
+ " return value >= 0.0 ? value : -value;",
+ "}"].join("\n"),
+ gridRes: 4,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x * 2.0 - 1.0),",
+ " 0.5,",
+ " 0,",
+ " 1);"].join("\n"),
+ "$(output) = vec4(0, $(func)($(input).xy * 2.0 - vec2(1, 1)), 1);",
+ "$(output) = vec4($(func)($(input).xyz * 2.0 - vec3(1, 1, 1)), 1);",
+ "$(output) = $(func)($(input) * 2.0 - vec4(1, 1, 1, 1));"
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-acos.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-acos.html
new file mode 100644
index 000000000..84a5f6a23
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-acos.html
@@ -0,0 +1,118 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL acos function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+var piConstants = [
+ "const float kPI = 3.14159265358979323846;",
+ "const float kHalfPI = (kPI * 0.5);",
+ "const float k2PI = (kPI * 2.0);"
+].join("\n");
+
+var kPI = Math.PI;
+var kHalfPI = Math.PI * 0.5;
+var k2PI = Math.PI * 2.0;
+var acos = Math.acos; // shorthand
+
+GLSLGenerator.runReferenceImageTest({
+ feature: "acos",
+ args: "$(type) value",
+ testFunc: "$(func)($(type))",
+ gridRes: 8,
+ tolerance: 2,
+ extra: piConstants,
+ tests: [
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).x * 0.8) / kPI,",
+ " $(func)($(input).y * 0.8) / kPI,",
+ " 0,",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ acos(x * 0.8) / kPI,
+ acos(y * 0.8) / kPI,
+ 0,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).xy * 0.8) / kPI,",
+ " 0, 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ acos(x * 0.8) / kPI,
+ acos(y * 0.8) / kPI,
+ 0,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).xyz * 0.8) / kPI,",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ acos(x * 0.8) / kPI,
+ acos(y * 0.8) / kPI,
+ acos(z * 0.8) / kPI,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = ",
+ " $(func)($(input) * 0.8) / kPI;",
+ ].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ acos(x * 0.8) / kPI,
+ acos(y * 0.8) / kPI,
+ acos(z * 0.8) / kPI,
+ acos(w * 0.8) / kPI ];
+ },
+ },
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-asin.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-asin.html
new file mode 100644
index 000000000..e5455f7dc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-asin.html
@@ -0,0 +1,118 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL asin function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+var piConstants = [
+ "const float kPI = 3.14159265358979323846;",
+ "const float kHalfPI = (kPI * 0.5);",
+ "const float k2PI = (kPI * 2.0);"
+].join("\n");
+
+var kPI = Math.PI;
+var kHalfPI = Math.PI * 0.5;
+var k2PI = Math.PI * 2.0;
+var asin = Math.asin; // shorthand
+
+GLSLGenerator.runReferenceImageTest({
+ feature: "asin",
+ args: "$(type) value",
+ testFunc: "$(func)($(type))",
+ gridRes: 8,
+ tolerance: 2,
+ extra: piConstants,
+ tests: [
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).x * 0.8) / kPI + 0.5,",
+ " $(func)($(input).y * 0.8) / kPI + 0.5,",
+ " 0,",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ asin(x * 0.8) / kPI + 0.5,
+ asin(y * 0.8) / kPI + 0.5,
+ 0,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).xy * 0.8) / kPI + 0.5,",
+ " 0, 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ asin(x * 0.8) / kPI + 0.5,
+ asin(y * 0.8) / kPI + 0.5,
+ 0,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).xyz * 0.8) / kPI + 0.5,",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ asin(x * 0.8) / kPI + 0.5,
+ asin(y * 0.8) / kPI + 0.5,
+ asin(z * 0.8) / kPI + 0.5,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = ",
+ " $(func)($(input) * 0.8) / kPI + 0.5;",
+ ].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ asin(x * 0.8) / kPI + 0.5,
+ asin(y * 0.8) / kPI + 0.5,
+ asin(z * 0.8) / kPI + 0.5,
+ asin(w * 0.8) / kPI + 0.5 ];
+ },
+ },
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan-xy.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan-xy.html
new file mode 100644
index 000000000..6b171ab42
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan-xy.html
@@ -0,0 +1,121 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL atan-xy function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+var piConstants = [
+ "const float kPI = 3.14159265358979323846;",
+ "const float kHalfPI = (kPI * 0.5);",
+ "const float k2PI = (kPI * 2.0);"
+].join("\n");
+
+var kPI = Math.PI;
+var kHalfPI = Math.PI * 0.5;
+var k2PI = Math.PI * 2.0;
+var atan2 = Math.atan2; // shorthand
+
+GLSLGenerator.runReferenceImageTest({
+ feature: "atan",
+ args: "$(type) y, $(type) x",
+ testFunc: "$(func)($(type), $(type))",
+ gridRes: 8,
+ tolerance: 5,
+ extra: piConstants,
+ tests: [
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).x + 0.1, $(input).y) / k2PI + 0.5,",
+ " 0,",
+ " 0,",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ atan2(x + 0.1, y) / k2PI + 0.5,
+ 0,
+ 0,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).xy + vec2(0.1, 0.1), $(input).yx) / ",
+ " k2PI + vec2(0.5, 0.5),",
+ " 0, 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ atan2(x + 0.1, y) / k2PI + 0.5,
+ atan2(y + 0.1, x) / k2PI + 0.5,
+ 0,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).xyz + vec3(0.1, 0.1, 0.1), $(input).yzx) / ",
+ " k2PI + vec3(0.5, 0.5, 0.5),",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ atan2(x + 0.1, y) / k2PI + 0.5,
+ atan2(y + 0.1, z) / k2PI + 0.5,
+ atan2(z + 0.1, x) / k2PI + 0.5,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = ",
+ " $(func)($(input) + vec4(0.1, 0.1, 0.1, 0.1), $(input).wzyx) / ",
+ " k2PI + vec4(0.5, 0.5, 0.5, 0.5);",
+ ].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ atan2(x + 0.1, w) / k2PI + 0.5,
+ atan2(y + 0.1, z) / k2PI + 0.5,
+ atan2(z + 0.1, y) / k2PI + 0.5,
+ atan2(w + 0.1, x) / k2PI + 0.5 ];
+ },
+ },
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan.html
new file mode 100644
index 000000000..dd8a21361
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan.html
@@ -0,0 +1,118 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL atan function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+var piConstants = [
+ "const float kPI = 3.14159265358979323846;",
+ "const float kHalfPI = (kPI * 0.5);",
+ "const float k2PI = (kPI * 2.0);"
+].join("\n");
+
+var kPI = Math.PI;
+var kHalfPI = Math.PI * 0.5;
+var k2PI = Math.PI * 2.0;
+var atan = Math.atan; // shorthand
+
+GLSLGenerator.runReferenceImageTest({
+ feature: "atan",
+ args: "$(type) value",
+ testFunc: "$(func)($(type))",
+ gridRes: 8,
+ tolerance: 4,
+ extra: piConstants,
+ tests: [
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).x * 8.0 - 4.0) / k2PI + 0.5,",
+ " 0.5,",
+ " 0,",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ atan(x * 8.0 - 4.0) / k2PI + 0.5,
+ 0.5,
+ 0,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).xy * 8.0 - vec2(4, 4)) / k2PI + vec2(0.5, 0.5),",
+ " 0, 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ atan(x * 8.0 - 4) / k2PI + 0.5,
+ atan(y * 8.0 - 4) / k2PI + 0.5,
+ 0,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).xyz * 8.0 - vec3(4, 4, 4)) / k2PI + vec3(0.5, 0.5, 0.5),",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ atan(x * 8.0 - 4) / k2PI + 0.5,
+ atan(y * 8.0 - 4) / k2PI + 0.5,
+ atan(z * 8.0 - 4) / k2PI + 0.5,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = ",
+ " $(func)($(input) * 8.0 - vec4(4, 4, 4, 4)) / k2PI + vec4(0.5, 0.5, 0.5, 0.5);",
+ ].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ atan(x * 8.0 - 4) / k2PI + 0.5,
+ atan(y * 8.0 - 4) / k2PI + 0.5,
+ atan(z * 8.0 - 4) / k2PI + 0.5,
+ atan(w * 8.0 - 4) / k2PI + 0.5 ];
+ },
+ },
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-ceil.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-ceil.html
new file mode 100644
index 000000000..508f5e37f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-ceil.html
@@ -0,0 +1,76 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL ceil function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "ceil",
+ testFunc: "$(func)($(arg0))",
+ emuFunc: ["float $(func)_base(float value) {",
+ " float m = mod(value, 1.0);",
+ " return m != 0.0 ? (value + 1.0 - m) : value;",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x * 8.0 - 4.0) / 8.0 + 0.5,",
+ " $(func)($(input).y * 8.0 - 4.0) / 8.0 + 0.5,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy * 8.0 - vec2(4, 4)) / 8.0 + vec2(0.5, 0.5),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz * 8.0 - vec3(4, 4, 4)) / 8.0 + ",
+ " vec3(0.5, 0.5, 0.5),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)($(input) * 8.0 - vec4(4, 4, 4, 4)) / 8.0 + ",
+ " vec4(0.5, 0.5, 0.5, 0.5);"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-float.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-float.html
new file mode 100644
index 000000000..3c117fe1e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-float.html
@@ -0,0 +1,79 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL clamp-gentype function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "clamp",
+ args: "$(type) value, float minValue, float maxValue",
+ baseArgs: "value$(field), minValue, maxValue",
+ testFunc: "$(func)($(type), float, float)",
+ emuFunc: ["float $(func)_base(float value, float minValue, float maxValue) {",
+ " return min(max(value, minValue), maxValue);",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x * 6.0 - 3.0, -1.5, 1.5) / 3.0 + 0.5,",
+ " $(func)($(input).y * 10.0 - 5.0, -2.5, 2.5) / 5.0 + 0.5,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy * vec2(6, 10) - vec2(3, 5), -1.5, 2.0) / ",
+ " vec2(3.0, 5.0) + vec2(0.5, 0.5),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz * vec3(6, 10, 8) - vec3(3, 5, 4), -1.5, 2.0) / ",
+ " vec3(3, 5, 4) + vec3(0.5, 0.5, 0.5),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)($(input) * vec4(6, 10, 8, 4) - vec4(3, 5, 4, 2),",
+ " -1.5, 2.2) / vec4(3, 5, 4, 2) + ",
+ " vec4(0.5, 0.5, 0.5, 0.5);"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-gentype.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-gentype.html
new file mode 100644
index 000000000..a89133a33
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-gentype.html
@@ -0,0 +1,82 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL clamp-gentype function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "clamp",
+ args: "$(type) value, $(type) minValue, $(type) maxValue",
+ baseArgs: "value$(field), minValue$(field), maxValue$(field)",
+ testFunc: "$(func)($(type), $(type), $(type))",
+ emuFunc: ["float $(func)_base(float value, float minValue, float maxValue) {",
+ " return min(max(value, minValue), maxValue);",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x * 6.0 - 3.0, -1.5, 1.5) / 3.0 + 0.5,",
+ " $(func)($(input).y * 10.0 - 5.0, -2.5, 2.5) / 5.0 + 0.5,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy * vec2(6, 10) - vec2(3, 5), ",
+ " vec2(-1.5, -2.5), vec2(1.5, 2.5)) / ",
+ " vec2(3.0, 5.0) + vec2(0.5, 0.5),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz * vec3(6, 10, 8) - vec3(3, 5, 4), ",
+ " vec3(-1.5, -2.5, -2), vec3(1.5, 2.5, 2)) / vec3(3, 5, 4) + ",
+ " vec3(0.5, 0.5, 0.5),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)($(input) * vec4(6, 10, 8, 4) - vec4(3, 5, 4, 2),",
+ " vec4(-1.5, -2.5, -2, -1), vec4(1.5, 2.5, 2, 1)) / ",
+ " vec4(3, 5, 4, 2) + ",
+ " vec4(0.5, 0.5, 0.5, 0.5);"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cos.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cos.html
new file mode 100644
index 000000000..a6475772b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cos.html
@@ -0,0 +1,122 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL cos function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+var piConstants = [
+ "const float kPI = 3.14159265358979323846;",
+ "const float kHalfPI = (kPI * 0.5);",
+ "const float k2PI = (kPI * 2.0);"
+].join("\n");
+
+var kPI = Math.PI;
+var kHalfPI = Math.PI * 0.5;
+var k2PI = Math.PI * 2.0;
+var cos = Math.cos; // shorthand
+
+GLSLGenerator.runReferenceImageTest({
+ feature: "cos",
+ args: "$(type) value",
+ testFunc: "$(func)($(type))",
+ gridRes: 8,
+ tolerance: 3,
+ extra: piConstants,
+ tests: [
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).x * kHalfPI + kHalfPI),",
+ " $(func)($(input).y * kHalfPI),",
+ " 0,",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ cos(x * kHalfPI + kHalfPI),
+ cos(y * kHalfPI),
+ 0,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).xy * vec2(kPI, k2PI)) * 0.5 + vec2(0.5, 0.5),",
+ " 0, 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ cos(x * kPI) * 0.5 + 0.5,
+ cos(y * k2PI) * 0.5 + 0.5,
+ 0,
+ 1 ];
+ },
+ },
+ {
+ // FIXME: for some reason, this test requires a higher tolerance when run in a vertex shader.
+ source: ["$(output) = vec4(",
+ " $(func)($(input).xyz * vec3(kPI, k2PI, 4.0)) * ",
+ " 0.5 + vec3(0.5, 0.5, 0.5),",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ cos(x * kPI) * 0.5 + 0.5,
+ cos(y * k2PI) * 0.5 + 0.5,
+ cos(z * 4.0) * 0.5 + 0.5,
+ 1 ];
+ },
+ tolerance: 7,
+ },
+ {
+ source: ["$(output) = ",
+ " $(func)($(input) * vec4(k2PI, 4.0, kHalfPI, kPI)) *",
+ " 0.5 + vec4(0.5, 0.5, 0.5, 1);",
+ ].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ cos(x * k2PI) * 0.5 + 0.5,
+ cos(y * 4.0) * 0.5 + 0.5,
+ cos(z * kHalfPI) * 0.5 + 0.5,
+ cos(w * kPI) * 0.5 + 1.0 ];
+ },
+ },
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cross.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cross.html
new file mode 100644
index 000000000..039568006
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cross.html
@@ -0,0 +1,76 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL cross function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+GLSLGenerator.runFeatureTest({
+ feature: "cross",
+ args: "$(type) x, $(type) y",
+ baseArgs: "value$(field)",
+ testFunc: "$(func)($(type),$(type))",
+ emuFuncs: [
+ { type: "vec3",
+ code: [
+ "vec3 $(func)_emu($(args)) {",
+ " return vec3(",
+ " x[1] * y[2] - y[1] * x[2],",
+ " x[2] * y[0] - y[2] * x[0],",
+ " x[0] * y[1] - y[0] * x[1]);",
+ "}"].join("\n")
+ },
+ ],
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)(",
+ " normalize($(input).xyz - 0.5),",
+ " normalize($(input).yzw - 0.5)) * 0.5 + 0.5,",
+ " 1);"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-distance.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-distance.html
new file mode 100644
index 000000000..f4f72fe53
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-distance.html
@@ -0,0 +1,111 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL distance function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+GLSLGenerator.runFeatureTest({
+ feature: "distance",
+ args: "$(type) p1, $(type) p2",
+ baseArgs: "value$(field)",
+ testFunc: "$(func)($(type),$(type))",
+ emuFuncs: [
+ { type: "float",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return abs(p1 - p2);",
+ "}"].join("\n")
+ },
+ { type: "vec2",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return length(p1 - p2);",
+ "}"].join("\n")
+ },
+ { type: "vec3",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return length(p1 - p2);",
+ "}"].join("\n")
+ },
+ { type: "vec4",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return length(p1 - p2);",
+ "}"].join("\n")
+ }
+ ],
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)(",
+ " $(input).x * 8.0 - 4.0,",
+ " $(input).y * 8.0 - 4.0) / 8.0,",
+ " 0,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " 0,",
+ " $(func)(",
+ " $(input).xy * 8.0 - 4.0,",
+ " $(input).wz * 8.0 - 4.0) / 8.0,",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " 0, 0,",
+ " $(func)(",
+ " $(input).xyz * 8.0 - 4.0,",
+ " $(input).yzw * 8.0 - 4.0) / 8.0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(",
+ " vec4($(input).xyz, 0) * 8.0 - 4.0,",
+ " vec4(0, $(input).wzy) * 8.0 - 4.0) / 8.0,",
+ " 0, 0, 1);",
+ ].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-dot.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-dot.html
new file mode 100644
index 000000000..dc81b6322
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-dot.html
@@ -0,0 +1,113 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL dot function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+GLSLGenerator.runFeatureTest({
+ feature: "dot",
+ args: "$(type) p1, $(type) p2",
+ baseArgs: "value$(field)",
+ testFunc: "$(func)($(type),$(type))",
+ fragmentTolerance: 1,
+ emuFuncs: [
+ { type: "float",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return p1 * p2;",
+ "}"].join("\n")
+ },
+ { type: "vec2",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return p1.x * p2.x + p1.y * p2.y;",
+ "}"].join("\n")
+ },
+ { type: "vec3",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return p1.x * p2.x + p1.y * p2.y + p1.z * p2.z;",
+ "}"].join("\n")
+ },
+ { type: "vec4",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return p1.x * p2.x + p1.y * p2.y + p1.z * p2.z + p1.w * p2.w;",
+ "}"].join("\n")
+ }
+ ],
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)(",
+ " $(input).x * 8.0 - 4.0,",
+ " $(input).y * 8.0 - 4.0) / 8.0,",
+ " 0,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " 0,",
+ " $(func)(",
+ " $(input).xy * 8.0 - 4.0,",
+ " $(input).wz * 8.0 - 4.0) / 8.0,",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " 0, 0,",
+ " $(func)(",
+ " $(input).xyz * 8.0 - 4.0,",
+ " $(input).yzw * 8.0 - 4.0) / 8.0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(",
+ " vec4($(input).xyz, 0) * 8.0 - 4.0,",
+ " vec4(0, $(input).wzy) * 8.0 - 4.0) / 8.0,",
+ " 0, 0, 1);",
+ ].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-faceforward.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-faceforward.html
new file mode 100644
index 000000000..6407c1e41
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-faceforward.html
@@ -0,0 +1,91 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL faceforward function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+GLSLGenerator.runFeatureTest({
+ feature: "faceforward",
+ args: "$(type) N, $(type) I, $(type) Nref",
+ baseArgs: "value$(field)",
+ testFunc: "$(func)($(type),$(type),$(type))",
+ simpleEmu: [
+ "$(type) $(func)_emu($(args)) {",
+ " return dot(Nref, I) < 0.0 ? N : -N;",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)(",
+ " $(input).x * 2.0 - 1.0,",
+ " $(input).y * 2.0 - 1.0,",
+ " $(input).z * 2.0 - 1.0),",
+ " 0,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(",
+ " $(input).xy * 2.0 - 1.0,",
+ " $(input).yz * 2.0 - 1.0,",
+ " $(input).zw * 2.0 - 1.0),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(",
+ " $(input).xyz * 2.0 - 1.0,",
+ " $(input).yzw * 2.0 - 1.0,",
+ " $(input).zwx * 2.0 - 1.0),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)(",
+ " $(input).xyzw * 2.0 - 1.0,",
+ " $(input).yzwx * 2.0 - 1.0,",
+ " $(input).zwxy * 2.0 - 1.0);"
+ ].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-floor.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-floor.html
new file mode 100644
index 000000000..524ba8028
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-floor.html
@@ -0,0 +1,75 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL floor function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "floor",
+ testFunc: "$(func)($(arg0))",
+ emuFunc: ["float $(func)_base(float value) {",
+ " return value - mod(value, 1.0);",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x * 8.0 - 4.0) / 8.0 + 0.5,",
+ " $(func)($(input).y * 8.0 - 4.0) / 8.0 + 0.5,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy * 8.0 - vec2(4, 4)) / 8.0 + vec2(0.5, 0.5),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz * 8.0 - vec3(4, 4, 4)) / 8.0 + ",
+ " vec3(0.5, 0.5, 0.5),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)($(input) * 8.0 - vec4(4, 4, 4, 4)) / 8.0 + ",
+ " vec4(0.5, 0.5, 0.5, 0.5);"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-fract.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-fract.html
new file mode 100644
index 000000000..22a40a759
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-fract.html
@@ -0,0 +1,73 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL fract function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "fract",
+ testFunc: "$(func)($(arg0))",
+ emuFunc: ["float $(func)_base(float value) {",
+ " return value - floor(value);",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x * 4.0 - 2.0),",
+ " $(func)($(input).y * 4.0 - 2.0),",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy * 4.0 - vec2(2, 2)),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz * 4.0 - vec3(2, 2, 2)),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)($(input) * 4.0 - vec4(2, 2, 2, 2));"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-length.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-length.html
new file mode 100644
index 000000000..b3c96cdc6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-length.html
@@ -0,0 +1,110 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL length function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+GLSLGenerator.runFeatureTest({
+ feature: "length",
+ args: "$(type) value",
+ baseArgs: "value$(field)",
+ testFunc: "$(func)($(type))",
+ fragmentTolerance: 1,
+ emuFuncs: [
+ { type: "float",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return abs($(baseArgs));",
+ "}"].join("\n")
+ },
+ { type: "vec2",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return sqrt(",
+ " $(baseArgsX) * $(baseArgsX) + ",
+ " $(baseArgsY) * $(baseArgsY));",
+ "}"].join("\n")
+ },
+ { type: "vec3",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return sqrt(",
+ " $(baseArgsX) * $(baseArgsX) + ",
+ " $(baseArgsY) * $(baseArgsY) + ",
+ " $(baseArgsZ) * $(baseArgsZ));",
+ "}"].join("\n")
+ },
+ { type: "vec4",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return sqrt(",
+ " $(baseArgsX) * $(baseArgsX) + ",
+ " $(baseArgsY) * $(baseArgsY) + ",
+ " $(baseArgsZ) * $(baseArgsZ) + ",
+ " $(baseArgsW) * $(baseArgsW));",
+ "}"].join("\n")
+ }
+ ],
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x * 8.0 - 4.0) / 4.0,",
+ " $(func)($(input).y * 8.0 - 4.0) / 4.0,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy * 8.0 - 4.0) / 4.0,",
+ " 0, 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz * 8.0 - 4.0) / 4.0,",
+ " 0, 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input) * 8.0 - 4.0) / 4.0, 0, 0, 1);",
+ ].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-float.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-float.html
new file mode 100644
index 000000000..0aa52ba1d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-float.html
@@ -0,0 +1,75 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL max-float function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "max",
+ args: "$(type) value, float maxValue",
+ baseArgs: "value$(field), maxValue",
+ testFunc: "$(func)($(arg0), float)",
+ emuFunc: ["float $(func)_base(float value, float maxValue) {",
+ " return value > maxValue ? value : maxValue;",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x, 0.5),",
+ " $(func)($(input).y, 0.5),",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy, 0.5),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz, 0.5),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)($(input), 0.5);"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-gentype.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-gentype.html
new file mode 100644
index 000000000..e2c9bd2cd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-gentype.html
@@ -0,0 +1,75 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL max-gentype function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "max",
+ args: "$(type) value, $(type) maxValue",
+ baseArgs: "value$(field), maxValue$(field)",
+ testFunc: "$(func)($(type), $(type))",
+ emuFunc: ["float $(func)_base(float value, float maxValue) {",
+ " return value > maxValue ? value : maxValue;",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x, 0.5),",
+ " $(func)($(input).y, 0.5),",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy, vec2(0.5, 0.5)),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz, vec3(0.5, 0.5, 0.5)),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)($(input), vec4(0.5, 0.5, 0.5, 0.5));"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-float.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-float.html
new file mode 100644
index 000000000..51e3b6021
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-float.html
@@ -0,0 +1,75 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL min-float function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "min",
+ args: "$(type) value, float divisor",
+ baseArgs: "value$(field), divisor",
+ testFunc: "$(func)($(arg0), float)",
+ emuFunc: ["float $(func)_base(float value, float divisor) {",
+ " return value < divisor ? value : divisor;",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x, 0.5),",
+ " $(func)($(input).y, 0.5),",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy, 0.5),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz, 0.5),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)($(input), 0.5);"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-gentype.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-gentype.html
new file mode 100644
index 000000000..4a0ada8db
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-gentype.html
@@ -0,0 +1,75 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL min-gentype function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "min",
+ args: "$(type) value, $(type) minValue",
+ baseArgs: "value$(field), minValue$(field)",
+ testFunc: "$(func)($(type), $(type))",
+ emuFunc: ["float $(func)_base(float value, float minValue) {",
+ " return value < minValue ? value : minValue;",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x, 0.5),",
+ " $(func)($(input).y, 0.5),",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy, vec2(0.5, 0.5)),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz, vec3(0.5, 0.5, 0.5)),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)($(input), vec4(0.5, 0.5, 0.5, 0.5));"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-float.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-float.html
new file mode 100644
index 000000000..36ff43615
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-float.html
@@ -0,0 +1,77 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL mix-float function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "mix",
+ args: "$(type) startValue, $(type) endValue, float mixValue",
+ baseArgs: "startValue$(field), endValue$(field), mixValue",
+ testFunc: "$(func)($(type), $(type), float)",
+ emuFunc: [
+ "float $(func)_base(float startValue, float endValue, float mixValue) {",
+ " return startValue * (1.0 - mixValue) + endValue * mixValue;",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)(1.0, 0.0, $(input).x),",
+ " ($(func)(-2.0, 3.0, $(input).y) + 2.0) / 5.0,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(vec2(1, -2), vec2(0, 2), $(input).z), ",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(vec3(1, -2, -1), vec3(0, 2, 3), $(input).y),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)(vec4(1, -2, -1, 0.5), vec4(0, 2, 3, 1), $(input).w);"
+ ].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-gentype.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-gentype.html
new file mode 100644
index 000000000..4ec7f632e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-gentype.html
@@ -0,0 +1,77 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL mix-gentype function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "mix",
+ args: "$(type) startValue, $(type) endValue, $(type) mixValue",
+ baseArgs: "startValue$(field), endValue$(field), mixValue$(field)",
+ testFunc: "$(func)($(type), $(type), $(type))",
+ emuFunc: [
+ "float $(func)_base(float startValue, float endValue, float mixValue) {",
+ " return startValue * (1.0 - mixValue) + endValue * mixValue;",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)(1.0, 0.0, $(input).x),",
+ " ($(func)(-2.0, 3.0, $(input).y) + 2.0) / 5.0,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(vec2(1, -2), vec2(0, 2), $(input).xy), ",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(vec3(1, -2, -1), vec3(0, 2, 3), $(input).xyz),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)(vec4(1, -2, -1, 0.5), vec4(0, 2, 3, 1), $(input));"
+ ].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-float.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-float.html
new file mode 100644
index 000000000..a18bc9480
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-float.html
@@ -0,0 +1,76 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL mod-float function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "mod",
+ args: "$(type) value, float divisor",
+ baseArgs: "value$(field), divisor",
+ testFunc: "$(func)($(arg0), float)",
+ fragmentTolerance: 1,
+ emuFunc: ["float $(func)_base(float value, float divisor) {",
+ " return value - divisor * floor(value / divisor);",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x * 6.0 - 3.0, 1.5) / 1.5,",
+ " $(func)($(input).y * 6.0 - 3.0, 1.5) / 1.5,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy * 6.0 - vec2(3, 3), 1.5) / 1.5,",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz * 6.0 - vec3(3, 3, 3), 1.5) / 1.5,",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)($(input) * 6.0 - vec4(3, 3, 3, 3), 1.5) / 1.5;"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-gentype.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-gentype.html
new file mode 100644
index 000000000..4d94cb481
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-gentype.html
@@ -0,0 +1,79 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL mod-gentype function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "mod",
+ args: "$(type) value, $(type) divisor",
+ baseArgs: "value$(field), divisor$(field)",
+ testFunc: "$(func)($(type), $(type))",
+ emuFunc: ["float $(func)_base(float value, float divisor) {",
+ " return value - divisor * floor(value / divisor);",
+ "}"].join("\n"),
+ gridRes: 8,
+ tolerance: 1,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x * 6.0 - 3.0, 1.5) / 1.5,",
+ " $(func)($(input).y * 10.0 - 5.0, 2.1) / 2.1,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy * vec2(6, 10) - vec2(3, 5), ",
+ " vec2(1.5, 2.1)) / vec2(1.5, 2.1),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz * vec3(6, 10, 8) - vec3(3, 5, 4), ",
+ " vec3(1.5, 2.1, 3.2)) / vec3(1.5, 2.1, 3.2),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)($(input) * vec4(6, 10, 8, 4) - vec4(3, 5, 4, 2),",
+ " vec4(1.5, 2.1, 3.2, 1.1)) / vec4(1.5, 2.1, 3.2, 1.1);"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-normalize.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-normalize.html
new file mode 100644
index 000000000..b5329498c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-normalize.html
@@ -0,0 +1,82 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL normalize function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "normalize",
+ args: "$(type) value",
+ testFunc: "$(func)($(type))",
+ simpleEmu: [
+ "$(type) $(func)_emu($(args)) {",
+ " return value / length(value);",
+ "}"].join("\n"),
+ gridRes: 8,
+ tolerance: 1,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)(",
+ " $(input).x * 8.0 - 4.1) * 0.5 + 0.5,",
+ " 0.5,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(",
+ " $(input).xy * 8.0 - 4.1) * 0.5 + 0.5,",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(",
+ " $(input).xyz * 8.0 - 4.1) * 0.5 + 0.5,",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)(",
+ " vec4($(input).xyz, 0) * 8.0 - 4.1) * 0.5 + 0.5 + vec4(0,0,0,0.5);",
+ ].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-reflect.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-reflect.html
new file mode 100644
index 000000000..306881b95
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-reflect.html
@@ -0,0 +1,86 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL reflect function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "reflect",
+ args: "$(type) I, $(type) N",
+ baseArgs: "value$(field)",
+ testFunc: "$(func)($(type),$(type))",
+ simpleEmu: [
+ "$(type) $(func)_emu($(args)) {",
+ " return I - 2.0 * dot(N, I) * N;",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)(",
+ " $(input).x * 2.0 - 1.0,",
+ " $(input).y * 2.0 - 1.0),",
+ " 0,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(",
+ " $(input).xy * 2.0 - 1.0,",
+ " $(input).yz * 2.0 - 1.0),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(",
+ " $(input).xyz * 2.0 - 1.0,",
+ " $(input).yzw * 2.0 - 1.0),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)(",
+ " $(input).xyzw * 2.0 - 1.0,",
+ " $(input).yzwx * 2.0 - 1.0);"
+ ].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sign.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sign.html
new file mode 100644
index 000000000..d09b129c8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sign.html
@@ -0,0 +1,76 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL sign function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "sign",
+ testFunc: "$(func)($(arg0))",
+ emuFunc: ["float $(func)_base(float value) {",
+ " if (value == 0.0) return 0.0;",
+ " return value > 0.0 ? 1.0 : -1.0;",
+ "}"].join("\n"),
+ gridRes: 4,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)($(input).x * 2.0 - 1.0) * 0.5 + 0.5,",
+ " 0.5,",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xy * 2.0 - vec2(1, 1)) * 0.5 + vec2(0.5, 0.5),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)($(input).xyz * 2.0 - vec3(1, 1, 1)) * 0.5 + ",
+ " vec3(0.5, 0.5, 0.5),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)($(input) * 2.0 - vec4(1, 1, 1, 1)) * 0.5 + ",
+ " vec4(0.5, 0.5, 0.5, 0.5);"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sin.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sin.html
new file mode 100644
index 000000000..f4f5434dc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sin.html
@@ -0,0 +1,119 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL sin function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+var piConstants = [
+ "const float kPI = 3.14159265358979323846;",
+ "const float kHalfPI = (kPI * 0.5);",
+ "const float k2PI = (kPI * 2.0);"
+].join("\n");
+
+var kPI = Math.PI;
+var kHalfPI = Math.PI * 0.5;
+var k2PI = Math.PI * 2.0;
+var sin = Math.sin; // shorthand
+
+GLSLGenerator.runReferenceImageTest({
+ feature: "sin",
+ args: "$(type) value",
+ testFunc: "$(func)($(type))",
+ gridRes: 8,
+ tolerance: 4,
+ extra: piConstants,
+ tests: [
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).x * kHalfPI + kHalfPI),",
+ " $(func)($(input).y * kHalfPI),",
+ " 0,",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ sin(x * kHalfPI + kHalfPI),
+ sin(y * kHalfPI),
+ 0,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).xy * vec2(kPI, k2PI)) * 0.5 + vec2(0.5, 0.5),",
+ " 0, 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ sin(x * kPI) * 0.5 + 0.5,
+ sin(y * k2PI) * 0.5 + 0.5,
+ 0,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = vec4(",
+ " $(func)($(input).xyz * vec3(kPI, k2PI, 4.0)) * ",
+ " 0.5 + vec3(0.5, 0.5, 0.5),",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ sin(x * kPI) * 0.5 + 0.5,
+ sin(y * k2PI) * 0.5 + 0.5,
+ sin(z * 4.0) * 0.5 + 0.5,
+ 1 ];
+ },
+ },
+ {
+ source: ["$(output) = ",
+ " $(func)($(input) * vec4(k2PI, 4.0, kHalfPI, kPI)) *",
+ " 0.5 + vec4(0.5, 0.5, 0.5, 1);",
+ ].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ sin(x * k2PI) * 0.5 + 0.5,
+ sin(y * 4.0) * 0.5 + 0.5,
+ sin(z * kHalfPI) * 0.5 + 0.5,
+ sin(w * kPI) * 0.5 + 1 ];
+ },
+ },
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-float.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-float.html
new file mode 100644
index 000000000..84bce2ff0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-float.html
@@ -0,0 +1,120 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL smoothstep-float function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+function clamp(value, min, max) {
+ return Math.max(min, Math.min(value, max));
+}
+
+function smoothstep(edge0, edge1, value) {
+ var t = clamp((value - edge0) / (edge1 - edge0), 0, 1);
+ return t * t * (3 - 2 * t);
+}
+
+GLSLGenerator.runReferenceImageTest({
+ feature: "smoothstep",
+ args: "float edge0, float edge1, $(type) value",
+ testFunc: "$(func)(float, float, $(type))",
+ gridRes: 8,
+ tolerance: 4,
+ tests: [
+ {
+ source: ["$(output) = vec4(",
+ " $(func)(0.3, 0.7, $(input).x),",
+ " $(func)(0.2, 0.8, $(input).y),",
+ " 0,",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ smoothstep(0.3, 0.7, x),
+ smoothstep(0.2, 0.8, y),
+ 0,
+ 1 ];
+ },
+ },
+ {
+ source: [ "$(output) = vec4(",
+ " $(func)(0.4, 0.8, $(input).xy),",
+ " 0, 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ smoothstep(0.4, 0.8, x),
+ smoothstep(0.4, 0.8, y),
+ 0,
+ 1 ];
+ },
+ },
+ {
+ // FIXME: this test seems to need a higher tolerance when run in a vertex shader.
+ source: [ "$(output) = vec4(",
+ " $(func)(0.3, 0.7, $(input).xyz),",
+ " 1);"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ smoothstep(0.3, 0.7, x),
+ smoothstep(0.3, 0.7, y),
+ smoothstep(0.3, 0.7, z),
+ 1 ];
+ },
+ tolerance: 12,
+ fragmentTolerance: 3,
+ },
+ {
+ // FIXME: this test seems to need a higher tolerance when run in a vertex shader.
+ source: ["$(output) = ",
+ " $(func)(0.3, 0.9, $(input));"].join("\n"),
+ generator: function(x, y, z, w) {
+ return [ smoothstep(0.3, 0.9, x),
+ smoothstep(0.3, 0.9, y),
+ smoothstep(0.3, 0.9, z),
+ smoothstep(0.3, 0.9, w) ];
+ },
+ tolerance: 7,
+ fragmentTolerance: 3,
+ },
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-gentype.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-gentype.html
new file mode 100644
index 000000000..18e7fc129
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-gentype.html
@@ -0,0 +1,81 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL smoothstep-gentype function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+
+GLSLGenerator.runFeatureTest({
+ feature: "smoothstep",
+ args: "$(type) edge0, $(type) edge1, $(type) value",
+ baseArgs: "edge0$(field), edge1$(field), value$(field)",
+ testFunc: "$(func)($(type), $(type), $(type))",
+ emuFunc: ["float $(func)_base(float edge0, float edge1, float value) {",
+ " float t = clamp((value - edge0) / (edge1 - edge0), 0.0, 1.0);",
+ " return t * t * (3.0 - 2.0 * t);",
+ "}"].join("\n"),
+ gridRes: 8,
+ tolerance: 1,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)(0.3, 0.7, $(input).x),",
+ " $(func)(0.2, 0.8, $(input).y),",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(vec2(0.4, 0.6), vec2(0.8, 0.9), $(input).xy),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(vec3(0.3, 0.5, 0.7), vec3(0.7, 0.9, 1.0), $(input).xyz),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)(vec4(0.3, 0.4, 0.5, 0.2), ",
+ " vec4(0.7, 0.6, 0.9, 0.8), ",
+ " $(input));"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-float.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-float.html
new file mode 100644
index 000000000..1de1c5d14
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-float.html
@@ -0,0 +1,75 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL step-float function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "step",
+ args: "float edge, $(type) value",
+ baseArgs: "edge, value$(field)",
+ testFunc: "$(func)(float, $(type))",
+ emuFunc: ["float $(func)_base(float edge, float value) {",
+ " return value < edge ? 0.0 : 1.0;",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)(0.3, $(input).x),",
+ " $(func)(0.7, $(input).y),",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(0.4, $(input).xy),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(0.4, $(input).xyz),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)(0.4, $(input));"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-gentype.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-gentype.html
new file mode 100644
index 000000000..d424e5547
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-gentype.html
@@ -0,0 +1,75 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL step-gentype function test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "step",
+ args: "$(type) edge, $(type) value",
+ baseArgs: "edge$(field), value$(field)",
+ testFunc: "$(func)($(type), $(type))",
+ emuFunc: ["float $(func)_base(float edge, float value) {",
+ " return value < edge ? 0.0 : 1.0;",
+ "}"].join("\n"),
+ gridRes: 8,
+ tests: [
+ ["$(output) = vec4(",
+ " $(func)(0.3, $(input).x),",
+ " $(func)(0.7, $(input).y),",
+ " 0,",
+ " 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(vec2(0.4, 0.6), $(input).xy),",
+ " 0, 1);"].join("\n"),
+ ["$(output) = vec4(",
+ " $(func)(vec3(0.3, 0.5, 0.7), $(input).xyz),",
+ " 1);"].join("\n"),
+ ["$(output) = ",
+ " $(func)( vec4(0.3, 0.4, 0.5, 0.2), $(input));"].join("\n")
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function.html
new file mode 100644
index 000000000..55392f524
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL function test test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+GLSLGenerator.runFeatureTest({
+ feature: "the_GLSL_test_harness",
+ testFunc: "pass through",
+ emuFunc: "float $(func)_base(float value) { return 0.0; }",
+ gridRes: 4,
+ tests: [
+ "$(output) = vec4($(input).x, 0, 0, 1);",
+ "$(output) = vec4(0, $(input).xy, 1);",
+ "$(output) = vec4($(input).xyz, 1);",
+ "$(output) = $(input);"
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/00_test_list.txt
new file mode 100644
index 000000000..d700b29a5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/00_test_list.txt
@@ -0,0 +1,65 @@
+add_int_float.vert.html
+add_int_mat2.vert.html
+add_int_mat3.vert.html
+add_int_mat4.vert.html
+add_int_vec2.vert.html
+add_int_vec3.vert.html
+add_int_vec4.vert.html
+add_ivec2_vec2.vert.html
+add_ivec3_vec3.vert.html
+add_ivec4_vec4.vert.html
+assign_int_to_float.vert.html
+assign_ivec2_to_vec2.vert.html
+assign_ivec3_to_vec3.vert.html
+assign_ivec4_to_vec4.vert.html
+construct_struct.vert.html
+divide_int_float.vert.html
+divide_int_mat2.vert.html
+divide_int_mat3.vert.html
+divide_int_mat4.vert.html
+divide_int_vec2.vert.html
+divide_int_vec3.vert.html
+divide_int_vec4.vert.html
+divide_ivec2_vec2.vert.html
+divide_ivec3_vec3.vert.html
+divide_ivec4_vec4.vert.html
+equal_int_float.vert.html
+equal_ivec2_vec2.vert.html
+equal_ivec3_vec3.vert.html
+equal_ivec4_vec4.vert.html
+function_int_float.vert.html
+function_ivec2_vec2.vert.html
+function_ivec3_vec3.vert.html
+function_ivec4_vec4.vert.html
+greater_than.vert.html
+greater_than_equal.vert.html
+less_than.vert.html
+less_than_equal.vert.html
+multiply_int_float.vert.html
+multiply_int_mat2.vert.html
+multiply_int_mat3.vert.html
+multiply_int_mat4.vert.html
+multiply_int_vec2.vert.html
+multiply_int_vec3.vert.html
+multiply_int_vec4.vert.html
+multiply_ivec2_vec2.vert.html
+multiply_ivec3_vec3.vert.html
+multiply_ivec4_vec4.vert.html
+not_equal_int_float.vert.html
+not_equal_ivec2_vec2.vert.html
+not_equal_ivec3_vec3.vert.html
+not_equal_ivec4_vec4.vert.html
+subtract_int_float.vert.html
+subtract_int_mat2.vert.html
+subtract_int_mat3.vert.html
+subtract_int_mat4.vert.html
+subtract_int_vec2.vert.html
+subtract_int_vec3.vert.html
+subtract_int_vec4.vert.html
+subtract_ivec2_vec2.vert.html
+subtract_ivec3_vec3.vert.html
+subtract_ivec4_vec4.vert.html
+ternary_int_float.vert.html
+ternary_ivec2_vec2.vert.html
+ternary_ivec3_vec3.vert.html
+ternary_ivec4_vec4.vert.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_float.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_float.vert.html
new file mode 100644
index 000000000..812915404
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_float.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast adding integer to float should fail
+void main()
+{
+ float f = 1.0 + 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat2.vert.html
new file mode 100644
index 000000000..7cf150a71
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast adding integer to mat2 should fail
+void main()
+{
+ mat2 f = mat2(1.0) + 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat3.vert.html
new file mode 100644
index 000000000..d59b89376
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast adding integer to mat3 should fail
+void main()
+{
+ mat3 f = mat3(1.0) + 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat4.vert.html
new file mode 100644
index 000000000..187450862
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast adding integer to mat4 should fail
+void main()
+{
+ mat4 f = mat4(1.0) + 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec2.vert.html
new file mode 100644
index 000000000..6d2cc5e3a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast adding integer to vec2 should fail
+void main()
+{
+ vec2 f = vec2(1.0, 2.0) + 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec3.vert.html
new file mode 100644
index 000000000..163683b34
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast adding integer to vec3 should fail
+void main()
+{
+ vec3 f = vec3(1.0, 2.0, 3.0) + 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec4.vert.html
new file mode 100644
index 000000000..81183d8ce
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast adding integer to vec4 should fail
+void main()
+{
+ vec4 f = vec4(1.0, 2.0, 3.0, 4.0) + 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec2_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec2_vec2.vert.html
new file mode 100644
index 000000000..76ba85ceb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec2_vec2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast adding ivec2 to vec2 should fail
+void main()
+{
+ vec2 f = vec2(1.0, 2.0) + ivec2(1, 2);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec3_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec3_vec3.vert.html
new file mode 100644
index 000000000..e7ef89778
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec3_vec3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast adding ivec3 to vec3 should fail
+void main()
+{
+ vec3 f = vec3(1.0, 2.0, 3.0) + ivec3(1, 2, 3);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec4_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec4_vec4.vert.html
new file mode 100644
index 000000000..9581bbda8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec4_vec4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast adding ivec4 to vec4 should fail
+void main()
+{
+ vec4 f = vec4(1.0, 2.0, 3.0, 4.0) + ivec4(1, 2, 3, 4);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_int_to_float.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_int_to_float.vert.html
new file mode 100644
index 000000000..a631cc2ef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_int_to_float.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast assing int to float should fail
+void main()
+{
+ float f = -123;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec2_to_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec2_to_vec2.vert.html
new file mode 100644
index 000000000..36e66a3fa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec2_to_vec2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast assigning ivec2 to vec2 should fail
+void main()
+{
+ vec2 f = ivec2(1, 2);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec3_to_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec3_to_vec3.vert.html
new file mode 100644
index 000000000..6b74005e7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec3_to_vec3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast assigning ivec3 to vec3 should fail
+void main()
+{
+ vec3 f = ivec3(1, 2, 3);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec4_to_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec4_to_vec4.vert.html
new file mode 100644
index 000000000..3846193ff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec4_to_vec4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast assigning ivec4 to vec4 should fail
+void main()
+{
+ vec4 f = ivec4(1, 2, 3, 4);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/construct_struct.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/construct_struct.vert.html
new file mode 100644
index 000000000..c837e1ff4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/construct_struct.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast from int to float in struct initializer should fail
+struct Foo {
+ float bar;
+};
+
+void main() {
+ Foo foo = Foo(1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_float.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_float.vert.html
new file mode 100644
index 000000000..fea373436
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_float.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of float divided by int should fail
+void main()
+{
+ float f = 1.0 / 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat2.vert.html
new file mode 100644
index 000000000..62d0ea0e1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of mat2 divided by int should fail
+void main()
+{
+ mat2 f = mat2(1.0) / 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat3.vert.html
new file mode 100644
index 000000000..58c18b61a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of mat3 divided by int should fail
+void main()
+{
+ mat3 f = mat3(1.0) / 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat4.vert.html
new file mode 100644
index 000000000..d6dba4683
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of mat4 divided by int should fail
+void main()
+{
+ mat4 f = mat4(1.0) / 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec2.vert.html
new file mode 100644
index 000000000..2f50269ab
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of vec2 divided by int should fail
+void main()
+{
+ vec2 f = vec2(1.0, 2.0) / 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec3.vert.html
new file mode 100644
index 000000000..397c758ec
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of vec3 divided by int should fail
+void main()
+{
+ vec3 f = vec3(1.0, 2.0, 3.0) / 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec4.vert.html
new file mode 100644
index 000000000..94b9b4afc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of vec4 divided by int should fail
+void main()
+{
+ vec4 f = vec4(1.0, 2.0, 3.0, 4.0) / 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec2_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec2_vec2.vert.html
new file mode 100644
index 000000000..d13d5a643
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec2_vec2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of vec2 divided by ivec2 should fail
+void main()
+{
+ vec2 f = vec2(1.0, 2.0) / ivec2(1, 2);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec3_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec3_vec3.vert.html
new file mode 100644
index 000000000..d074fe196
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec3_vec3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of vec3 divided by ivec3 should fail
+void main()
+{
+ vec3 f = vec3(1.0, 2.0, 3.0) / ivec3(1, 2, 3);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec4_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec4_vec4.vert.html
new file mode 100644
index 000000000..a6b2307e5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec4_vec4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of vec4 divided by ivec4 should fail
+void main()
+{
+ vec4 f = vec4(1.0, 2.0, 3.0, 4.0) / ivec4(1, 2, 3, 4);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_int_float.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_int_float.vert.html
new file mode 100644
index 000000000..a9ca0b1ed
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_int_float.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to float in comparision should fail
+void main()
+{
+ bool b = 1.0 == 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec2_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec2_vec2.vert.html
new file mode 100644
index 000000000..275023160
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec2_vec2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec2 to vec2 in comparision should fail
+void main()
+{
+ bool b = vec2(1.0, 2.0) == ivec2(1, 2);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec3_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec3_vec3.vert.html
new file mode 100644
index 000000000..cc167b91b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec3_vec3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec3 to vec3 in comparision should fail
+void main()
+{
+ bool b = vec3(1.0, 2.0, 3.0) == ivec3(1, 2, 3);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec4_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec4_vec4.vert.html
new file mode 100644
index 000000000..31dbfddc1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec4_vec4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec4 to vec4 in comparision should fail
+void main()
+{
+ bool b = vec4(1.0, 2.0, 3.0, 4.0) == ivec4(1, 2, 3, 4);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_int_float.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_int_float.vert.html
new file mode 100644
index 000000000..a086572ce
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_int_float.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to float in function argument should fail
+float foo(float f) {
+ return f;
+}
+
+void main() {
+ float f = foo(1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec2_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec2_vec2.vert.html
new file mode 100644
index 000000000..19e4f04e4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec2_vec2.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec2 to vec2 in function argument should fail
+vec2 foo(vec2 f) {
+ return f;
+}
+
+void main() {
+ vec2 f = foo(ivec2(1, 2));
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec3_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec3_vec3.vert.html
new file mode 100644
index 000000000..d0e7873cc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec3_vec3.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec3 to vec3 in function argument should fail
+vec3 foo(vec3 f) {
+ return f;
+}
+
+void main() {
+ vec3 f = foo(ivec3(1, 2, 3));
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec4_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec4_vec4.vert.html
new file mode 100644
index 000000000..5b4ec18b7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec4_vec4.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec4 to vec4 in function argument should fail
+vec4 foo(vec4 f) {
+ return f;
+}
+
+void main() {
+ vec4 f = foo(ivec4(1, 2, 3, 4));
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than.vert.html
new file mode 100644
index 000000000..158fc119a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to float with greater than should fail
+void main()
+{
+ bool b = 1.0 > 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than_equal.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than_equal.vert.html
new file mode 100644
index 000000000..580387b0d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than_equal.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to float with greater than or equal to should fail
+void main()
+{
+ bool b = 1.0 >= 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than.vert.html
new file mode 100644
index 000000000..03135f292
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to float with less than should fail
+void main()
+{
+ bool b = 1.0 < 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than_equal.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than_equal.vert.html
new file mode 100644
index 000000000..bfdb14235
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than_equal.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to float with less than or equal to should fail
+void main()
+{
+ bool b = 1.0 <= 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_float.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_float.vert.html
new file mode 100644
index 000000000..29cbbf92c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_float.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to float in multiply should fail
+void main()
+{
+ float f = 1.0 * 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat2.vert.html
new file mode 100644
index 000000000..293c57ffa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to mat2 in multiply should fail
+void main()
+{
+ mat2 f = mat2(1.0) * 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat3.vert.html
new file mode 100644
index 000000000..fb30d29c5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to mat3 in multiply should fail
+void main()
+{
+ mat3 f = mat3(1.0) * 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat4.vert.html
new file mode 100644
index 000000000..65585fd7f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to mat4 in multiply should fail
+void main()
+{
+ mat4 f = mat4(1.0) * 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec2.vert.html
new file mode 100644
index 000000000..26597311f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to vec2 in multiply should fail
+void main()
+{
+ vec2 f = vec2(1.0, 2.0) * 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec3.vert.html
new file mode 100644
index 000000000..1ee7c6cb1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to vec3 in multiply should fail
+void main()
+{
+ vec3 f = vec3(1.0, 2.0, 3.0) * 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec4.vert.html
new file mode 100644
index 000000000..e71cfc377
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to vec4 in multiply should fail
+void main()
+{
+ vec4 f = vec4(1.0, 2.0, 3.0, 4.0) * 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec2_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec2_vec2.vert.html
new file mode 100644
index 000000000..5fa51ef88
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec2_vec2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec2 to vec2 in multiply should fail
+void main()
+{
+ vec2 f = vec2(1.0, 2.0) * ivec2(1, 2);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec3_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec3_vec3.vert.html
new file mode 100644
index 000000000..a3312fff4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec3_vec3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec3 to vec3 in multiply should fail
+void main()
+{
+ vec3 f = vec3(1.0, 2.0, 3.0) * ivec3(1, 2, 3);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec4_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec4_vec4.vert.html
new file mode 100644
index 000000000..3586ed632
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec4_vec4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec4 to vec4 in multiply should fail
+void main()
+{
+ vec4 f = vec4(1.0, 2.0, 3.0, 4.0) * ivec4(1, 2, 3, 4);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_int_float.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_int_float.vert.html
new file mode 100644
index 000000000..a5d202b38
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_int_float.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to float in not equal comparison should fail
+void main()
+{
+ bool b = 1.0 != 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec2_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec2_vec2.vert.html
new file mode 100644
index 000000000..5207c25e3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec2_vec2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec2 to vec2 in not equal comparison should fail
+void main()
+{
+ bool b = vec2(1.0, 2.0) != ivec2(1, 2);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec3_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec3_vec3.vert.html
new file mode 100644
index 000000000..b20e2a52c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec3_vec3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec3 to vec3 in not equal comparison should fail
+void main()
+{
+ bool b = vec3(1.0, 2.0, 3.0) != ivec3(1, 2, 3);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec4_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec4_vec4.vert.html
new file mode 100644
index 000000000..ac0e07f24
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec4_vec4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec4 to vec4 in not equal comparison should fail
+void main()
+{
+ bool b = vec4(1.0, 2.0, 3.0, 4.0) != ivec4(1, 2, 3, 4);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_float.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_float.vert.html
new file mode 100644
index 000000000..e83979b89
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_float.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to float in subtraction should fail
+void main()
+{
+ float f = 1.0 - 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat2.vert.html
new file mode 100644
index 000000000..037895093
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to mat2 in subtraction should fail
+void main()
+{
+ mat2 f = mat2(1.0) - 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat3.vert.html
new file mode 100644
index 000000000..33a19c344
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to mat3 in subtraction should fail
+void main()
+{
+ mat3 f = mat3(1.0) - 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat4.vert.html
new file mode 100644
index 000000000..f53d782be
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to mat4 in subtraction should fail
+void main()
+{
+ mat4 f = mat4(1.0) - 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec2.vert.html
new file mode 100644
index 000000000..eb0c4716e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to vec2 in subtraction should fail
+void main()
+{
+ vec2 f = vec2(1.0, 2.0) - 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec3.vert.html
new file mode 100644
index 000000000..519c4d6ae
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to vec3 in subtraction should fail
+void main()
+{
+ vec3 f = vec3(1.0, 2.0, 3.0) - 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec4.vert.html
new file mode 100644
index 000000000..c168382bc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to vec4 in subtraction should fail
+void main()
+{
+ vec4 f = vec4(1.0, 2.0, 3.0, 4.0) - 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec2_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec2_vec2.vert.html
new file mode 100644
index 000000000..0a3c34315
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec2_vec2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec2 to vec2 in subtraction should fail
+void main()
+{
+ vec2 f = vec2(1.0, 2.0) - ivec2(1, 2);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec3_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec3_vec3.vert.html
new file mode 100644
index 000000000..93b72932e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec3_vec3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec3 to vec3 in subtraction should fail
+void main()
+{
+ vec3 f = vec3(1.0, 2.0, 3.0) - ivec3(1, 2, 3);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec4_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec4_vec4.vert.html
new file mode 100644
index 000000000..d8b396b52
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec4_vec4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec4 to vec4 in subtraction should fail
+void main()
+{
+ vec4 f = vec4(1.0, 2.0, 3.0, 4.0) - ivec4(1, 2, 3, 4);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_int_float.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_int_float.vert.html
new file mode 100644
index 000000000..41cae76bf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_int_float.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of int to float in ternary expression should fail
+void main()
+{
+ float f = true ? 1.0 : 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec2_vec2.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec2_vec2.vert.html
new file mode 100644
index 000000000..376322683
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec2_vec2.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec2 to vec2 in ternary expression should fail
+void main()
+{
+ vec2 f = true ? vec2(1.0, 2.0) : ivec2(1, 2);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec3_vec3.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec3_vec3.vert.html
new file mode 100644
index 000000000..d5e18d247
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec3_vec3.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec3 to vec3 in ternary expression should fail
+void main()
+{
+ vec3 f = true ? vec3(1.0, 2.0, 3.0) : ivec3(1, 2, 3);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec4_vec4.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec4_vec4.vert.html
new file mode 100644
index 000000000..40084a7a3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec4_vec4.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// implicit cast of ivec4 to vec4 in ternary expression should fail
+void main()
+{
+ vec4 f = true ? vec4(1.0, 2.0, 3.0, 4.0) : ivec4(1, 2, 3, 4);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/00_test_list.txt
new file mode 100644
index 000000000..50802bf34
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/00_test_list.txt
@@ -0,0 +1,3 @@
+float_literal.vert.html
+--min-version 1.0.3 literal_precision.html
+overflow_leak.vert.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/float_literal.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/float_literal.vert.html
new file mode 100644
index 000000000..f871cadee
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/float_literal.vert.html
@@ -0,0 +1,76 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// parsing floating point literals should succeed
+void main() {
+ float zero = 0.0;
+ float fractionalConstant = 1.0;
+ float fractionalConstantExponent = 1.0e1;
+ float fractionalConstantPosExponent = 1.0e+1;
+ float fractionalConstantNegExponent = 1.0e-1;
+ float digitSequenceExponent = 1e1;
+ float digitSequencePosExponent = 1e+1;
+ float digitSequenceNegExponent = 1e-1;
+ float pointDigit = .1;
+ float digitPoint= 1.;
+ float upperCaseExponent = 1.0E1;
+ highp float posInRange = 4611686018427387903.; // 2^62 - 1
+ highp float posOutRange = 4611686018427387905.; // 2^62 + 1
+ highp float posHuge = 1E100;
+ highp float negInRange = -4611686018427387903.;
+ highp float negOutRange = -4611686018427387905.;
+ highp float negHuge = -1E100;
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/literal_precision.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/literal_precision.html
new file mode 100644
index 000000000..7df690981
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/literal_precision.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// parsing floating point literals with precision should fail
+void main() {
+ mediump float zero = mediump 0.0;
+ gl_Position = vec4(zero, 0.0, 0.0, 1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/overflow_leak.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/overflow_leak.vert.html
new file mode 100644
index 000000000..1d9711129
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/literals/overflow_leak.vert.html
@@ -0,0 +1,86 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="example" width="2" height="2"> </canvas>
+<script id="vshader" type="x-shader/x-vertex">
+// float literal overflow should not affect next literal parsing.
+precision mediump float;
+
+varying vec4 v_color;
+attribute vec4 a_position;
+void main() {
+ highp float floatOverflow = 1E100;
+ int i = 10;
+ if (i == 10)
+ v_color = vec4(0.0, 1.0, 0.0, 1.0);
+ else
+ v_color = vec4(1.0, 0.0, 0.0, 1.0);
+ gl_Position = a_position;
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+
+varying vec4 v_color;
+void main() {
+ gl_FragColor = v_color;
+}
+</script>
+<script>
+"use strict";
+description();
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+wtu.setupUnitQuad(gl);
+var program = wtu.setupProgram(gl, ["vshader", "fshader"]);
+if (!program)
+ testFailed("Fail to setup program");
+wtu.clearAndDrawUnitQuad(gl);
+wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/matrices/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/matrices/00_test_list.txt
new file mode 100644
index 000000000..91b4ce21f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/matrices/00_test_list.txt
@@ -0,0 +1,2 @@
+glsl-mat4-to-mat3.html
+--min-version 1.0.3 glsl-mat3-construction.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat3-construction.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat3-construction.html
new file mode 100644
index 000000000..93a49781e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat3-construction.html
@@ -0,0 +1,95 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL mat3 construction test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="shader_emu" type="something-not-js">
+mat3 mat3_emu(vec3 v3_0, vec3 v3_1, vec3 v3_2) {
+ mat3 test;
+ test[0] = v3_0;
+ test[1] = v3_1;
+ test[2] = v3_2;
+ return test;
+}
+</script>
+<script id="shader_test" type="something-not-js">
+ vec3 v3 = vec3($(input).xyz);
+ mat3 m3 = $(conversion)(v3, v3, v3);
+ vec3 c;
+ if ($(input).y < 0.33) {
+ c = m3[0];
+ } else if ($(input).y > 0.66) {
+ c = m3[1];
+ } else {
+ c = m3[2];
+ }
+ $(output) = vec4(c, 1);
+</script>
+<script>
+"use strict";
+// See resources glsl-generator runBasicTest for how this works
+var wtu = WebGLTestUtils;
+GLSLGenerator.runBasicTest({
+ gridRes: 8,
+ tests: [
+ {
+ name: "vec3 to mat3",
+ reference: {
+ shader: wtu.getScript("shader_test"),
+ subs: {
+ emu: wtu.getScript("shader_emu"),
+ conversion: "mat3_emu"
+ }
+ },
+ test: {
+ shader: wtu.getScript("shader_test"),
+ subs: {
+ conversion: "mat3"
+ },
+ }
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat4-to-mat3.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat4-to-mat3.html
new file mode 100644
index 000000000..cdf252a4e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat4-to-mat3.html
@@ -0,0 +1,94 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>GLSL mat4 to mat3 test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/glsl-generator.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="shader_emu" type="something-not-js">
+mat3 mat3_emu(mat4 m4) {
+ return mat3(
+ m4[0][0], m4[0][1], m4[0][2],
+ m4[1][0], m4[1][1], m4[1][2],
+ m4[2][0], m4[2][1], m4[2][2]);
+}
+</script>
+<script id="shader_test" type="something-not-js">
+ mat4 m4 = mat4($(input), $(input).yzwx, $(input).zwxy, $(input).wxyz);
+ mat3 m3 = $(conversion)(m4);
+ vec3 c;
+ if ($(input).y < 0.33) {
+ c = m3[0];
+ } else if ($(input).y > 0.66) {
+ c = m3[1];
+ } else {
+ c = m3[2];
+ }
+ $(output) = vec4(c, 1);
+</script>
+<script>
+"use strict";
+// See resources glsl-generator runBasicTest for how this works
+var wtu = WebGLTestUtils;
+GLSLGenerator.runBasicTest({
+ gridRes: 8,
+ tests: [
+ {
+ name: "mat4 to mat3",
+ reference: {
+ shader: wtu.getScript("shader_test"),
+ subs: {
+ emu: wtu.getScript("shader_emu"),
+ conversion: "mat3_emu"
+ }
+ },
+ test: {
+ shader: wtu.getScript("shader_test"),
+ subs: {
+ conversion: "mat3"
+ },
+ }
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/00_test_list.txt
new file mode 100644
index 000000000..0c8859b9f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/00_test_list.txt
@@ -0,0 +1,106 @@
+attrib-location-length-limits.html
+--min-version 1.0.3 boolean_precision.html
+embedded-struct-definitions-forbidden.html
+empty_main.vert.html
+--min-version 1.0.3 expression-list-in-declarator-initializer.html
+gl_position_unset.vert.html
+# this test is intentionally disabled as it is too strict and to hard to simulate
+# glsl-2types-of-textures-on-same-unit.html
+glsl-function-nodes.html
+--min-version 1.0.2 glsl-vertex-branch.html
+glsl-long-variable-names.html
+non-ascii-comments.vert.html
+non-ascii.vert.html
+--min-version 1.0.2 re-compile-re-link.html
+--min-version 1.0.3 shader-precision-format-obeyed.html
+--min-version 1.0.3 shader-struct-scope.html
+--min-version 1.0.2 shader-uniform-packing-restrictions.html
+--min-version 1.0.2 shader-varying-packing-restrictions.html
+--min-version 1.0.2 shader-with-256-character-define.html
+shader-with-256-character-identifier.frag.html
+--min-version 1.0.2 shader-with-257-character-define.html
+shader-with-257-character-identifier.frag.html
+shader-with-_webgl-identifier.vert.html
+shader-with-arbitrary-indexing.frag.html
+shader-with-arbitrary-indexing.vert.html
+--min-version 1.0.2 shader-with-array-of-structs-containing-arrays.html
+--min-version 1.0.2 shader-with-array-of-structs-uniform.html
+shader-with-attrib-array.vert.html
+shader-with-attrib-struct.vert.html
+shader-with-clipvertex.vert.html
+--min-version 1.0.2 shader-with-conditional-scoping.html
+--min-version 1.0.2 shader-with-conditional-scoping-negative.html
+shader-with-default-precision.frag.html
+shader-with-default-precision.vert.html
+shader-with-define-line-continuation.frag.html
+shader-with-dfdx-no-ext.frag.html
+shader-with-dfdx.frag.html
+--min-version 1.0.2 shader-with-do-loop.html
+shader-with-error-directive.html
+shader-with-explicit-int-cast.vert.html
+shader-with-float-return-value.frag.html
+--min-version 1.0.2 shader-with-for-scoping.html
+--min-version 1.0.2 shader-with-for-loop.html
+shader-with-frag-depth.frag.html
+shader-with-function-recursion.frag.html
+--min-version 1.0.2 shader-with-function-scoped-struct.html
+--min-version 1.0.2 shader-with-functional-scoping.html
+--min-version 1.0.2 shader-with-comma-assignment.html
+--min-version 1.0.2 shader-with-comma-conditional-assignment.html
+shader-with-glcolor.vert.html
+shader-with-gles-1.frag.html
+shader-with-gles-symbol.frag.html
+shader-with-glprojectionmatrix.vert.html
+shader-with-implicit-vec3-to-vec4-cast.vert.html
+shader-with-include.vert.html
+shader-with-int-return-value.frag.html
+shader-with-invalid-identifier.frag.html
+shader-with-ivec2-return-value.frag.html
+shader-with-ivec3-return-value.frag.html
+shader-with-ivec4-return-value.frag.html
+shader-with-limited-indexing.frag.html
+--min-version 1.0.2 shader-with-hex-int-constant-macro.html
+shader-with-long-line.html
+shader-with-non-ascii-error.frag.html
+--min-version 1.0.2 shader-with-non-reserved-words.html
+shader-with-precision.frag.html
+--min-version 1.0.3 shader-with-preprocessor-whitespace.html
+shader-with-quoted-error.frag.html
+--min-version 1.0.2 shader-with-reserved-words.html
+--min-version 1.0.2 shader-with-similar-uniform-array-names.html
+--min-version 1.0.2 shader-with-too-many-uniforms.html
+shader-with-undefined-preprocessor-symbol.frag.html
+shader-with-uniform-in-loop-condition.vert.html
+shader-with-vec2-return-value.frag.html
+shader-with-vec3-return-value.frag.html
+shader-with-vec4-return-value.frag.html
+--min-version 1.0.2 shader-with-vec4-vec3-vec4-conditional.html
+shader-with-version-100.frag.html
+shader-with-version-100.vert.html
+shader-with-version-120.vert.html
+shader-with-version-130.vert.html
+shader-with-webgl-identifier.vert.html
+--min-version 1.0.2 shader-with-while-loop.html
+shader-without-precision.frag.html
+--min-version 1.0.3 shaders-with-constant-expression-loop-conditions.html
+--min-version 1.0.3 shaders-with-invariance.html
+--min-version 1.0.3 shaders-with-name-conflicts.html
+--min-version 1.0.2 shaders-with-mis-matching-uniforms.html
+--min-version 1.0.2 shaders-with-mis-matching-varyings.html
+--min-version 1.0.2 shaders-with-missing-varyings.html
+--min-version 1.0.3 shaders-with-uniform-structs.html
+--min-version 1.0.2 shaders-with-varyings.html
+shared.html
+struct-nesting-exceeds-maximum.html
+struct-nesting-under-maximum.html
+uniform-location-length-limits.html
+--min-version 1.0.2 shader-with-short-circuiting-operators.html
+--min-version 1.0.2 shader-with-global-variable-precision-mismatch.html
+--min-version 1.0.2 large-loop-compile.html
+--min-version 1.0.3 struct-equals.html
+--min-version 1.0.3 struct-mixed-array-declarators.html
+--min-version 1.0.3 struct-nesting-of-variable-names.html
+--min-version 1.0.3 struct-specifiers-in-uniforms.html
+--min-version 1.0.3 struct-unary-operators.html
+--min-version 1.0.3 ternary-operators-in-global-initializers.html
+--min-version 1.0.3 ternary-operators-in-initializers.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/attrib-location-length-limits.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/attrib-location-length-limits.html
new file mode 100644
index 000000000..24a382699
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/attrib-location-length-limits.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<title>WebGL attrib location length tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+There is supposed to be an example drawing here, but it's not important.
+</canvas>
+<div id="description">Verify limits on the lengths of attribute locations per WebGL spec, "Maximum Uniform and Attribute Location Lengths".</div>
+<div id="console"></div>
+<script id="goodVertexShader" type="x-shader/x-vertex">
+// A vertex shader where the needed attrib location is exactly 256 characters.
+attribute vec4 vPosition0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;
+
+void main()
+{
+ gl_Position = vPosition0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;
+}
+</script>
+<script id="badVertexShader" type="x-shader/x-vertex">
+// A vertex shader where the needed attrib location is 257 characters.
+attribute vec4 vPosition01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567;
+
+void main()
+{
+ gl_Position = vPosition01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567;
+}
+</script>
+<script id="fragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+
+void main() {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+<script>
+"use strict";
+description("test attrib location length limit");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+debug("Test attrib location underneath the length limit");
+var program = wtu.loadProgramFromScript(gl, "goodVertexShader", "fragmentShader");
+shouldBe('gl.getProgramParameter(program, gl.LINK_STATUS)', 'true');
+var attribLoc = gl.getAttribLocation(program, "vPosition0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456");
+if (attribLoc == -1) {
+ testFailed("attrib location was -1, should not be");
+} else {
+ testPassed("attrib location should not be -1");
+}
+wtu.glErrorShouldBe(gl, gl.NONE);
+
+debug("Test attrib location over the length limit");
+debug("Shader compilation or link should fail");
+shouldBe('wtu.loadProgramFromScriptExpectError(gl, "badVertexShader", "fragmentShader")', 'null');
+wtu.glErrorShouldBe(gl, gl.NONE);
+
+debug("Attempt to bind too-long attrib location should produce error");
+program = gl.createProgram();
+gl.bindAttribLocation(program, 0, "vPosition01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567");
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
+
+debug("Attempt to fetch too-long attrib location should produce error");
+program = wtu.loadStandardProgram(gl);
+shouldBe('gl.getAttribLocation(program, "vPosition01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567")', '-1');
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/boolean_precision.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/boolean_precision.html
new file mode 100644
index 000000000..2066722be
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/boolean_precision.html
@@ -0,0 +1,95 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexTest" type="text/something-not-javascript">
+// parsing boolean variables with precision should fail
+void main() {
+ mediump $(type) fail = $(initializer);
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+<script id="fragmentTest" type="text/something-not-javascript">
+// parsing boolean variables with precision should fail
+void main() {
+ mediump $(type) fail = $(initializer);
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+
+var types = ['bool', 'bvec2', 'bvec3', 'bvec4'];
+var tests = [];
+var vTestSource = wtu.getScript("vertexTest");
+var fTestSource = wtu.getScript("fragmentTest");
+
+for (var i = 0; i < types.length; ++i) {
+ var initializer = 'true';
+ if (types[i] !== 'bool') {
+ initializer = types[i] + "(true";
+ for (var j = 0; j < i; ++j) {
+ initializer += ", true";
+ }
+ initializer += ")";
+ }
+ var subs = {type: types[i], initializer: initializer};
+ tests.push({
+ vShaderSource: wtu.replaceParams(vTestSource, subs),
+ vShaderSuccess: false,
+ passMsg: "vertex shader with a " + types[i] + " variable with precision should fail."
+ });
+ tests.push({
+ fShaderSource: wtu.replaceParams(fTestSource, subs),
+ fShaderSuccess: false,
+ passMsg: "fragment shader with a " + types[i] + " variable with precision should fail."
+ });
+}
+GLSLConformanceTester.runTests(tests);
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/embedded-struct-definitions-forbidden.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/embedded-struct-definitions-forbidden.html
new file mode 100644
index 000000000..4a12d9c98
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/embedded-struct-definitions-forbidden.html
@@ -0,0 +1,64 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// embedded structure definitions are forbidden per GLSL ES section 4.1.8, "Structures", and should fail
+struct nesting1 {
+ struct nesting2 {
+ vec4 vector;
+ } field2;
+};
+
+uniform nesting1 uniform1;
+void main()
+{
+ gl_Position = uniform1.field2.vector;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/empty_main.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/empty_main.vert.html
new file mode 100644
index 000000000..3684248f5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/empty_main.vert.html
@@ -0,0 +1,56 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader with an empty main() should succeed
+void main() { }
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/expression-list-in-declarator-initializer.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/expression-list-in-declarator-initializer.html
new file mode 100644
index 000000000..0520ea7eb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/expression-list-in-declarator-initializer.html
@@ -0,0 +1,89 @@
+<!--
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<title></title>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+precision mediump float;
+void main() {
+ $(type) a, b;
+ $(type) c = (b = $(initializer), a = b);
+ gl_FragColor = $(asVec4);
+}
+</script>
+<script>
+"use strict";
+description("Verifies expression lists in declarator initializers work correctly.");
+var tests = [];
+var wtu = WebGLTestUtils;
+var typeInfos = [
+ { type: 'float', initializer: '1.0', asVec4: 'vec4(0.0,$(var),0.0,1.0)' },
+ { type: 'vec2', initializer: 'vec2(0.0, 1.0)', asVec4: 'vec4($(var),0.0,1.0)' },
+ { type: 'vec3', initializer: 'vec3(0.0, 1.0, 0.0)', asVec4: 'vec4($(var),1.0)' },
+ { type: 'vec4', initializer: 'vec4(0.0, 1.0, 0.0, 1.0)', asVec4: '$(var)' },
+ { type: 'int', initializer: '1', asVec4: 'vec4(0.0,$(var),0.0,1.0)' },
+ { type: 'ivec2', initializer: 'ivec2(0, 1)', asVec4: 'vec4($(var),0.0,1.0)' },
+ { type: 'ivec3', initializer: 'ivec3(0, 1, 0)', asVec4: 'vec4($(var),1.0)' },
+ { type: 'ivec4', initializer: 'ivec4(0, 1, 0, 1)', asVec4: 'vec4($(var))' },
+ { type: 'bool', initializer: 'true', asVec4: 'vec4(0.0,$(var),0.0,1.0)' },
+ { type: 'bvec2', initializer: 'bvec2(false, true)', asVec4: 'vec4($(var),0.0,1.0)' },
+ { type: 'bvec3', initializer: 'bvec3(false, true, false)', asVec4: 'vec4($(var),1.0)' },
+ { type: 'bvec4', initializer: 'bvec4(false,true,false,true)',asVec4: 'vec4($(var))' },
+];
+// Ensure that each variable is properly initialized to green, not just c.
+['a', 'b', 'c'].forEach(function(varName) {
+ typeInfos.forEach(function (typeInfo) {
+ var replaceParams = {
+ type: typeInfo.type,
+ initializer: typeInfo.initializer,
+ asVec4: wtu.replaceParams(typeInfo.asVec4, {var: varName}),
+ };
+ tests.push({
+ fShaderSource: wtu.replaceParams(wtu.getScript('fragmentShader'), replaceParams),
+ passMsg: typeInfo.type + ' with contents of ' + varName + ' rendered',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ render:true
+ });
+ });
+});
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/gl_position_unset.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/gl_position_unset.vert.html
new file mode 100644
index 000000000..b49c366b9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/gl_position_unset.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader without gl_Position being written should succeed
+void main() {
+ vec4 a = vec4(0.0, 0.0, 0.0, 1.0);
+ float f = a.x;
+ a.y = f;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-function-nodes.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-function-nodes.html
new file mode 100644
index 000000000..ca70c2ea1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-function-nodes.html
@@ -0,0 +1,158 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>GLSL function nodes Test</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+
+<script id="vshaderFunction" type="x-shader/x-vertex">
+attribute vec4 aPosition;
+varying vec4 vColor;
+
+float sign_emu(float value) {
+ if (value == 0.0) return 0.0;
+ return value > 0.0 ? 1.0 : -1.0;
+}
+
+void main()
+{
+ gl_Position = aPosition;
+ vec2 texcoord = vec2(aPosition.xy * 0.5 + vec2(0.5, 0.5));
+ vec4 color = vec4(
+ texcoord,
+ texcoord.x * texcoord.y,
+ (1.0 - texcoord.x) * texcoord.y * 0.5 + 0.5);
+ vColor = vec4(
+ sign_emu(color.x * 2.0 - 1.0) * 0.5 + 0.5,
+ sign_emu(color.y * 2.0 - 1.0) * 0.5 + 0.5,
+ 0,
+ 1);
+}
+</script>
+
+<script id="vshaderMacro" type="x-shader/x-vertex">
+attribute vec4 aPosition;
+varying vec4 vColor;
+
+#define sign_emu(value) ((value) == 0.0 ? 0.0 : ((value) > 0.0 ? 1.0 : -1.0))
+
+void main()
+{
+ gl_Position = aPosition;
+ vec2 texcoord = vec2(aPosition.xy * 0.5 + vec2(0.5, 0.5));
+ vec4 color = vec4(
+ texcoord,
+ texcoord.x * texcoord.y,
+ (1.0 - texcoord.x) * texcoord.y * 0.5 + 0.5);
+ vColor = vec4(
+ sign_emu(color.x * 2.0 - 1.0) * 0.5 + 0.5,
+ sign_emu(color.y * 2.0 - 1.0) * 0.5 + 0.5,
+ 0,
+ 1);
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 vColor;
+void main()
+{
+ gl_FragColor = vColor;
+}
+</script>
+</head>
+<body>
+<canvas id="canvasFunction" width="50" height="50"></canvas>
+<canvas id="canvasMacro" width="50" height="50"></canvas>
+<div id="description">This tests against a Mac driver bug related to function calls.</div>
+<div id="console"></div>
+<script>
+"use strict";
+var width = 50;
+var height = 50;
+var wtu = WebGLTestUtils;
+
+function drawAndRead(canvasID, vshaderID, buffer)
+{
+ var gl = wtu.create3DContext(canvasID);
+ var program = wtu.setupProgram(gl, [vshaderID, "fshader"], ["aPosition"]);
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buffer);
+ if (gl.getError() != gl.NO_ERROR)
+ return false;
+ return true;
+}
+
+function compareRendering(buffer1, buffer2, tol)
+{
+ for (var i = 0; i < width * height * 4; ++i) {
+ if (Math.abs(buffer1[i] - buffer2[i]) > tol)
+ return false;
+ }
+ return true;
+}
+
+function init()
+{
+ description("tests function nodes");
+
+ var bufFunction = new Uint8Array(width * height * 4);
+ var bufMacro = new Uint8Array(width * height * 4);
+
+ if (drawAndRead("canvasFunction", "vshaderFunction", bufFunction) == false ||
+ drawAndRead("canvasMacro", "vshaderMacro", bufMacro) == false) {
+ testFailed("Setup failed");
+ } else {
+ if (compareRendering(bufFunction, bufMacro, 4) == false)
+ testFailed("Rendering results are different");
+ else
+ testPassed("Rendering results are the same");
+ }
+}
+
+init();
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-long-variable-names.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-long-variable-names.html
new file mode 100644
index 000000000..fcd8ca63f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-long-variable-names.html
@@ -0,0 +1,249 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+ <title>glsl long variable name mapping tests</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+ <canvas id="example" width="50" height="50">
+ There is supposed to be an example drawing here, but it's not important.
+ </canvas>
+ <div id="description"></div>
+ <div id="console"></div>
+ <script id="vshader_shared_uniform" type="x-shader/x-vertex">
+ attribute vec3 vPosition;
+ uniform mediump float value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890;
+ void main()
+ {
+ gl_Position = vec4(vPosition, value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890);
+ }
+ </script>
+
+ <script id="fshader_shared_uniform" type="x-shader/x-fragment">
+ precision mediump float;
+ uniform float value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890;
+ void main()
+ {
+ gl_FragColor = vec4(1.0, 0.0, value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890, 1.0);
+ }
+ </script>
+
+ <script id="vshader_uniform_array" type="x-shader/x-vertex">
+ attribute vec3 vPosition;
+ void main()
+ {
+ gl_Position = vec4(vPosition, 1.0);
+ }
+ </script>
+
+ <script id="fshader_uniform_array" type="x-shader/x-fragment">
+ precision mediump float;
+ uniform float color01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567[2];
+ void main()
+ {
+ gl_FragColor = vec4(color01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567[0], color01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567[1], 1.0, 1.0);
+ }
+ </script>
+
+ <script id="vshader_varying" type="x-shader/x-vertex">
+ attribute vec3 vPosition;
+ varying float value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890;
+ void main()
+ {
+ value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 = 1.0;
+ gl_Position = vec4(vPosition, 1.0);
+ }
+ </script>
+
+ <script id="fshader_varying" type="x-shader/x-fragment">
+ precision mediump float;
+ varying float value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890;
+ void main()
+ {
+ gl_FragColor = vec4(value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890, 0.0, 1.0, 1.0);
+ }
+ </script>
+
+ <script id="vshader_local" type="x-shader/x-vertex">
+ attribute vec3 vPosition;
+ void main()
+ {
+ for (int i012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234 = 0; i012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234 < 1; ++i012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234)
+ {
+ gl_Position = vec4(vPosition, 1.0);
+ }
+ }
+ </script>
+
+ <script id="fshader_local" type="x-shader/x-fragment">
+ precision mediump float;
+ void main()
+ {
+ for (int i012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234 = 0; i012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234 < 1; ++i012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234)
+ {
+ gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);
+ }
+ }
+ </script>
+
+ <script id="vshader_attrib" type="x-shader/x-vertex">
+ attribute vec3 vPosition0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;
+ void main()
+ {
+ gl_Position = vec4(vPosition0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456, 1.0);
+ }
+ </script>
+
+ <script id="fshader_attrib" type="x-shader/x-fragment">
+ precision mediump float;
+ void main()
+ {
+ gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);
+ }
+ </script>
+
+ <script>
+ "use strict";
+ description("Verify that shader long variable names works fine if they are within 256 characters.");
+
+ debug("Test same long uniform name in both vertex shader and fragment shader");
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader_shared_uniform", "fshader_shared_uniform"], ["vPosition"]);
+ shouldBeNonNull("gl");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ var prog = gl.getParameter(gl.CURRENT_PROGRAM);
+ shouldBeNonNull("prog");
+ var valueLoc = gl.getUniformLocation(prog, "value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");
+ shouldBeNonNull("valueLoc");
+ shouldBe("gl.getProgramParameter(prog, gl.ACTIVE_UNIFORMS)", "1");
+ var activeUniform = gl.getActiveUniform(prog, 0);
+ shouldBeNonNull("activeUniform");
+ shouldBe("activeUniform.type", "gl.FLOAT");
+ shouldBe("activeUniform.size", "1");
+ shouldBe("activeUniform.name", "'value01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'");
+ gl.uniform1f(valueLoc, 1.0);
+ drawAndCheckPixels(gl);
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ debug("");
+
+ debug("Test long uniform array name");
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader_uniform_array", "fshader_uniform_array"], ["vPosition"]);
+ shouldBeNonNull("gl");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ var prog = gl.getParameter(gl.CURRENT_PROGRAM);
+ shouldBeNonNull("prog");
+ var redLoc = gl.getUniformLocation(prog, "color01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567[0]");
+ shouldBeNonNull("redLoc");
+ var greenLoc = gl.getUniformLocation(prog, "color01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567[1]");
+ shouldBeNonNull("greenLoc");
+ shouldBe("gl.getProgramParameter(prog, gl.ACTIVE_UNIFORMS)", "1");
+ var activeUniform = gl.getActiveUniform(prog, 0);
+ shouldBeNonNull("activeUniform");
+ shouldBe("activeUniform.type", "gl.FLOAT");
+ shouldBe("activeUniform.size", "2");
+ shouldBe("activeUniform.name", "'color01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567[0]'");
+ gl.uniform1f(redLoc, 1.0);
+ gl.uniform1f(greenLoc, 0.0);
+ drawAndCheckPixels(gl);
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ debug("");
+
+ debug("Test long varying name");
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader_varying", "fshader_varying"], ["vPosition"]);
+ shouldBeNonNull("gl");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ var prog = gl.getParameter(gl.CURRENT_PROGRAM);
+ shouldBeNonNull("prog");
+ drawAndCheckPixels(gl);
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ debug("");
+
+ debug("Test long local variable name");
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader_varying", "fshader_varying"], ["vPosition"]);
+ shouldBeNonNull("gl");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ var prog = gl.getParameter(gl.CURRENT_PROGRAM);
+ shouldBeNonNull("prog");
+ drawAndCheckPixels(gl);
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ debug("");
+
+ debug("Test long attribute name");
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader_attrib", "fshader_attrib"], ["vPosition0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"]);
+ shouldBeNonNull("gl");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ var prog = gl.getParameter(gl.CURRENT_PROGRAM);
+ shouldBeNonNull("prog");
+ shouldBe("gl.getProgramParameter(prog, gl.ACTIVE_ATTRIBUTES)", "1");
+ var activeAttrib = gl.getActiveAttrib(prog, 0);
+ shouldBeNonNull("activeAttrib");
+ shouldBe("activeAttrib.size", "1");
+ shouldBe("activeAttrib.type", "gl.FLOAT_VEC3");
+ shouldBe("activeAttrib.name", "'vPosition0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456'");
+ drawAndCheckPixels(gl);
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+ debug("");
+
+ function drawAndCheckPixels(gl)
+ {
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+
+ // Test several locations
+ // First line should be all black
+ wtu.checkCanvasRect(gl, 0, 0, 50, 1, [0, 0, 0, 0]);
+
+ // Line 15 should be magenta for at least 10 pixels starting 20 pixels in
+ wtu.checkCanvasRect(gl, 20, 15, 10, 1, [255, 0, 255, 255]);
+
+ // Last line should be all black
+ wtu.checkCanvasRect(gl, 0, 49, 50, 1, [0, 0, 0, 0]);
+ }
+
+ var successfullyParsed = true;
+ </script>
+ <script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-vertex-branch.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-vertex-branch.html
new file mode 100644
index 000000000..0d11862a6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-vertex-branch.html
@@ -0,0 +1,151 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>GLSL function nodes Test</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+
+<script id="vshaderNoBranch" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+uniform float redIntensity;
+
+varying vec4 vColor;
+
+float MADBug(float paramValue) {
+ float localVar = 1.0;
+ return 0.25 * ceil(localVar) + paramValue;
+}
+
+void main(void) {
+ gl_Position = vec4(aPosition, 1.0);
+ vColor = vec4(MADBug(redIntensity), 0., 0., 1.);
+}
+</script>
+
+<script id="vshaderBranch" type="x-shader/x-vertex">
+attribute vec3 aPosition;
+uniform float redIntensity;
+
+varying vec4 vColor;
+
+float MADBug(float paramValue) {
+ float localVar = 1.0;
+ return 0.25 * ceil(localVar) + paramValue;
+}
+
+void main(void) {
+ float condition = 42.;
+ if (condition == 0.) {}
+ gl_Position = vec4(aPosition, 1.0);
+ vColor = vec4(MADBug(redIntensity), 0., 0., 1.);
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+
+varying vec4 vColor;
+void main()
+{
+ gl_FragColor = vColor;
+}
+</script>
+</head>
+<body>
+<canvas id="canvasNoBranch" width="50" height="50"></canvas>
+<canvas id="canvasBranch" width="50" height="50"></canvas>
+<div id="description">This tests against a Mac driver bug related to branches
+ inside of Vertex Shaders.</div>
+<div id="console"></div>
+<script>
+"use strict";
+var width = 50;
+var height = 50;
+var wtu = WebGLTestUtils;
+
+function drawAndRead(canvasID, vshaderID, buffer)
+{
+ var gl = wtu.create3DContext(canvasID);
+ var program = wtu.setupProgram(gl, [vshaderID, "fshader"], ["aPosition"]);
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -1,-1,0, 1,-1,0 ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ var loc = gl.getUniformLocation(program, "redIntensity");
+ gl.uniform1f(loc, 0.75);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buffer);
+ if (gl.getError() != gl.NO_ERROR)
+ return false;
+ return true;
+}
+
+function compareRendering(buffer1, buffer2, tol)
+{
+ for (var i = 0; i < width * height * 4; ++i) {
+ if (Math.abs(buffer1[i] - buffer2[i]) > tol)
+ return false;
+ }
+ return true;
+}
+
+function init()
+{
+ description("tests vertex shader with branch");
+
+ var bufBranch = new Uint8Array(width * height * 4);
+ var bufNoBranch = new Uint8Array(width * height * 4);
+
+ if (drawAndRead("canvasBranch", "vshaderBranch", bufBranch) == false ||
+ drawAndRead("canvasNoBranch", "vshaderNoBranch", bufNoBranch) == false) {
+ testFailed("Setup failed");
+ } else {
+ if (compareRendering(bufBranch, bufNoBranch, 4) == false)
+ testFailed("Rendering results are different");
+ else
+ testPassed("Rendering results are the same");
+ }
+}
+
+init();
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/include.vs b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/include.vs
new file mode 100644
index 000000000..7096579f0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/include.vs
@@ -0,0 +1,4 @@
+// Do not delete!
+// Needed to help glsl-conformance tests.
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html
new file mode 100644
index 000000000..acb4629a1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html
@@ -0,0 +1,195 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+attribute vec2 position;
+
+void main(){
+ gl_Position = vec4(position, 0.0, 1.0);
+}
+</script>
+<script id="fragmentShader" type="text/something-not-javascript">
+precision mediump float;
+uniform sampler2D source;
+
+mat3 front = mat3(
+ 1.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0,
+ 0.0, 0.0, 1.0
+);
+
+mat3 back = mat3(
+ -1.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0,
+ 0.0, 0.0, -1.0
+);
+
+mat3 left = mat3(
+ 0.0, 0.0, -1.0,
+ 0.0, 1.0, 0.0,
+ 1.0, 0.0, 0.0
+);
+
+mat3 right = mat3(
+ 0.0, 0.0, 1.0,
+ 0.0, 1.0, 0.0,
+ -1.0, 0.0, 0.0
+);
+
+mat3 up = mat3(
+ 1.0, 0.0, 0.0,
+ 0.0, 0.0, 1.0,
+ 0.0, -1.0, 0.0
+);
+
+mat3 down = mat3(
+ 1.0, 0.0, 0.0,
+ 0.0, 0.0, -1.0,
+ 0.0, 1.0, 0.0
+);
+
+float coefficient(vec3 normal){
+ int index = int(gl_FragCoord.x);
+ float x = normal.x;
+ float y = normal.y;
+ float z = normal.z;
+
+ if(index==0){
+ return 1.0;
+ }
+ else if(index==1){
+ return y;
+ }
+ else if(index==2){
+ return z;
+ }
+ else if(index==3){
+ return x;
+ }
+ else if(index==4){
+ return x*y;
+ }
+ else if(index==5){
+ return y*z;
+ }
+ else if(index==6){
+ return 3.0*z*z - 1.0;
+ }
+ else if(index==7){
+ return x*z;
+ }
+ else{
+ return x*x - y*y;
+ }
+}
+
+vec3 sample(float cidx, mat3 side){
+ vec3 result = vec3(0.0);
+ float divider = 0.0;
+
+ for(int i=0; i<256; i++){
+ float x = mod(float(i), 16.0);
+ float y = float(i/16);
+ vec2 texcoord = (vec2(x+cidx*16.0, y+floor(gl_FragCoord.y)*16.0)+0.5)/6.0;
+ vec2 sidecoord = ((vec2(x,y)+vec2(0.5, 0.5))/vec2(16.0))*2.0-1.0;
+ vec3 normal = normalize(vec3(sidecoord, -1.0));
+ vec3 texel = texture2D(source, texcoord).rgb;
+ result += coefficient(side*normal) * texel * -normal.z;
+ divider += -normal.z;
+ }
+ return result/divider;
+}
+
+void main(){
+ vec3 result = (
+ //sample(0.0, front) +
+ //sample(1.0, back) +
+ sample(2.0, left) +
+ sample(3.0, right) +
+ sample(4.0, up) +
+ sample(5.0, down)
+ )/6.0;
+ gl_FragColor = vec4(result, 1.0);
+}
+</script>
+<script>
+"use strict";
+var receivedContextLost = false;
+description("Ensures that compilation of a large loop completes in a reasonable period of time and does not cause the WebGL context to be lost");
+var wtu = WebGLTestUtils;
+var canvas = document.createElement('canvas');
+canvas.width = 32;
+canvas.height = 32;
+canvas.addEventListener("webglcontextlost", function(e) {
+ testFailed("context was lost during shader compilation or linking");
+ receivedContextLost = true;
+});
+var gl = wtu.create3DContext(canvas);
+if (!gl) {
+ testFailed("context does not exist");
+ finishTest();
+} else {
+ var startTime = Date.now();
+ wtu.setupProgram(gl, ["vertexShader", "fragmentShader"], undefined, undefined, true);
+ gl.clearColor(0.0, 1.0, 0.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green", 0);
+ var endTime = Date.now();
+
+ // Delay for some period to increase chances that context lost event will be delivered.
+ setTimeout(function() {
+ if (!receivedContextLost) {
+ testPassed("Large loop compiled and linked without terminating the WebGL context");
+ if (endTime - startTime < 5000) {
+ testPassed("Shader compilation completed in a reasonable amount of time");
+ } else {
+ testFailed("Shader compilation took an unreasonably long time");
+ }
+ }
+ finishTest();
+ }, 500);
+}
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii-comments.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii-comments.vert.html
new file mode 100644
index 000000000..8f26d30bf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii-comments.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// Non ascii comments in source should succeed
+// ‚±‚ê‚Í‚`‚r‚b‚h‚h‚Å‚Í‚È‚¢‚Å‚·B
+// ‚s‚ˆ‚‰‚“@‚h‚“@‚m‚‚”@‚`‚r‚b‚h‚h
+/*
+ * ‚s‚ˆ‚‰‚“@‚h‚“@‚m‚‚”@‚`‚r‚b‚h‚h
+ */
+void main() {
+ gl_Position = vec4(1,1,1,1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii.vert.html
new file mode 100644
index 000000000..b1b0cea2d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii.vert.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// Non ascii data in source should fail
+// See GLSL ES Spec 1.0.17 section 3.1 and 3.2
+// ‚±‚ê‚Í‚`‚r‚b‚h‚h‚Å‚Í‚È‚¢‚Å‚·B
+// ‚s‚ˆ‚‰‚“@‚h‚“@‚m‚‚”@‚`‚r‚b‚h‚h
+uniform mat4 ‚m‚‚”‚`‚r‚b‚h‚h;
+void main() {
+ gl_Position = vec4(1,1,1,1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/re-compile-re-link.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/re-compile-re-link.html
new file mode 100644
index 000000000..cd5331b51
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/re-compile-re-link.html
@@ -0,0 +1,175 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Re-Compile and Re-link Shader conformance test.</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute float column;
+attribute float height;
+uniform float position;
+void main() {
+ gl_Position = vec4(mod(column - position, 1.0) * 2.0 - 1.0, height, 0, 1);
+}
+</script>
+
+<script id="fshader1" type="x-shader/x-fragment">
+precision mediump float;
+void main() {
+ gl_FragColor = vec4(1,0,0,1);
+}
+</script>
+<script id="fshader2" type="x-shader/x-fragment">
+precision mediump float;
+uniform float foobar;
+void main() {
+ gl_FragColor = vec4(1,0,foobar,1);
+}
+</script>
+<script id="vshaderB" type="not-js">
+attribute vec2 position;
+varying vec2 v_texCoord;
+void main() {
+ gl_Position = vec4(position, 0, 1);
+ v_texCoord = vec2(position * 0.5 + 0.5);
+}
+</script>
+<script id="fshaderB" type="not-js">
+precision mediump float;
+varying vec2 v_texCoord;
+uniform sampler2D tex;
+void main() {
+ gl_FragColor = texture2D(tex, v_texCoord);
+}
+</script>
+
+<script>
+"use strict";
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+var vsSource = document.getElementById("vshader").text;
+var fs1Source = document.getElementById("fshader1").text;
+var fs2Source = document.getElementById("fshader2").text;
+
+var vsSourceB = document.getElementById("vshaderB").text;
+var fsSourceB = document.getElementById("fshaderB").text;
+
+var vShader = gl.createShader(gl.VERTEX_SHADER);
+var fShader = gl.createShader(gl.FRAGMENT_SHADER);
+
+var vShaderB = gl.createShader(gl.VERTEX_SHADER);
+var fShaderB = gl.createShader(gl.FRAGMENT_SHADER);
+
+var program = gl.createProgram();
+var programB = gl.createProgram();
+
+gl.attachShader(program, vShader);
+gl.attachShader(program, fShader);
+
+gl.attachShader(programB, vShaderB);
+gl.attachShader(programB, fShaderB);
+
+var success;
+var shader;
+
+function checkShaderStatus(s) {
+ shader = s;
+ shouldBeTrue("success = gl.getShaderParameter(shader, gl.COMPILE_STATUS)");
+ if (!success) {
+ debug("error: " + gl.getShaderInfoLog());
+ }
+}
+
+var prg;
+function checkProgramStatus(p) {
+ prg = p;
+ shouldBeTrue("success = gl.getProgramParameter(prg, gl.LINK_STATUS)");
+ if (!success) {
+ debug("error: " + gl.getProgramInfoLog(prg));
+ }
+}
+
+for (var i = 0; i < 10; ++i) {
+ gl.shaderSource(vShader, vsSource);
+ gl.compileShader(vShader);
+ checkShaderStatus(vShader)
+ gl.shaderSource(fShader, fs1Source);
+ gl.compileShader(fShader);
+ checkShaderStatus(fShader)
+
+ gl.linkProgram(program);
+ checkProgramStatus(program)
+ gl.useProgram(program);
+
+ gl.shaderSource(vShaderB, vsSourceB);
+ gl.compileShader(vShaderB);
+ checkShaderStatus(vShaderB)
+ gl.shaderSource(fShaderB, fsSourceB);
+ gl.compileShader(fShaderB);
+ checkShaderStatus(fShaderB)
+
+ gl.linkProgram(programB);
+ checkProgramStatus(programB)
+
+ gl.useProgram(programB);
+}
+
+for (var i = 0; i < 10; ++i) {
+ // Now change the fragment shader
+ gl.shaderSource(fShader, fs2Source);
+ gl.compileShader(fShader);
+ checkShaderStatus(fShader)
+
+ // And re-link
+ gl.linkProgram(program);
+ checkProgramStatus(program)
+}
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors");
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-precision-format-obeyed.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-precision-format-obeyed.html
new file mode 100644
index 000000000..adf14f684
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-precision-format-obeyed.html
@@ -0,0 +1,108 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fshaderWithHighPrecision" type="text/something-not-javascript">
+precision highp float;
+uniform vec4 constantColor;
+
+void main()
+{
+ gl_FragColor = constantColor;
+}
+</script>
+<script id="fshaderWhichCompilesWithHighp" type="text/something-not-javascript">
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+// Something which compiles
+#else
+somethingWhichDoesNotCompile();
+#endif
+
+void main()
+{
+ gl_FragColor = vec4(0, 0, 0, 1);
+}
+</script>
+<script id="fshaderWhichCompilesWithoutHighp" type="text/something-not-javascript">
+#ifndef GL_FRAGMENT_PRECISION_HIGH
+// Something which compiles
+#else
+somethingWhichDoesNotCompile();
+#endif
+
+void main()
+{
+ gl_FragColor = vec4(0, 0, 0, 1);
+}
+</script>
+<script>
+"use strict";
+description("Checks that getShaderPrecisionFormat's return value matches whether highp is supported in fragment shaders.");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+var precision = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT);
+var highpSupported = (precision.rangeMin >= 62 && precision.rangeMax >= 62 && precision.precision >= 16);
+debug("highp is" + (highpSupported ? "" : " not") + " supported in fragment shaders");
+
+GLSLConformanceTester.runTests([
+{ vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fshaderWithHighPrecision',
+ fShaderSuccess: highpSupported,
+ linkSuccess: highpSupported,
+ passMsg: "getShaderPrecisionFormat's results agree with highp support in fragment shaders",
+},
+{ vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: highpSupported ? 'fshaderWhichCompilesWithHighp' : 'fshaderWhichCompilesWithoutHighp',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "getShaderPrecisionFormat's results agree with definition of GL_FRAGMENT_PRECISION_HIGH",
+},
+]);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-struct-scope.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-struct-scope.html
new file mode 100644
index 000000000..0167c1cc0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-struct-scope.html
@@ -0,0 +1,254 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!-- author: Jamie Madill (jmadill at chromium) -->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Struct Scope Test</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script id="shader-vs-1" type="x-shader/x-vertex">
+void main(void) {
+
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+
+ {
+ struct T {
+ int v1;
+ };
+
+ T x;
+ gl_Position.x += float(x.v1);
+ }
+
+ {
+ struct T {
+ float v2;
+ };
+
+ T x;
+ gl_Position.x += x.v2;
+ }
+
+}
+</script>
+
+<script id="shader-vs-2" type="x-shader/x-vertex">
+void main(void) {
+
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+
+ struct T {
+ int v1;
+ };
+
+ T x;
+ gl_Position.x += float(x.v1);
+
+ {
+ struct T {
+ float v2;
+ };
+
+ T x;
+ gl_Position.x += x.v2;
+ }
+
+}
+</script>
+
+<script id="shader-vs-3" type="x-shader/x-vertex">
+void main(void) {
+
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+
+ {
+ struct T {
+ int v1;
+ };
+
+ T x;
+ gl_Position.x += float(x.v1);
+ }
+
+ struct T {
+ float v2;
+ };
+
+ T x;
+ gl_Position.x += x.v2;
+}
+</script>
+
+<script id="shader-vs-bad" type="x-shader/x-vertex">
+void main(void) {
+
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+
+ struct T {
+ int v1;
+ };
+
+ T x;
+ gl_Position.x += float(x.v1);
+
+ struct T {
+ float v2;
+ };
+
+ T y;
+ gl_Position.x += y.v2;
+}
+</script>
+
+<script id="shader-vs-anglebug" type="x-shader/x-vertex">
+
+struct T_0 {
+ int v1;
+};
+
+void main(void) {
+
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+
+ struct T {
+ float v2;
+ };
+
+ T_0 x;
+ gl_Position.x += float(x.v1);
+
+ T y;
+ gl_Position.x += y.v2;
+}
+</script>
+
+<script id="shader-vs-masked-struct-variable" type="x-shader/x-vertex">
+
+struct T {
+ float f;
+};
+
+void main(void) {
+
+ T a;
+
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+
+ struct T {
+ float q;
+ };
+
+ gl_Position.x += a.f;
+
+ T b;
+ gl_Position.x += b.q;
+}
+</script>
+
+<script id="shader-fs" type="x-shader/x-fragment">
+precision mediump float;
+void main(void) {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+<script>
+"use strict";
+description("Testing struct definition scope");
+
+var wtu = WebGLTestUtils;
+GLSLConformanceTester.runTests([
+ {
+ vShaderId: "shader-vs-1",
+ vShaderSuccess: true,
+ fShaderId: "shader-fs",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "Two structs defined within non-overlapping scopes should be able to use the same name",
+ },
+ {
+ vShaderId: "shader-vs-2",
+ vShaderSuccess: true,
+ fShaderId: "shader-fs",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "A struct defined inside a scope overrides a struct defined in a outer scope with the same name",
+ },
+ {
+ vShaderId: "shader-vs-3",
+ vShaderSuccess: true,
+ fShaderId: "shader-fs",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "A struct can use the same name of another out-of-scope struct",
+ },
+ {
+ vShaderId: "shader-vs-bad",
+ vShaderSuccess: false,
+ fShaderId: "shader-fs",
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "A struct can't be defined with the same name as another struct defined in the same scope",
+ },
+ {
+ vShaderId: "shader-vs-anglebug",
+ vShaderSuccess: true,
+ fShaderId: "shader-fs",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "Structs with appended underscored numbers don't cause link errors (ANGLE bug)",
+ },
+ {
+ vShaderId: "shader-vs-masked-struct-variable",
+ vShaderSuccess: true,
+ fShaderId: "shader-fs",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "Variables of masked outer scope struct work with inner scope struct",
+ },
+]);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html
new file mode 100644
index 000000000..ce088319d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html
@@ -0,0 +1,274 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL uniform packing restrctions Conformance Test</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="example" width="2" height="2"> </canvas>
+<script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 a_position;
+ void main()
+ {
+ gl_Position = a_position;
+ }
+</script>
+<script id="fshader" type="x-shader/x-vertex">
+ precision mediump float;
+ varying vec4 v_varying;
+ void main()
+ {
+ gl_FragColor = v_varying;
+ }
+</script>
+<script id="vshaderArrayTest" type="x-shader/x-vertex">
+ attribute vec4 a_position;
+ varying vec4 v_varying;
+ uniform $(type) u_uniform[$(numTestType)];
+ void main()
+ {
+ v_varying = $(result);
+ gl_Position = a_position;
+ }
+</script>
+<script id="fshaderArrayTest" type="x-shader/x-fragment">
+ precision mediump float;
+ uniform $(type) u_uniform[$(numTestType)];
+ void main()
+ {
+ gl_FragColor = $(result);
+ }
+</script>
+<script id="vshaderUniformTest" type="x-shader/x-fragment">
+ attribute vec4 a_position;
+ varying vec4 v_varying;
+$(uniforms)
+ void main()
+ {
+ $(code)
+ v_varying = $(result);
+ gl_Position = a_position;
+ }
+</script>
+<script id="fshaderUniformTest" type="x-shader/x-fragment">
+ precision mediump float;
+$(uniforms)
+ void main()
+ {
+ $(code)
+ gl_FragColor = $(result);
+ }
+</script>
+<script>
+"use strict";
+description();
+debug("");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+var uniformTypes = [
+ { type: "bool", componentsPerRow: 1, rows: 1, fType: "float", uniToF: "float(u_uniform$(id)$(index))", fToVec4: "vec4($(f), 0, 0, 0)"},
+ { type: "float", componentsPerRow: 1, rows: 1, fType: "float", uniToF: "u_uniform$(id)$(index)", fToVec4: "vec4($(f), 0, 0, 0)"},
+ { type: "int", componentsPerRow: 1, rows: 1, fType: "float", uniToF: "float(u_uniform$(id)$(index))", fToVec4: "vec4($(f), 0, 0, 0)"},
+ { type: "vec2", componentsPerRow: 2, rows: 1, fType: "vec2", uniToF: "u_uniform$(id)$(index)", fToVec4: "vec4($(f), 0, 0)"},
+ { type: "ivec2", componentsPerRow: 2, rows: 1, fType: "vec2", uniToF: "vec2(u_uniform$(id)$(index))", fToVec4: "vec4($(f), 0, 0)"},
+ { type: "bvec2", componentsPerRow: 2, rows: 1, fType: "vec2", uniToF: "vec2(u_uniform$(id)$(index))", fToVec4: "vec4($(f), 0, 0)"},
+ { type: "vec3", componentsPerRow: 3, rows: 1, fType: "vec3", uniToF: "u_uniform$(id)$(index)", fToVec4: "vec4($(f), 0)"},
+ { type: "ivec3", componentsPerRow: 3, rows: 1, fType: "vec3", uniToF: "vec3(u_uniform$(id)$(index))", fToVec4: "vec4($(f), 0)"},
+ { type: "bvec3", componentsPerRow: 3, rows: 1, fType: "vec3", uniToF: "vec3(u_uniform$(id)$(index))", fToVec4: "vec4($(f), 0)"},
+ { type: "vec4", componentsPerRow: 4, rows: 1, fType: "vec4", uniToF: "u_uniform$(id)$(index)", fToVec4: "$(f)"},
+ { type: "ivec4", componentsPerRow: 4, rows: 1, fType: "vec4", uniToF: "vec4(u_uniform$(id)$(index))", fToVec4: "$(f)"},
+ { type: "bvec4", componentsPerRow: 4, rows: 1, fType: "vec4", uniToF: "vec4(u_uniform$(id)$(index))", fToVec4: "$(f)"},
+// Yes, the spec says mat2 takes 4 columns, 2 rows.
+ { type: "mat2", componentsPerRow: 4, rows: 2, fType: "vec2", uniToF: "vec2(u_uniform$(id)$(index)[0])", fToVec4: "vec4($(f), 0, 0)"},
+ { type: "mat3", componentsPerRow: 3, rows: 3, fType: "vec3", uniToF: "vec3(u_uniform$(id)$(index)[0])", fToVec4: "vec4($(f), 0)"},
+ { type: "mat4", componentsPerRow: 4, rows: 4, fType: "vec4", uniToF: "vec4(u_uniform$(id)$(index)[0])", fToVec4: "$(f)"},
+// Samplers generally have more restrictive limits.
+// { type: "sampler2D", componentsPerRow: 1, rows: 1, code: "vec4(texture2D(u_uniform[$(index)], vec2(0, 0)))", },
+// { type: "samplerCube", componentsPerRow: 1, rows: 1, code: "vec4(textureCube(u_uniform[$(index)], vec3(0, 0, 0)))", },
+];
+
+var vBaseSource = wtu.getScript("vshader");
+var fBaseSource = wtu.getScript("fshader");
+var vArrayTestSource = wtu.getScript("vshaderArrayTest");
+var fArrayTestSource = wtu.getScript("fshaderArrayTest");
+var vUniformTestSource = wtu.getScript("vshaderUniformTest");
+var fUniformTestSource = wtu.getScript("fshaderUniformTest");
+
+var tests = [];
+var shaderTypes = [
+ { type: "vertex",
+ // For tests that expect failure which shader might fail.
+ vertExpectation: false,
+ fragExpectation: true,
+ vertArrayTest: vArrayTestSource,
+ fragArrayTest: fBaseSource,
+ vertUniformTest: vUniformTestSource,
+ fragUniformTest: fBaseSource,
+ maxVectors: gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS),
+ minVectors: 127, // GLSL ES 1.0.17 Appendix A.7 and A.8. Reserve one row for constants in the code, hence 128 - 1.
+ },
+ { type: "fragment",
+ // For tests that expect failure which shader might fail.
+ vertExpectation: true,
+ fragExpectation: false,
+ vertArrayTest: vBaseSource,
+ fragArrayTest: fArrayTestSource,
+ vertUniformTest: vBaseSource,
+ fragUniformTest: fUniformTestSource,
+ maxVectors: gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS),
+ minVectors: 15, // GLSL ES 1.0.17 Appendix A.8 - minimum value of gl_maxFragmentUniformVectors is 16. Again, reserve a row for constants.
+ },
+];
+for (var ss = 0; ss < shaderTypes.length; ++ss) {
+ var shaderType = shaderTypes[ss];
+ debug("max " + shaderType.type + ": " + shaderType.maxVectors);
+ for (var ii = 0; ii < uniformTypes.length; ++ii) {
+ var info = uniformTypes[ii];
+ wtu.log("checking: " + info.type);
+ // Compute the maximum amount of this type allowed in a single array.
+ var maxInArray = Math.floor(shaderType.maxVectors / info.rows);
+ // Compute the minimum required to work in a single array.
+ var minVars = Math.floor(shaderType.minVectors / info.rows);
+ // Compute the maximum allowed as single elements
+ var maxPerRow = Math.floor(4 / info.componentsPerRow);
+ var maxPacked = Math.floor(shaderType.maxVectors * maxPerRow / info.rows);
+
+ // Test array[1] of the type
+ var uniToF = wtu.replaceParams(info.uniToF, {id: "", index: "[0]"});
+ var vec4 = wtu.replaceParams(info.fToVec4, {f: uniToF});
+ tests.push({
+ vShaderSource: wtu.replaceParams(shaderType.vertArrayTest, {numTestType: 1, result: vec4}, info),
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(shaderType.fragArrayTest, {numTestType: 1, result: vec4}, info),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: shaderType.type + " shader with uniform array of " + info.type + " with 1 element should succeed",
+ });
+
+ // Note: We can't test an array filling all uniform space as actual GL drivers are
+ // only required to be able to do the minimum number. After that it can fail for
+ // multiple reasons, including uniform registers being reserved for the implementation's
+ // own use. Constants also take up uniform registers.
+
+ // Test required number of uniforms
+ var uniToF = wtu.replaceParams(info.uniToF, {id: "", index: "[" + (minVars - 1) + "]"});
+ var vec4 = wtu.replaceParams(info.fToVec4, {f: uniToF});
+ tests.push({
+ vShaderSource: wtu.replaceParams(shaderType.vertArrayTest, {numTestType: minVars, result: vec4}, info),
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(shaderType.fragArrayTest, {numTestType: minVars, result: vec4}, info),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: shaderType.type + " shader with uniform array of " + info.type + " with " + minVars + " elements (the minimum required) should succeed",
+ });
+
+ // Test array[max + 1] accessing last element. WebGL requires this to fail.
+ var uniToF = wtu.replaceParams(info.uniToF, {id: "", index: "[" + maxInArray + "]"});
+ var vec4 = wtu.replaceParams(info.fToVec4, {f: uniToF});
+ tests.push({
+ vShaderSource: wtu.replaceParams(shaderType.vertArrayTest, {numTestType: maxInArray + 1, result: vec4}, info),
+ vShaderSuccess: shaderType.vertExpectation,
+ fShaderSource: wtu.replaceParams(shaderType.fragArrayTest, {numTestType: maxInArray + 1, result: vec4}, info),
+ fShaderSuccess: shaderType.fragExpectation,
+ linkSuccess: false,
+ passMsg: shaderType.type + " shader with uniform array of " + info.type + " with " + (maxInArray + 1) + " elements (one past maximum) accessing last element should fail",
+ });
+
+ // Test array[max + 1] accessing first element. WebGL requires this to fail but ES allows truncating array.
+ var uniToF = wtu.replaceParams(info.uniToF, {id: "", index: "[0]"});
+ var vec4 = wtu.replaceParams(info.fToVec4, {f: uniToF});
+ tests.push({
+ vShaderSource: wtu.replaceParams(shaderType.vertArrayTest, {numTestType: maxInArray + 1, result: vec4}, info),
+ vShaderSuccess: shaderType.vertExpectation,
+ fShaderSource: wtu.replaceParams(shaderType.fragArrayTest, {numTestType: maxInArray + 1, result: vec4}, info),
+ fShaderSuccess: shaderType.fragExpectation,
+ linkSuccess: false,
+ passMsg: shaderType.type + " shader with uniform array of " + info.type + " with " + (maxInArray + 1) + " elements (one past maximum) accessing first element should fail",
+ });
+
+ // Note: We can't test max uniforms as actual GL drivers are only required to be able
+ // to do the minimum number. After that it can fail for multiple reasons, including
+ // uniform registers being reserved for the implementation's own use or also instruction
+ // space limitations. Strictly speaking, guaranteed supported length of a shader
+ // executable is defined by the GLES2 conformance tests according to GLSL ES 1.0.17
+ // Appendix A.2. This does not give us an exact limit: this test only aims to fit within
+ // instruction space limits imposed by existing GLES2 compliant hardware.
+
+ var generateCode = function(numVars) {
+ var uniforms = [];
+ var sumTerms = [];
+ for (var uu = 0; uu < numVars; ++uu) {
+ uniforms.push(" uniform " + info.type + " u_uniform" + uu + ";");
+ sumTerms.push(wtu.replaceParams(info.uniToF, {id: uu, index: ""}));
+ }
+ return {
+ uniforms: uniforms.join("\n"),
+ code: info.fType + " sum = " + sumTerms.join(" + \n ") + ";",
+ result: wtu.replaceParams(info.fToVec4, {f: 'sum'})
+ };
+ };
+
+ // Test max+1 uniforms of type.
+ tests.push({
+ vShaderSource: wtu.replaceParams(shaderType.vertUniformTest, generateCode(maxPacked + 1), info),
+ vShaderSuccess: shaderType.vertExpectation,
+ fShaderSource: wtu.replaceParams(shaderType.fragUniformTest, generateCode(maxPacked + 1), info),
+ fShaderSuccess: shaderType.fragExpectation,
+ linkSuccess: false,
+ passMsg: shaderType.type + " shader with " + (maxPacked + 1) + " uniforms of " + info.type + " (one past maximum) should fail",
+ });
+
+ // Test required uniforms of type.
+ tests.push({
+ vShaderSource: wtu.replaceParams(shaderType.vertUniformTest, generateCode(minVars), info),
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(shaderType.fragUniformTest, generateCode(minVars), info),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: shaderType.type + " shader with " + minVars + " uniforms of " + info.type + " (the minimum required) should succeed",
+ });
+ }
+}
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-varying-packing-restrictions.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-varying-packing-restrictions.html
new file mode 100644
index 000000000..9ef6d2adb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-varying-packing-restrictions.html
@@ -0,0 +1,211 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL varying packing restrictions Conformance Test</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="example" width="2" height="2"> </canvas>
+<script id="vshaderArrayTest" type="x-shader/x-vertex">
+attribute vec4 a_position;
+varying $(type) v_varying[$(numTestType)];
+void main()
+{
+ gl_Position = a_position;
+ $(vcode)
+}
+</script>
+<script id="fshaderArrayTest" type="x-shader/x-fragment">
+ precision mediump float;
+ varying $(type) v_varying[$(numTestType)];
+ void main()
+ {
+ gl_FragColor = $(fcode);
+ }
+</script>
+<script id="vshaderVaryingTest" type="x-shader/x-fragment">
+attribute vec4 a_position;
+$(varyings)
+ void main()
+ {
+ gl_Position = a_position;
+ $(vcode)
+ }
+</script>
+<script id="fshaderVaryingTest" type="x-shader/x-fragment">
+ precision mediump float;
+$(varyings)
+ void main()
+ {
+ gl_FragColor = $(fcode);
+ }
+</script>
+<script>
+"use strict";
+description();
+debug("");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+var varyingTypes = [
+ { type: "float", componentsPerRow: 1, rows: 1, vcode: "v_varying$(id)$(index) = 1.0;", fcode: "vec4(v_varying$(id)$(index), 0, 0, 0)", },
+ { type: "vec2", componentsPerRow: 2, rows: 1, vcode: "v_varying$(id)$(index) = vec2(0, 0);", fcode: "vec4(v_varying$(id)$(index), 0, 0)", },
+ { type: "vec3", componentsPerRow: 3, rows: 1, vcode: "v_varying$(id)$(index) = vec3(0, 0, 0);", fcode: "vec4(v_varying$(id)$(index), 0)", },
+ { type: "vec4", componentsPerRow: 4, rows: 1, vcode: "v_varying$(id)$(index) = vec4(0, 0, 0, 0);", fcode: "vec4(v_varying$(id)$(index))", },
+// Yes, the spec says mat2 takes 4 columns, 2 rows.
+ { type: "mat2", componentsPerRow: 4, rows: 2, vcode: "v_varying$(id)$(index) = mat2(1.0);", fcode: "vec4(v_varying$(id)$(index)[0], 0, 0)", },
+ { type: "mat3", componentsPerRow: 3, rows: 3, vcode: "v_varying$(id)$(index) = mat3(1.0);", fcode: "vec4(v_varying$(id)$(index)[0], 0)", },
+ { type: "mat4", componentsPerRow: 4, rows: 4, vcode: "v_varying$(id)$(index) = mat4(1.0);", fcode: "vec4(v_varying$(id)$(index)[0])", },
+];
+
+var vArrayTestSource = wtu.getScript("vshaderArrayTest");
+var fArrayTestSource = wtu.getScript("fshaderArrayTest");
+var vVaryingTestSource = wtu.getScript("vshaderVaryingTest");
+var fVaryingTestSource = wtu.getScript("fshaderVaryingTest");
+
+var minVaryingVectors = 8;
+var maxVaryingVectors = gl.getParameter(gl.MAX_VARYING_VECTORS);
+var tests = [];
+
+for (var ii = 0; ii < varyingTypes.length; ++ii) {
+ var info = varyingTypes[ii];
+ wtu.log("checking: " + info.type);
+ // Compute the maximum amount of this type allowed in a single array.
+ var numVars = Math.floor(maxVaryingVectors / info.rows);
+ // Compute the minimum required to work in a single array.
+ var minVars = Math.floor(minVaryingVectors / info.rows);
+ // Compute the maximum allowed as single elements
+ var numPerRow = Math.floor(4 / info.componentsPerRow);
+ var numMax = Math.floor(maxVaryingVectors * numPerRow / info.rows);
+
+ // Test array[1] of the type
+ var vcode = wtu.replaceParams(info.vcode, {id: "", index: "[0]"});
+ var fcode = wtu.replaceParams(info.fcode, {id: "", index: "[0]"});
+ tests.push({
+ vShaderSource: wtu.replaceParams(vArrayTestSource, {numTestType: 1, vcode: vcode}, info),
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(fArrayTestSource, {numTestType: 1, fcode: fcode}, info),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "shaders with varying array of " + info.type + " with 1 element should succeed",
+ });
+
+ // Test required number of varyings
+ var vcode = wtu.replaceParams(info.vcode, {id: "", index: "[" + (minVars - 1) + "]"});
+ var fcode = wtu.replaceParams(info.fcode, {id: "", index: "[" + (minVars - 1) + "]"});
+ tests.push({
+ vShaderSource: wtu.replaceParams(vArrayTestSource, {numTestType: minVars, vcode: vcode}, info),
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(fArrayTestSource, {numTestType: minVars, fcode: fcode}, info),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "shaders with varying array of " + info.type + " with " + minVars + " elements (the minimum required) should succeed",
+ });
+
+ // Test array[max + 1] accessing last element. WebGL requires this to fail.
+ var vcode = wtu.replaceParams(info.vcode, {id: "", index: "[" + numVars + "]"});
+ var fcode = wtu.replaceParams(info.fcode, {id: "", index: "[" + numVars + "]"});
+ tests.push({
+ vShaderSource: wtu.replaceParams(vArrayTestSource, {numTestType: numVars + 1, vcode: vcode}, info),
+ vShaderSuccess: false,
+ fShaderSource: wtu.replaceParams(fArrayTestSource, {numTestType: numVars + 1, fcode: fcode}, info),
+ fShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "shaders with varying array of " + info.type + " with " + (numVars + 1) + " elements (one past maximum) accessing last element should fail",
+ });
+
+ // Test array[max + 1] accessing first element. WebGL requires this to fail but ES allows truncating array.
+ var vcode = wtu.replaceParams(info.vcode, {id: "", index: "[0]"});
+ var fcode = wtu.replaceParams(info.fcode, {id: "", index: "[0]"});
+ tests.push({
+ vShaderSource: wtu.replaceParams(vArrayTestSource, {numTestType: numVars + 1, vcode: vcode}, info),
+ vShaderSuccess: false,
+ fShaderSource: wtu.replaceParams(fArrayTestSource, {numTestType: numVars + 1, fcode: fcode}, info),
+ fShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "shaders with varying array of " + info.type + " with " + (numVars + 1) + " elements (one past maximum) accessing first element should fail",
+ });
+
+ // Note: We can't test max varyings as actual GL drivers are only required to be able to
+ // do the minimum number. After that it can fail for any reason, for example running out of
+ // instruction space.
+
+ var generateCode = function(numVars) {
+ var varyings = [];
+ var vcodes = [];
+ var fcodes = [];
+ for (var uu = 0; uu < numVars; ++uu) {
+ varyings.push(" varying " + info.type + " v_varying" + uu + ";");
+ vcodes.push(wtu.replaceParams(info.vcode, {id: uu, index: ""}));
+ fcodes.push(wtu.replaceParams(info.fcode, {id: uu, index: ""}));
+ }
+ return {
+ varyings: varyings.join("\n"),
+ vcode: vcodes.join("\n "),
+ fcode: fcodes.join(" + \n "),
+ };
+ };
+
+ // Test max+1 varyings of type.
+ tests.push({
+ vShaderSource: wtu.replaceParams(vVaryingTestSource, generateCode(numMax + 1), info),
+ vShaderSuccess: false,
+ fShaderSource: wtu.replaceParams(fVaryingTestSource, generateCode(numMax + 1), info),
+ fShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "shaders with " + (numMax + 1) + " varyings of " + info.type + " (one past maximum) should fail",
+ });
+
+ // Test required varyings of type.
+ tests.push({
+ vShaderSource: wtu.replaceParams(vVaryingTestSource, generateCode(minVars), info),
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(fVaryingTestSource, generateCode(minVars), info),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "shaders with " + minVars + " varyings of " + info.type + " (the minimum required) should succeed",
+ });
+}
+
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-define.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-define.html
new file mode 100644
index 000000000..a00ca8f38
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-define.html
@@ -0,0 +1,59 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader that uses 256 character token in #define should succeed
+#define LEN_256_OK XxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxX
+
+void main()
+{
+ gl_Position = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-identifier.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-identifier.frag.html
new file mode 100644
index 000000000..2dc6f2c88
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-identifier.frag.html
@@ -0,0 +1,133 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader256" type="text/something-not-javascript">
+// shader that uses 256 character identifier should succeed
+precision mediump float;
+uniform float a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345;
+void main()
+{
+ gl_FragColor = vec4(a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345,0.0,0.0,1.0);
+}
+</script>
+<script id="fragmentShader_before" type="text/something-not-javascript">
+// shader that uses 256 character identifier that starts with underscore should succeed
+precision mediump float;
+uniform float _a12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234;
+void main()
+{
+ gl_FragColor = vec4(_a12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234,0.0,0.0,1.0);
+}
+</script>
+<script id="fragmentShader_after" type="text/something-not-javascript">
+// shader that uses 256 character identifier that ends with underscore should succeed
+precision mediump float;
+uniform float a12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234_;
+void main()
+{
+ gl_FragColor = vec4(a12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234_,0.0,0.0,1.0);
+}
+</script>
+<script id="fragmentShader256_odd" type="text/something-not-javascript">
+// shader that uses 256 character identifier with odd characters as underscores should succeed
+precision mediump float;
+uniform float a_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_;
+void main()
+{
+ gl_FragColor = vec4(a_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_6_8_0_2_4_,0.0,0.0,1.0);
+}
+</script>
+<script id="fragmentShader256_even" type="text/something-not-javascript">
+// shader that uses 256 character identifier with even characters as underscores should succeed
+precision mediump float;
+uniform float a1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5;
+void main()
+{
+ gl_FragColor = vec4(a1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5_7_9_1_3_5,0.0,0.0,1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTests([
+ { vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShader256',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: 'shader with 256 character identifier should succeed'
+ },
+ { vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShader_before',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: 'shader with 256 character identifier that starts with underscore should succeed'
+ },
+ { vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShader_after',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: 'shader with 256 character identifier that ends with underscore should succeed'
+ },
+ { vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShader256_odd',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: 'shader with 256 character identifier with odd characters as underscores should succeed'
+ },
+ { vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShader256_even',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: 'shader with 256 character identifier with even characters as underscores should succeed'
+ }
+]);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-define.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-define.html
new file mode 100644
index 000000000..0adafa085
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-define.html
@@ -0,0 +1,59 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader that uses 257 character token in #define should fail
+#define LEN_257_BAD XxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxX
+
+void main()
+{
+ gl_Position = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-identifier.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-identifier.frag.html
new file mode 100644
index 000000000..04fa8f965
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-identifier.frag.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// shader that uses 257 character identifier should fail
+precision mediump float;
+uniform float a1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456;
+void main()
+{
+ gl_FragColor = vec4(a1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456,0.0,0.0,1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-_webgl-identifier.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-_webgl-identifier.vert.html
new file mode 100644
index 000000000..c287f359c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-_webgl-identifier.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader that uses _webgl identifier should fail
+attribute vec4 _webgl_vPosition;
+void main()
+{
+ gl_Position = _webgl_vPosition;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.frag.html
new file mode 100644
index 000000000..b43ab809c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.frag.html
@@ -0,0 +1,64 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with arbitrary indexing expression should fail
+// http://www.khronos.org/registry/webgl/specs/latest/#SUPPORTED_GLSL_CONSTRUCTS
+precision mediump float;
+
+uniform vec4 u_colors[8];
+varying float a_index;
+
+void main()
+{
+ int index = int(floor(a_index));
+ gl_FragColor = u_colors[index];
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.vert.html
new file mode 100644
index 000000000..85216c269
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader with arbitrary indexing expression should succeed
+// http://www.khronos.org/registry/webgl/specs/latest/#SUPPORTED_GLSL_CONSTRUCTS
+uniform mat4 u_matrices[8];
+attribute vec4 a_vertex;
+attribute float a_index;
+
+void main()
+{
+ int index = int(floor(a_index));
+ gl_Position = u_matrices[index] * a_vertex;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html
new file mode 100644
index 000000000..65fbdeb0e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html
@@ -0,0 +1,158 @@
+
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>GLSL Array of Structs Containing Arrays</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 a_position;
+void main(void) {
+ gl_Position = a_position;
+}
+</script>
+<script id="fshader0" type="x-shader/x-fragment">
+precision mediump float;
+struct my_struct {
+ vec4 color[2];
+};
+uniform my_struct u_colors[2];
+void main(void) {
+ gl_FragColor = u_colors[0].color[0];
+}
+</script>
+<script id="fshader1" type="x-shader/x-fragment">
+precision mediump float;
+struct my_struct {
+ vec4 color[2];
+};
+uniform my_struct u_colors[2];
+void main(void) {
+ gl_FragColor = u_colors[0].color[1];
+}
+</script>
+<script id="fshader-with-one-element-arrays" type="x-shader/x-fragment">
+precision mediump float;
+struct my_struct {
+ vec4 color[1];
+};
+uniform my_struct u_colors[1];
+void main(void) {
+ gl_FragColor = u_colors[0].color[0];
+}
+</script>
+<script id="fshader3" type="x-shader/x-fragment">
+precision mediump float;
+struct my_struct {
+ vec4 color1[2];
+ vec4 color2[2];
+};
+uniform my_struct u_colors[2];
+void main(void) {
+ gl_FragColor = u_colors[0].color1[0] + u_colors[0].color2[0] + u_colors[1].color1[1] +u_colors[1].color2[1];
+}
+</script>
+</head>
+<body>
+<canvas id="canvas" width="50" height="50"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description();
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+wtu.setupUnitQuad(gl);
+
+for (var ii = 0; ii < 2; ++ii) {
+ var program = wtu.setupProgram(gl, ["vshader", "fshader" + ii], ["a_position"]);
+ var red_loc = gl.getUniformLocation(program, "u_colors[0].color[" + ii + "]");
+ var green_loc = gl.getUniformLocation(program, "u_colors[0].color[" + (1 - ii) + "]");
+ gl.uniform4fv(red_loc, [1, 0, 0, 1]);
+ gl.uniform4fv(green_loc, [0, 1, 0, 1]);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [255, 0, 0, 255], "Should be red");
+}
+
+var program = wtu.setupProgram(gl, ["vshader", "fshader-with-one-element-arrays"], ["a_position"]);
+var green_loc = gl.getUniformLocation(program, "u_colors[0].color[0]");
+gl.uniform4fv(green_loc, [0, 1, 0, 1]);
+wtu.clearAndDrawUnitQuad(gl);
+wtu.checkCanvas(gl, [0, 255, 0, 255], "Should be green");
+
+var program = wtu.setupProgram(gl, ["vshader", "fshader3"], ["a_position"]);
+var numUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);
+shouldBe("numUniforms", "4");
+var uniforms = []
+for (var ii = 0; ii < numUniforms; ++ii) {
+ uniforms.push(gl.getActiveUniform(program, ii).name);
+}
+uniforms.sort();
+shouldBe("uniforms[0]", '"u_colors[0].color1[0]"');
+shouldBe("uniforms[1]", '"u_colors[0].color2[0]"');
+shouldBe("uniforms[2]", '"u_colors[1].color1[0]"');
+shouldBe("uniforms[3]", '"u_colors[1].color2[0]"');
+var loc00 = gl.getUniformLocation(program, "u_colors[0].color1");
+var loc01 = gl.getUniformLocation(program, "u_colors[0].color2");
+var loc10 = gl.getUniformLocation(program, "u_colors[1].color1");
+var loc11 = gl.getUniformLocation(program, "u_colors[1].color2");
+shouldBeTrue("loc00 != undefined");
+shouldBeTrue("loc01 != undefined");
+shouldBeTrue("loc10 != undefined");
+shouldBeTrue("loc11 != undefined");
+gl.uniform4fv(loc00, [1, 0, 0, 0]);
+gl.uniform4fv(loc01, [0, 1, 0, 0]);
+gl.uniform4fv(loc10, [0, 0, 0, 0, 0, 0, 1, 0]);
+gl.uniform4fv(loc11, [0, 0, 0, 0, 0, 0, 0, 1]);
+var loc101 = gl.getUniformLocation(program, "u_colors[1].color1[1]");
+var loc111 = gl.getUniformLocation(program, "u_colors[1].color2[1]");
+shouldBeTrue("loc101 != undefined");
+shouldBeTrue("loc111 != undefined");
+wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 0]);
+gl.uniform4fv(loc101, [0, 0, 0, 0]);
+gl.uniform4fv(loc111, [0, 0, 0, 0]);
+wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 0]);
+wtu.checkCanvas(gl, [255, 255, 0, 0], "Should be yellow");
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-uniform.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-uniform.html
new file mode 100644
index 000000000..b55bfe98f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-uniform.html
@@ -0,0 +1,168 @@
+
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>GLSL Array of Structs Uniform</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 a_position;
+void main(void) {
+ gl_Position = a_position;
+}
+</script>
+<script id="fshader0" type="x-shader/x-fragment">
+precision mediump float;
+struct my_struct {
+ vec4 color;
+};
+uniform my_struct u_colors[2];
+void main(void) {
+ gl_FragColor = u_colors[0].color;
+}
+</script>
+<script id="fshader1" type="x-shader/x-fragment">
+precision mediump float;
+struct my_struct {
+ vec4 color;
+};
+uniform my_struct u_colors[2];
+void main(void) {
+ gl_FragColor = u_colors[1].color;
+}
+</script>
+<script id="fshader2" type="x-shader/x-fragment">
+precision mediump float;
+struct my_struct {
+ vec4 color1;
+ vec4 color2;
+};
+uniform my_struct u_colors[2];
+void main(void) {
+ gl_FragColor = u_colors[0].color1 + u_colors[0].color2 + u_colors[1].color1 +u_colors[1].color2;
+}
+</script>
+<script id="fshader3" type="x-shader/x-fragment">
+precision mediump float;
+struct my_struct {
+ float r;
+ float g;
+ float b;
+ float a;
+};
+uniform my_struct u_colors[2];
+void main(void) {
+ gl_FragColor = vec4(u_colors[0].r, u_colors[0].g, u_colors[1].b, u_colors[1].a);
+}
+</script>
+</head>
+<body>
+<canvas id="canvas" width="50" height="50"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description();
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+wtu.setupUnitQuad(gl);
+
+for (var ii = 0; ii < 2; ++ii) {
+ var program = wtu.setupProgram(gl, ["vshader", "fshader" + ii], ["a_position"]);
+ var red_loc = gl.getUniformLocation(program, "u_colors[" + ii + "].color");
+ var green_loc = gl.getUniformLocation(program, "u_colors[" + (1 - ii) + "].color");
+ gl.uniform4fv(red_loc, [1, 0, 0, 1]);
+ gl.uniform4fv(green_loc, [0, 1, 0, 1]);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [255, 0, 0, 255], "Should be red");
+}
+
+var program = wtu.setupProgram(gl, ["vshader", "fshader2"], ["a_position"]);
+var numUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);
+shouldBe("numUniforms", "4");
+var uniforms = []
+for (var ii = 0; ii < numUniforms; ++ii) {
+ uniforms.push(gl.getActiveUniform(program, ii).name);
+}
+uniforms.sort();
+shouldBe("uniforms[0]", '"u_colors[0].color1"');
+shouldBe("uniforms[1]", '"u_colors[0].color2"');
+shouldBe("uniforms[2]", '"u_colors[1].color1"');
+shouldBe("uniforms[3]", '"u_colors[1].color2"');
+var loc00 = gl.getUniformLocation(program, "u_colors[0].color1");
+var loc01 = gl.getUniformLocation(program, "u_colors[0].color2");
+var loc10 = gl.getUniformLocation(program, "u_colors[1].color1");
+var loc11 = gl.getUniformLocation(program, "u_colors[1].color2");
+shouldBeTrue("loc00 != undefined");
+shouldBeTrue("loc01 != undefined");
+shouldBeTrue("loc10 != undefined");
+shouldBeTrue("loc11 != undefined");
+gl.uniform4fv(loc00, [1, 0, 0, 0]);
+gl.uniform4fv(loc01, [0, 1, 0, 0]);
+gl.uniform4fv(loc10, [0, 0, 1, 0]);
+gl.uniform4fv(loc11, [0, 0, 0, 1]);
+wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 0]);
+wtu.checkCanvas(gl, [255, 255, 255, 255], "Should be white");
+
+program = wtu.setupProgram(gl, ["vshader", "fshader3"], ["a_position"]);
+var loc0r = gl.getUniformLocation(program, "u_colors[0].r");
+var loc0g = gl.getUniformLocation(program, "u_colors[0].g");
+var loc0b = gl.getUniformLocation(program, "u_colors[0].b");
+var loc0a = gl.getUniformLocation(program, "u_colors[0].a");
+var loc1r = gl.getUniformLocation(program, "u_colors[1].r");
+var loc1g = gl.getUniformLocation(program, "u_colors[1].g");
+var loc1b = gl.getUniformLocation(program, "u_colors[1].b");
+var loc1a = gl.getUniformLocation(program, "u_colors[1].a");
+shouldBeTrue("loc0r != undefined");
+shouldBeTrue("loc0g != undefined");
+shouldBeTrue("loc1b != undefined");
+shouldBeTrue("loc1a != undefined");
+gl.uniform1f(loc0r, 1);
+gl.uniform1f(loc0g, 1);
+gl.uniform1f(loc1b, 1);
+gl.uniform1f(loc1a, 1);
+wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 0]);
+wtu.checkCanvas(gl, [255, 255, 255, 255], "Should be white");
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-array.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-array.vert.html
new file mode 100644
index 000000000..0c1123d00
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-array.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader that uses attribute array should fail as per GLSL page 110, appendix A, section 5
+attribute vec4 vPosition[2];
+void main()
+{
+ gl_Position = vPosition[0] + vPosition[1];
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-struct.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-struct.vert.html
new file mode 100644
index 000000000..177e38bde
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-struct.vert.html
@@ -0,0 +1,64 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader that uses attribute struct should fail per GLSL ES section 4.4.3, "Attribute", p. 30
+struct UserType {
+ attribute vec4 position;
+};
+
+attribute UserType userAttr;
+void main()
+{
+ gl_Position = userAttr.position;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-clipvertex.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-clipvertex.vert.html
new file mode 100644
index 000000000..dc2db444e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-clipvertex.vert.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader that uses gl_ClipVertex should fail
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+ gl_ClipVertex = vPosition;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-assignment.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-assignment.html
new file mode 100644
index 000000000..8fcd2856d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-assignment.html
@@ -0,0 +1,66 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with comma assignment should succeed
+precision mediump float;
+void main() {
+ float a = 0.0;
+ float b = 0.0;
+ float c = 0.0;
+ float d = 0.0;
+ a = 1.1, b = 3.1;
+ c = 2.1, d = 4.1;
+ // Output green if successful, red if not.
+ gl_FragColor = ((a + b + c + d > 10.0) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runRenderTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-conditional-assignment.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-conditional-assignment.html
new file mode 100644
index 000000000..dfb3473c5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-conditional-assignment.html
@@ -0,0 +1,225 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShaderAGreaterThanBCheckR" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+ float a = 3.0;
+ float b = 2.0;
+ float r = 0.0;
+ float r0 = 0.5;
+ float r1 = 1.0;
+ float ab = a > b ? (r = r0, a) : (r = r1, b);
+ // Output green if successful, red if not.
+ gl_FragColor = ((r == r0) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderAGreaterThanBCheckAB" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+ float a = 3.0;
+ float b = 2.0;
+ float r = 0.0;
+ float r0 = 0.5;
+ float r1 = 1.0;
+ float ab = a > b ? (r = r0, a) : (r = r1, b);
+ // Output green if successful, red if not.
+ gl_FragColor = ((ab == a) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderAGreaterThanBCheckT0" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+ float a = 3.0;
+ float b = 2.0;
+ float t0 = 0.0;
+ float t1 = 0.0;
+ float r0 = 0.5;
+ float r1 = 1.0;
+ float ab = a > b ? (t0 = r0, a) : (t1 = r1, b);
+ // Output green if successful, red if not.
+ gl_FragColor = ((t0 == r0) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderAGreaterThanBCheckT1" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+ float a = 3.0;
+ float b = 2.0;
+ float t0 = 0.0;
+ float t1 = 0.0;
+ float r0 = 0.5;
+ float r1 = 1.0;
+ float ab = a > b ? (t0 = r0, a) : (t1 = r1, b);
+ // Output green if successful, red if not.
+ gl_FragColor = ((t1 == 0.0) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderBGreaterThanACheckR" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+ float a = 2.0;
+ float b = 3.0;
+ float r = 0.0;
+ float r0 = 0.5;
+ float r1 = 1.0;
+ float ab = a > b ? (r = r0, a) : (r = r1, b);
+ // Output green if successful, red if not.
+ gl_FragColor = ((r == r1) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderBGreaterThanACheckAB" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+ float a = 2.0;
+ float b = 3.0;
+ float r = 0.0;
+ float r0 = 0.5;
+ float r1 = 1.0;
+ float ab = a > b ? (r = r0, a) : (r = r1, b);
+ // Output green if successful, red if not.
+ gl_FragColor = ((ab == b) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderBGreaterThanACheckT0" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+ float a = 2.0;
+ float b = 3.0;
+ float t0 = 0.0;
+ float t1 = 0.0;
+ float r0 = 0.5;
+ float r1 = 1.0;
+ float ab = a > b ? (t0 = r0, a) : (t1 = r1, b);
+ // Output green if successful, red if not.
+ gl_FragColor = ((t0 == 0.0) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script id="fragmentShaderBGreaterThanACheckT1" type="text/something-not-javascript">
+// fragment shader with for scoping should succeed
+precision mediump float;
+void main() {
+ float a = 2.0;
+ float b = 3.0;
+ float t0 = 0.0;
+ float t1 = 0.0;
+ float r0 = 0.5;
+ float r1 = 1.0;
+ float ab = a > b ? (t0 = r0, a) : (t1 = r1, b);
+ // Output green if successful, red if not.
+ gl_FragColor = ((t1 == r1) ? vec4(0,1,0,1) : vec4(1,0,0,1));
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runRenderTests([
+{ vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShaderAGreaterThanBCheckR',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShaderAGreaterThanBCheckAB',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShaderAGreaterThanBCheckT0',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShaderAGreaterThanBCheckT1',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShaderBGreaterThanACheckR',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShaderBGreaterThanACheckAB',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShaderBGreaterThanACheckT0',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "comma based conditional assignment works",
+},
+{ vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShaderBGreaterThanACheckT1',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "comma based conditional assignment works",
+}
+]);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping-negative.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping-negative.html
new file mode 100644
index 000000000..04d049811
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping-negative.html
@@ -0,0 +1,67 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with illegal references to conditionally scoped variables should fail
+precision mediump float;
+void main() {
+ int k = 3;
+
+ if (true) int g = k = 4;
+ else int q = k = 5;
+
+ g = 3; // should error
+ q = 4; // should error
+
+ gl_FragColor = vec4(1.);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping.html
new file mode 100644
index 000000000..efa995575
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping.html
@@ -0,0 +1,70 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with conditional scoping should succeed
+precision mediump float;
+void main() {
+ int k = 3;
+
+ if (true) int g = k = 4;
+ else int q = k = 5;
+
+ if (true) int g = 4;
+ else int k = 10;
+
+ if (true) { int g = 10; }
+ else { int k = 20; }
+
+ gl_FragColor = vec4(1.);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.frag.html
new file mode 100644
index 000000000..af1b0c726
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.frag.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with default precision should succeed
+precision mediump float;
+precision mediump int;
+precision lowp sampler2D;
+precision lowp samplerCube;
+void main()
+{
+ gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.vert.html
new file mode 100644
index 000000000..d0600139c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.vert.html
@@ -0,0 +1,64 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader with default precision should succeed
+precision mediump float;
+precision mediump int;
+precision lowp sampler2D;
+precision lowp samplerCube;
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-define-line-continuation.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-define-line-continuation.frag.html
new file mode 100644
index 000000000..5f4dd0000
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-define-line-continuation.frag.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader that uses line continuation macro should fail
+#define foo this \
+ is a test
+precision mediump float;
+void main()
+{
+ gl_FragColor = vec4(0.0,0.0,0.0,1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx-no-ext.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx-no-ext.frag.html
new file mode 100644
index 000000000..01c73b11d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx-no-ext.frag.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader that uses dFdx without #extension should fail
+precision mediump float;
+void main()
+{
+ gl_FragColor = vec4(dFdx(0.5),0.0,0.0,1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx.frag.html
new file mode 100644
index 000000000..d05d20e19
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx.frag.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader that uses dFdx should fail
+#extension GL_OES_standard_derivatives:enable
+precision mediump float;
+void main()
+{
+ gl_FragColor = vec4(dFdx(0.5),0.0,0.0,1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-do-loop.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-do-loop.html
new file mode 100644
index 000000000..4423076d4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-do-loop.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with do loop should fail
+precision mediump float;
+void main() {
+ int k = 0;
+ do {
+ k++;
+ } while (k < 5);
+ gl_FragColor = vec4(float(k));
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-error-directive.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-error-directive.html
new file mode 100644
index 000000000..bff5e6538
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-error-directive.html
@@ -0,0 +1,74 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fshaderWithErrorDirective" type="text/something-not-javascript">
+#error testing123 testing123
+void main()
+{
+ gl_FragColor = vec4(0,0,0,0);
+}
+</script>
+<script>
+"use strict";
+description("Checks shader with error directive");
+
+var wtu = WebGLTestUtils;
+GLSLConformanceTester.runTests([
+{ vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fshaderWithErrorDirective',
+ fShaderSuccess: false,
+ // We can't test for the actual error message as
+ // GLSL 1.0.17 11 says the messages are implementation dependant.
+ //fShaderTest: (function() {
+ // return wtu.getLastError().indexOf("testing123 testing123") >= 0; }),
+ linkSuccess: false,
+ passMsg: "error directive causes error",
+},
+]);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-explicit-int-cast.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-explicit-int-cast.vert.html
new file mode 100644
index 000000000..1ede34634
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-explicit-int-cast.vert.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader that explicit int to float cast should succeed
+attribute vec4 vPosition;
+void main()
+{
+ int k = 123;
+ gl_Position = vec4(vPosition.x, vPosition.y, vPosition.z, float(k));
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-float-return-value.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-float-return-value.frag.html
new file mode 100644
index 000000000..4080221d1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-float-return-value.frag.html
@@ -0,0 +1,69 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// Shader with float return value from function call should succeed
+precision mediump float;
+
+float functionResult();
+
+void main()
+{
+ float r = functionResult();
+ gl_FragColor = vec4(r, r, r, r);
+}
+
+float functionResult()
+{
+ return 1.0;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-loop.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-loop.html
new file mode 100644
index 000000000..cabfed9f8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-loop.html
@@ -0,0 +1,108 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with for loop should succeed
+
+// TODO(gman): trim to min size to test bug.
+precision mediump float;
+uniform float time;
+uniform vec2 resolution;
+
+// Saw-tooth function that is synced with the demo music (128bpm)
+float gBeat;
+
+// Calculate the surface color
+vec3 surfColor(vec2 p)
+{
+ vec2 q=vec2(sin(.08*p.x),4.*p.y);
+ vec3 c=vec3(0);
+ for(float i=0.;i<15.;i++)
+ c+=(1.+sin(i*sin(time)+vec3(0.,1.3,2.2)))*.2/length(q-vec2(sin(i),12.*sin(.3*time+i)));
+ return c+vec3(mix(mod(floor(p.x*.2)+floor(p.y*2.2),2.),.2,gBeat));
+}
+
+// Ray trace (cylinder)
+vec3 trace(vec3 o,vec3 d)
+{
+ d.y*=.65+.1*sin(.5*time);
+ float D=1./(d.y*d.y+d.z*d.z),
+ a=(o.y*d.y+o.z*d.z)*D,
+ b=(o.y*o.y+o.z*o.z-36.)*D,
+ t=-a-sqrt(a*a-b);
+ o+=t*d;
+ return surfColor(vec2(o.x,atan(o.y,o.z)))*(1.+.01*t);
+}
+
+void main()
+{
+ gBeat=fract(time*3.2/3.);
+ // Screen setup
+ vec2 p=(2.*gl_FragCoord.xy-resolution)/resolution.y,
+ q=2.*gl_FragCoord.xy/resolution-1.;
+
+ // Camera setup
+ vec3 cp=vec3(-time*20.+1.,1.6*sin(time*1.2),2.+2.*cos(time*.3)),
+ ct=cp+vec3(1.,.3*cos(time),-.2),
+ cd=normalize(ct-cp),
+ cr=normalize(cross(cd,vec3(.5*cos(.3*time),0.,1.))),
+ cu=cross(cr,cd),
+ rd=normalize(2.*cd+cr*p.x+cu*p.y);
+
+ // Trace! (+some funky lens/raster effects)
+ vec3 c=trace(cp,rd)*
+ min(1.,1.8-dot(q,q))*
+ (.9+.1*sin(3.*sin(gBeat)*gl_FragCoord.y));
+
+ gl_FragColor=vec4(c,1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-scoping.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-scoping.html
new file mode 100644
index 000000000..e0e054758
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-scoping.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with illegal for scoping should fail
+precision mediump float;
+void main() {
+ int k = 0;
+ for (int i = 0; i < 10; i++) { int i = k+i; } // not a nested scope, in i's scope, nesting already happened
+ gl_FragColor = vec4(float(k));
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-frag-depth.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-frag-depth.frag.html
new file mode 100644
index 000000000..f3936f1fd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-frag-depth.frag.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader that uses gl_FragDepth should fail
+precision mediump float;
+void main()
+{
+ gl_FragColor = vec4(0.0,0.0,0.0,1.0);
+ gl_FragDepth = 1.0;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-recursion.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-recursion.frag.html
new file mode 100644
index 000000000..a6c753536
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-recursion.frag.html
@@ -0,0 +1,70 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// shader with recursive function calls should fail
+void a();
+void b();
+void main()
+{
+ a();
+ gl_FragColor = vec4(0,0,0,0);
+}
+void a()
+{
+ b();
+}
+void b()
+{
+ a();
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-scoped-struct.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-scoped-struct.html
new file mode 100644
index 000000000..1c17f453a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-scoped-struct.html
@@ -0,0 +1,65 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with private function scoped struct should fail.
+precision mediump float;
+int fun2(struct s { int m; } g) { return g.m; }
+
+s a;
+
+void main() {
+ int e = fun2(s(3));
+
+ gl_FragColor = vec4(1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-functional-scoping.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-functional-scoping.html
new file mode 100644
index 000000000..bd0f2efb4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-functional-scoping.html
@@ -0,0 +1,64 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with invalid functional scoping should fail
+precision mediump float;
+int f(int k) {
+ int k = k + 3;
+ return k;
+}
+
+void main() {
+ gl_FragColor = vec4(f(100));
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glcolor.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glcolor.vert.html
new file mode 100644
index 000000000..4e54df133
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glcolor.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader that uses gl_Color should fail
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = gl_Color;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-1.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-1.frag.html
new file mode 100644
index 000000000..5b8c86840
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-1.frag.html
@@ -0,0 +1,64 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader that expects GL_ES == 1 should succeed
+#if GL_ES == 1
+ precision mediump float;
+ void main()
+ {
+ gl_FragColor = vec4(0.0,0.0,0.0,1.0);
+ }
+#else
+ foo
+#endif
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-symbol.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-symbol.frag.html
new file mode 100644
index 000000000..f37e64b38
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-symbol.frag.html
@@ -0,0 +1,64 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader that uses GL_ES preprocessor symbol should succeed
+#if defined(GL_ES)
+ precision mediump float;
+ void main()
+ {
+ gl_FragColor = vec4(0.0,0.0,0.0,1.0);
+ }
+#else
+ foo
+#endif
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html
new file mode 100644
index 000000000..612948faa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html
@@ -0,0 +1,151 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fshaderWithMediumpGlobal" type="text/something-not-javascript">
+// There is no default float precision in fragment shaders, so specify mediump.
+precision mediump float;
+
+uniform vec4 foo;
+
+void main()
+{
+ gl_FragColor = foo;
+}
+</script>
+<script id="fshaderWithMediumpGlobalInt" type="text/something-not-javascript">
+// Default precision for int in fragment shaders is mediump.
+uniform int foo;
+
+void main()
+{
+ gl_FragColor = vec4(foo, 0, 0, 1);
+}
+</script>
+<script id="fshaderWithMediumpGlobalStruct" type="text/something-not-javascript">
+// There is no default float precision in fragment shaders, so specify mediump.
+precision mediump float;
+
+struct foo
+{
+ vec4 bar;
+};
+
+uniform foo baz;
+
+void main()
+{
+ gl_FragColor = baz.bar;
+}
+</script>
+<script id="vshaderWithHighpGlobal" type="x-shader/x-vertex">
+// Default precision for vertex shaders is highp.
+uniform vec4 foo;
+
+void main() {
+ gl_Position = foo;
+}
+</script>
+<script id="vshaderWithHighpGlobalInt" type="x-shader/x-vertex">
+// Default precision for int in vertex shaders is highp.
+uniform int foo;
+
+void main() {
+ gl_Position = vec4(foo, 0, 0, 1);
+}
+</script>
+<script id="vshaderWithHighpGlobalStruct" type="x-shader/x-vertex">
+// Default precision for vertex shaders is highp.
+struct foo
+{
+ vec4 bar;
+};
+
+uniform foo baz;
+
+void main()
+{
+ gl_Position = baz.bar;
+}
+</script>
+<script>
+"use strict";
+description("Checks shaders with global variables and precision qualifier mismatch.");
+
+var wtu = WebGLTestUtils;
+
+var glslTests = [];
+
+glslTests.push({
+ vShaderId: 'vshaderWithHighpGlobal',
+ vShaderSuccess: true,
+ fShaderId: 'fshaderWithMediumpGlobal',
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "mismatching precision for uniforms causes link error (as expected)",
+});
+
+glslTests.push({
+ vShaderId: 'vshaderWithHighpGlobalInt',
+ vShaderSuccess: true,
+ fShaderId: 'fshaderWithMediumpGlobalInt',
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "mismatching precision for int uniforms with default precision causes link error (as expected)",
+});
+
+glslTests.push({
+ vShaderId: 'vshaderWithHighpGlobalStruct',
+ vShaderSuccess: true,
+ fShaderId: 'fshaderWithMediumpGlobalStruct',
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "mismatching precision for structure uniforms causes link error (as expected)",
+});
+
+GLSLConformanceTester.runTests(glslTests);
+
+debug("");
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html
new file mode 100644
index 000000000..c89b2f38e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader that uses gl_ProjectionMatrix should fail
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition * gl_ProjectionMatrix;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-hex-int-constant-macro.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-hex-int-constant-macro.html
new file mode 100644
index 000000000..716a4c552
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-hex-int-constant-macro.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader uses the long integer constant should succeed
+attribute vec4 vPosition;
+void main()
+{
+ #define TEST 0x1F
+ int a = TEST;
+
+ gl_Position = vPosition;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-implicit-vec3-to-vec4-cast.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-implicit-vec3-to-vec4-cast.vert.html
new file mode 100644
index 000000000..f1be8d047
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-implicit-vec3-to-vec4-cast.vert.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader that implicit vec3 to vec4 cast should fail
+attribute vec4 vPosition;
+void main()
+{
+ mediump vec3 k = vec3(1, 2, 3);
+ gl_Position = k;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-include.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-include.vert.html
new file mode 100644
index 000000000..bc4a6dcda
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-include.vert.html
@@ -0,0 +1,64 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader uses #include should fail
+
+// Sadly I can not force the current path so this could fail beacuse include.vs
+// does not exist, not because #include is disallowed.
+#include "include.vs"
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-int-return-value.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-int-return-value.frag.html
new file mode 100644
index 000000000..ddcca8d2e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-int-return-value.frag.html
@@ -0,0 +1,67 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// Shader with int return value from function call should succeed
+int functionResult();
+
+void main()
+{
+ int r = functionResult();
+ gl_FragColor = vec4(r, r, r, r);
+}
+
+int functionResult()
+{
+ return 1;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-invalid-identifier.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-invalid-identifier.frag.html
new file mode 100644
index 000000000..3045ea0ad
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-invalid-identifier.frag.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with gl_ identifier should fail
+precision mediump float;
+uniform float gl_foo;
+void main()
+{
+ gl_FragColor = vec4(gl_foo,0.0,0.0,1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec2-return-value.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec2-return-value.frag.html
new file mode 100644
index 000000000..a68b24613
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec2-return-value.frag.html
@@ -0,0 +1,67 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// Shader with ivec2 return value from function call should succeed
+ivec2 functionResult();
+
+void main()
+{
+ ivec2 r = functionResult();
+ gl_FragColor = vec4(r.x, r.y, r.x, r.y);
+}
+
+ivec2 functionResult()
+{
+ return ivec2(1, 1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec3-return-value.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec3-return-value.frag.html
new file mode 100644
index 000000000..07520e788
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec3-return-value.frag.html
@@ -0,0 +1,67 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// Shader with ivec3 return value from function call should succeed
+ivec3 functionResult();
+
+void main()
+{
+ ivec3 r = functionResult();
+ gl_FragColor = vec4(r.x, r.y, r.z, r.x);
+}
+
+ivec3 functionResult()
+{
+ return ivec3(1, 1, 1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec4-return-value.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec4-return-value.frag.html
new file mode 100644
index 000000000..83535db94
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec4-return-value.frag.html
@@ -0,0 +1,67 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// Shader with ivec4 return value from function call should succeed
+ivec4 functionResult();
+
+void main()
+{
+ ivec4 r = functionResult();
+ gl_FragColor = vec4(r.x, r.y, r.z, r.w);
+}
+
+ivec4 functionResult()
+{
+ return ivec4(1, 1, 1, 1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-limited-indexing.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-limited-indexing.frag.html
new file mode 100644
index 000000000..456df8ac9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-limited-indexing.frag.html
@@ -0,0 +1,77 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader should succeed
+attribute vec4 a_weights;
+varying vec4 v_weights;
+
+void main() {
+ v_weights = a_weights;
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
+</script>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with appropriately limited indexing expression should succeed
+// http://www.khronos.org/registry/webgl/specs/latest/#SUPPORTED_GLSL_CONSTRUCTS
+precision mediump float;
+
+uniform vec4 u_colors[8];
+varying vec4 v_weights;
+
+void main()
+{
+ vec4 color = vec4(0.0, 0.0, 0.0, 0.0);
+ for (int i = 0; i < 4; i++) {
+ color += u_colors[i] * v_weights[i];
+ }
+ gl_FragColor = color;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-long-line.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-long-line.html
new file mode 100644
index 000000000..7c6423c5a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-long-line.html
@@ -0,0 +1,91 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fshaderWithLongLine" type="text/something-not-javascript">
+precision mediump float;
+uniform float fooo;
+#if defined(someSymbolNotDefined)
+#error long
+#endif
+void main()
+{
+ gl_FragColor = vec4(fooo+fooo+fooo+fooo, fooo+fooo+fooo+fooo, fooo+fooo+fooo+fooo, 1.0);
+}
+</script>
+<script>
+"use strict";
+description("checks shader with long line succeeds");
+
+var wtu = WebGLTestUtils;
+GLSLConformanceTester.runTests([
+ { vShaderId: undefined,
+ vShaderSuccess: true,
+ fShaderId: 'fshaderWithLongLine',
+ fShaderSuccess: true,
+ fShaderPrep: function(str) {
+ function expand(str, re, replacement, count) {
+ for (var ii = 0; ii < count; ++ii) {
+ str = str.replace(re, replacement);
+ }
+ return str;
+ }
+ str = expand(str, new RegExp(" ", 'g'), " ", 12);
+ var manyZeros = expand("0", new RegExp("0", 'g'), "00", 8).substring(2);
+ str = expand(str, new RegExp("0", 'g'), manyZeros, 1);
+ str = expand(str, new RegExp("fooo", 'g'), "fooofooo", 6);
+ str = expand(str, new RegExp("long", 'g'), "longlong", 6);
+ //debug("len:" + str.length);
+ //debug(str);
+ return str;
+ },
+ linkSuccess: true,
+ passMsg: 'shader that uses long lines should succeed',
+ }
+ ]);
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-ascii-error.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-ascii-error.frag.html
new file mode 100644
index 000000000..9b8f50be0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-ascii-error.frag.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// shader with error directive using characters outside of allowed set fails
+#error // will return INVALID_VALUE. See WebGL 6.18
+void main()
+{
+ gl_FragColor = vec4(0,0,0,0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html
new file mode 100644
index 000000000..389d856b0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html
@@ -0,0 +1,721 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests - Non Reserved Words</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader0" type="text/something-not-javascript">
+struct $replaceMe {
+ vec4 $replaceMe;
+};
+struct Foo {
+ $replaceMe $replaceMe;
+};
+attribute vec4 position;
+void main()
+{
+ Foo f;
+ f.$replaceMe.$replaceMe = position;
+ gl_Position = f.$replaceMe.$replaceMe;
+}
+</script>
+<script id="fragmentShader0" type="text/something-not-javascript">
+precision mediump float;
+vec4 $replaceMe() {
+ return vec4(0,1,0,1);
+}
+void main()
+{
+ gl_FragColor = $replaceMe();
+}
+</script>
+<script id="vertexShader1" type="text/something-not-javascript">
+attribute vec4 $replaceMe;
+void main()
+{
+ gl_Position = $replaceMe;
+}
+</script>
+<script id="fragmentShader1" type="text/something-not-javascript">
+precision mediump float;
+vec4 foo(vec4 $replaceMe) {
+ return $replaceMe;
+}
+void main()
+{
+ gl_FragColor = foo(vec4(1,0,1,1));
+}
+</script>
+<script id="vertexShader2" type="text/something-not-javascript">
+varying vec4 $replaceMe;
+attribute vec4 position;
+void main()
+{
+ gl_Position = position;
+ $replaceMe = position;
+}
+</script>
+<script id="fragmentShader2" type="text/something-not-javascript">
+precision mediump float;
+varying vec4 $replaceMe;
+void main()
+{
+ gl_FragColor = $replaceMe;
+}
+</script>
+<script id="vertexShader3" type="text/something-not-javascript">
+attribute vec4 position;
+void main()
+{
+ gl_Position = position;
+}
+</script>
+<script id="fragmentShader3" type="text/something-not-javascript">
+precision mediump float;
+uniform vec4 $replaceMe;
+void main()
+{
+ gl_FragColor = $replaceMe;
+}
+</script>
+<script>
+"use strict";
+var DXWords = [
+ "Buffer",
+ "double",
+ "uint",
+ "half",
+ "dword",
+ "string",
+ "texture",
+ "pixelshader",
+ "vertexshader",
+ "switch",
+ "min16float",
+ "min10float",
+ "min16int",
+ "min12int",
+ "min16uint",
+ "vector",
+ "matrix",
+ "float2",
+ "float3",
+ "float4",
+ "float1x1",
+ "float1x2",
+ "float1x3",
+ "float1x4",
+ "float2x1",
+ "float2x2",
+ "float2x3",
+ "float2x4",
+ "float3x1",
+ "float3x2",
+ "float3x3",
+ "float3x4",
+ "float4x1",
+ "float4x2",
+ "float4x3",
+ "float4x4",
+ "int1x1",
+ "int1x2",
+ "int1x3",
+ "int1x4",
+ "int2x1",
+ "int2x2",
+ "int2x3",
+ "int2x4",
+ "int3x1",
+ "int3x2",
+ "int3x3",
+ "int3x4",
+ "int4x1",
+ "int4x2",
+ "int4x3",
+ "int4x4",
+ "double1x1",
+ "double1x2",
+ "double1x3",
+ "double1x4",
+ "double2x1",
+ "double2x2",
+ "double2x3",
+ "double2x4",
+ "double3x1",
+ "double3x2",
+ "double3x3",
+ "double3x4",
+ "double4x1",
+ "double4x2",
+ "double4x3",
+ "double4x4",
+ "abort",
+ "abs",
+ "acos",
+ "all",
+ "AllMemoryBarrier",
+ "AllMemoryBarrierWithGroupSync",
+ "any",
+ "asdouble",
+ "asfloat",
+ "asin",
+ "asint",
+ "asint",
+ "asuint",
+ "asuint",
+ "atan",
+ "atan2",
+ "ceil",
+ "clamp",
+ "clip",
+ "cos",
+ "cosh",
+ "countbits",
+ "cross",
+ "D3DCOLORtoUBYTE4",
+ "ddx",
+ "ddx_coarse",
+ "ddx_fine",
+ "ddy",
+ "ddy_coarse",
+ "ddy_fine",
+ "degrees",
+ "determinant",
+ "DeviceMemoryBarrier",
+ "DeviceMemoryBarrierWithGroupSync",
+ "distance",
+ "dot",
+ "dst",
+ "errorf",
+ "EvaluateAttributeAtCentroid",
+ "EvaluateAttributeAtSample",
+ "EvaluateAttributeSnapped",
+ "exp",
+ "exp2",
+ "f16tof32",
+ "f32tof16",
+ "faceforward",
+ "firstbithigh",
+ "firstbitlow",
+ "floor",
+ "fma",
+ "fmod",
+ "frac",
+ "frexp",
+ "fwidth",
+ "GetRenderTargetSampleCount",
+ "GetRenderTargetSamplePosition",
+ "GroupMemoryBarrier",
+ "GroupMemoryBarrierWithGroupSync",
+ "InterlockedAdd",
+ "InterlockedAnd",
+ "InterlockedCompareExchange",
+ "InterlockedCompareStore",
+ "InterlockedExchange",
+ "InterlockedMax",
+ "InterlockedMin",
+ "InterlockedOr",
+ "InterlockedXor",
+ "isfinite",
+ "isinf",
+ "isnan",
+ "ldexp",
+ "length",
+ "lerp",
+ "lit",
+ "log",
+ "log10",
+ "log2",
+ "mad",
+ "max",
+ "min",
+ "modf",
+ "msad4",
+ "mul",
+ "noise",
+ "normalize",
+ "pow",
+ "printf",
+ "Process2DQuadTessFactorsAvg",
+ "Process2DQuadTessFactorsMax",
+ "Process2DQuadTessFactorsMin",
+ "ProcessIsolineTessFactors",
+ "ProcessQuadTessFactorsAvg",
+ "ProcessQuadTessFactorsMax",
+ "ProcessQuadTessFactorsMin",
+ "ProcessTriTessFactorsAvg",
+ "ProcessTriTessFactorsMax",
+ "ProcessTriTessFactorsMin",
+ "radians",
+ "rcp",
+ "reflect",
+ "refract",
+ "reversebits",
+ "round",
+ "rsqrt",
+ "saturate",
+ "sign",
+ "sin",
+ "sincos",
+ "sinh",
+ "smoothstep",
+ "sqrt",
+ "step",
+ "tan",
+ "tanh",
+ "tex1D",
+ "tex1D",
+ "tex1Dbias",
+ "tex1Dgrad",
+ "tex1Dlod",
+ "tex1Dproj",
+ "tex2D",
+ "tex2D",
+ "tex2Dbias",
+ "tex2Dgrad",
+ "tex2Dlod",
+ "tex2Dproj",
+ "tex3D",
+ "tex3D",
+ "tex3Dbias",
+ "tex3Dgrad",
+ "tex3Dlod",
+ "tex3Dproj",
+ "texCUBE",
+ "texCUBE",
+ "texCUBEbias",
+ "texCUBEgrad",
+ "texCUBElod",
+ "texCUBEproj",
+ "transpose",
+ "trunc"
+];
+
+var GLSL_4_20_11_words = [
+ "attribute",
+ "const",
+ "uniform",
+ "varying",
+ "coherent",
+ "volatile",
+ "restrict",
+ "readonly",
+ "writeonly",
+ "atomic_uint",
+ "layout",
+ "centroid",
+ "flat",
+ "smooth",
+ "noperspective",
+ "patch",
+ "sample",
+ "break",
+ "continue",
+ "do",
+ "for",
+ "while",
+ "switch",
+ "case",
+ "default",
+ "if",
+ "else",
+ "subroutine",
+ "in",
+ "out",
+ "inout",
+ "float",
+ "double",
+ "int",
+ "void",
+ "bool",
+ "true",
+ "false",
+ "invariant",
+ "discard",
+ "return",
+ "mat2",
+ "mat3",
+ "mat4",
+ "dmat2",
+ "dmat3",
+ "dmat4",
+ "mat2x2",
+ "mat2x3",
+ "mat2x4",
+ "dmat2x2",
+ "dmat2x3",
+ "dmat2x4",
+ "mat3x2",
+ "mat3x3",
+ "mat3x4",
+ "dmat3x2",
+ "dmat3x3",
+ "dmat3x4",
+ "mat4x2",
+ "mat4x3",
+ "mat4x4",
+ "dmat4x2",
+ "dmat4x3",
+ "dmat4x4",
+ "vec2",
+ "vec3",
+ "vec4",
+ "ivec2",
+ "ivec3",
+ "ivec4",
+ "bvec2",
+ "bvec3",
+ "bvec4",
+ "dvec2",
+ "dvec3",
+ "dvec4",
+ "uint",
+ "uvec2",
+ "uvec3",
+ "uvec4",
+ "lowp",
+ "mediump",
+ "highp",
+ "precision",
+ "sampler1D",
+ "sampler2D",
+ "sampler3D",
+ "samplerCube",
+ "sampler1DShadow",
+ "sampler2DShadow",
+ "samplerCubeShadow",
+ "sampler1DArray",
+ "sampler2DArray",
+ "sampler1DArrayShadow",
+ "sampler2DArrayShadow",
+ "isampler1D",
+ "isampler2D",
+ "isampler3D",
+ "isamplerCube",
+ "isampler1DArray",
+ "isampler2DArray",
+ "usampler1D",
+ "usampler2D",
+ "usampler3D",
+ "usamplerCube",
+ "usampler1DArray",
+ "usampler2DArray",
+ "sampler2DRect",
+ "sampler2DRectShadow",
+ "isampler2DRect",
+ "usampler2DRect",
+ "samplerBuffer",
+ "isamplerBuffer",
+ "usamplerBuffer",
+ "sampler2DMS",
+ "isampler2DMS",
+ "usampler2DMS",
+ "sampler2DMSArray",
+ "isampler2DMSArray",
+ "usampler2DMSArray",
+ "samplerCubeArray",
+ "samplerCubeArrayShadow",
+ "isamplerCubeArray",
+ "usamplerCubeArray",
+ "image1D",
+ "iimage1D",
+ "uimage1D",
+ "image2D",
+ "iimage2D",
+ "uimage2D",
+ "image3D",
+ "iimage3D",
+ "uimage3D",
+ "image2DRect",
+ "iimage2DRect",
+ "uimage2DRect",
+ "imageCube",
+ "iimageCube",
+ "uimageCube",
+ "imageBuffer",
+ "iimageBuffer",
+ "uimageBuffer",
+ "image1DArray",
+ "iimage1DArray",
+ "uimage1DArray",
+ "image2DArray",
+ "iimage2DArray",
+ "uimage2DArray",
+ "imageCubeArray",
+ "iimageCubeArray",
+ "uimageCubeArray",
+ "image2DMS",
+ "iimage2DMS",
+ "uimage2DMS",
+ "image2DMSArray",
+ "iimage2DMSArray",
+ "uimage2DMSArray",
+ "struct"
+];
+
+var GLSL_4_20_11_future_words = [
+ "common",
+ "partition",
+ "active",
+ "asm",
+ "class",
+ "union",
+ "enum",
+ "typedef",
+ "template",
+ "this",
+ "packed",
+ "resource",
+ "goto",
+ "inline",
+ "noinline",
+ "public",
+ "static",
+ "extern",
+ "external",
+ "interface",
+ "long",
+ "short",
+ "half",
+ "fixed",
+ "unsigned",
+ "superp",
+ "input",
+ "output",
+ "hvec2",
+ "hvec3",
+ "hvec4",
+ "fvec2",
+ "fvec3",
+ "fvec4",
+ "sampler3DRect",
+ "filter",
+ "sizeof",
+ "cast",
+ "namespace",
+ "using",
+ "row_major"
+];
+
+var GLSL_1_0_17_words = [
+ "attribute",
+ "const",
+ "uniform",
+ "varying",
+ "break",
+ "continue",
+ "do",
+ "for",
+ "while",
+ "if",
+ "else",
+ "in",
+ "out",
+ "inout",
+ "float",
+ "int",
+ "void",
+ "bool",
+ "true",
+ "false",
+ "lowp",
+ "mediump",
+ "highp",
+ "precision",
+ "invariant",
+ "discard",
+ "return",
+ "mat2",
+ "mat3",
+ "mat4",
+ "vec2",
+ "vec3",
+ "vec4",
+ "ivec2",
+ "ivec3",
+ "ivec4",
+ "bvec2",
+ "bvec3",
+ "bvec4",
+ "sampler2D",
+ "samplerCube",
+ "struct"
+]
+
+var GLSL_1_0_17_FutureWords = [
+ "asm",
+ "class",
+ "union",
+ "enum",
+ "typedef",
+ "template",
+ "this",
+ "packed",
+ "goto",
+ "switch",
+ "default",
+ "inline",
+ "noinline",
+ "volatile",
+ "public",
+ "static",
+ "extern",
+ "external",
+ "interface",
+ "flat",
+ "long",
+ "short",
+ "double",
+ "half",
+ "fixed",
+ "unsigned",
+ "superp",
+ "input",
+ "output",
+ "hvec2",
+ "hvec3",
+ "hvec4",
+ "dvec2",
+ "dvec3",
+ "dvec4",
+ "fvec2",
+ "fvec3",
+ "fvec4",
+ "sampler1D",
+ "sampler3D",
+ "sampler1DShadow",
+ "sampler2DShadow",
+ "sampler2DRect",
+ "sampler3DRect",
+ "sampler2DRectShadow",
+ "sizeof",
+ "cast",
+ "namespace",
+ "using"
+];
+
+description();
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+
+var badWords = [
+ { words: DXWords },
+ { words: GLSL_4_20_11_words, },
+ { words: GLSL_4_20_11_future_words, }
+];
+
+var reservedWordsLists = [
+ GLSL_1_0_17_words,
+ GLSL_1_0_17_FutureWords
+];
+
+var reservedWords = { };
+for (var ii = 0; ii < reservedWordsLists.length; ++ii) {
+ var list = reservedWordsLists[ii];
+ for (var jj = 0; jj < list.length; ++jj) {
+ reservedWords[list[jj]] = true;
+ }
+}
+
+var checkedWords = {};
+
+var src = [];
+for (var ii = 0; ii < 4; ++ii) {
+ var vsrc = document.getElementById("vertexShader" + ii).text;
+ var fsrc = document.getElementById("fragmentShader" + ii).text;
+ src.push({vsrc: vsrc, fsrc: fsrc});
+}
+
+var badWordNdx = 0;
+var listNdx = 0;
+
+function testNextWord() {
+ var list = badWords[badWordNdx].words;
+ if (listNdx >= list.length) {
+ ++badWordNdx;
+ if (badWordNdx >= badWords.length) {
+ finishTest();
+ return;
+ }
+ listNdx = 0;
+ list = badWords[badWordNdx].words;
+ }
+ testWord(list[listNdx]);
+ ++listNdx;
+ setTimeout(testNextWord, 0);
+}
+testNextWord();
+
+function testWord(word) {
+ if (word in reservedWords || word in checkedWords) {
+ return;
+ }
+ checkedWords[word] = true;
+ debug("");
+ debug("testing: " + word);
+
+ for (var ii = 0; ii < src.length; ++ii) {
+ var vs = src[ii].vsrc.replace(/\$replaceMe/g, word);
+ var fs = src[ii].fsrc.replace(/\$replaceMe/g, word);
+
+ var success = true;
+ var program = wtu.loadProgram(gl, vs, fs, function(msg) {
+ debug(msg);
+ success = false;
+ }, true);
+ if (success) {
+ testPassed("shader with: '" + word + "' compiled");
+ } else {
+ testFailed("shader with: '" + word + "' failed to compile");
+ }
+ if (program) {
+ gl.deleteProgram(program);
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no GL errors");
+ }
+}
+
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-precision.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-precision.frag.html
new file mode 100644
index 000000000..62d7b7195
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-precision.frag.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with precision should succeed
+void main()
+{
+ mediump vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
+ gl_FragColor = color;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-preprocessor-whitespace.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-preprocessor-whitespace.html
new file mode 100644
index 000000000..d2ba82c02
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-preprocessor-whitespace.html
@@ -0,0 +1,87 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexWhitespace" type="text/something-not-javascript">
+// GLSL ES spec section 3.4
+ # ifdef GL_ES
+attribute vec4 v_Position;
+void main()
+{
+ gl_Position = v_Position;
+}
+#endif
+</script>
+<script id="fragmentWhitespace" type="text/something-not-javascript">
+// GLSL ES spec section 3.4
+ # ifdef GL_ES
+precision mediump float;
+void main()
+{
+ gl_FragColor = vec4(0.0,0.0,0.0,1.0);
+}
+#endif
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTests([
+ { vShaderId: 'vertexWhitespace',
+ vShaderSuccess: true,
+ fShaderId: null,
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: 'Vertex shader using space and tab characters around # should succeed'
+ },
+ { vShaderId: null,
+ vShaderSuccess: true,
+ fShaderId: 'fragmentWhitespace',
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: 'Fragment shader using space and tab characters around # should succeed'
+ }
+]);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-quoted-error.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-quoted-error.frag.html
new file mode 100644
index 000000000..179159005
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-quoted-error.frag.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// shader with error directive using quotes will fail
+#error "testing123 testing123" // will return INVALID_VALUE. See WebGL 6.18
+void main()
+{
+ gl_FragColor = vec4(0,0,0,0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-reserved-words.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-reserved-words.html
new file mode 100644
index 000000000..7d2f2883e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-reserved-words.html
@@ -0,0 +1,289 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests - Reserved Words</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader0" type="text/something-not-javascript">
+struct $replaceMe {
+ vec4 $replaceMe;
+};
+struct Foo {
+ $replaceMe $replaceMe;
+};
+attribute vec4 position;
+void main()
+{
+ Foo f;
+ f.$replaceMe.$replaceMe = position;
+ gl_Position = f.$replaceMe.$replaceMe;
+}
+</script>
+<script id="fragmentShader0" type="text/something-not-javascript">
+precision mediump float;
+vec4 $replaceMe() {
+ return vec4(0,1,0,1);
+}
+void main()
+{
+ gl_FragColor = $replaceMe();
+}
+</script>
+<script id="vertexShader1" type="text/something-not-javascript">
+attribute vec4 $replaceMe;
+void main()
+{
+ gl_Position = $replaceMe;
+}
+</script>
+<script id="fragmentShader1" type="text/something-not-javascript">
+precision mediump float;
+vec4 foo(vec4 $replaceMe) {
+ return $replaceMe;
+}
+void main()
+{
+ gl_FragColor = foo(vec4(1,0,1,1));
+}
+</script>
+<script id="vertexShader2" type="text/something-not-javascript">
+varying vec4 $replaceMe;
+attribute vec4 position;
+void main()
+{
+ gl_Position = position;
+ $replaceMe = position;
+}
+</script>
+<script id="fragmentShader2" type="text/something-not-javascript">
+precision mediump float;
+varying vec4 $replaceMe;
+void main()
+{
+ gl_FragColor = $replaceMe;
+}
+</script>
+<script id="vertexShader3" type="text/something-not-javascript">
+attribute vec4 position;
+void main()
+{
+ gl_Position = position;
+}
+</script>
+<script id="fragmentShader3" type="text/something-not-javascript">
+precision mediump float;
+uniform vec4 $replaceMe;
+void main()
+{
+ gl_FragColor = $replaceMe;
+}
+</script>
+<script>
+"use strict";
+var GLSL_1_0_17_words = [
+ "attribute",
+ "const",
+ "uniform",
+ "varying",
+ "break",
+ "continue",
+ "do",
+ "for",
+ "while",
+ "if",
+ "else",
+ "in",
+ "out",
+ "inout",
+ "float",
+ "int",
+ "void",
+ "bool",
+ "true",
+ "false",
+ "lowp",
+ "mediump",
+ "highp",
+ "precision",
+ "invariant",
+ "discard",
+ "return",
+ "mat2",
+ "mat3",
+ "mat4",
+ "vec2",
+ "vec3",
+ "vec4",
+ "ivec2",
+ "ivec3",
+ "ivec4",
+ "bvec2",
+ "bvec3",
+ "bvec4",
+ "sampler2D",
+ "samplerCube",
+ "struct"
+]
+
+var GLSL_1_0_17_FutureWords = [
+ "asm",
+ "class",
+ "union",
+ "enum",
+ "typedef",
+ "template",
+ "this",
+ "packed",
+ "goto",
+ "switch",
+ "default",
+ "inline",
+ "noinline",
+ "volatile",
+ "public",
+ "static",
+ "extern",
+ "external",
+ "interface",
+ "flat",
+ "long",
+ "short",
+ "double",
+ "half",
+ "fixed",
+ "unsigned",
+ "superp",
+ "input",
+ "output",
+ "hvec2",
+ "hvec3",
+ "hvec4",
+ "dvec2",
+ "dvec3",
+ "dvec4",
+ "fvec2",
+ "fvec3",
+ "fvec4",
+ "sampler1D",
+ "sampler3D",
+ "sampler1DShadow",
+ "sampler2DShadow",
+ "sampler2DRect",
+ "sampler3DRect",
+ "sampler2DRectShadow",
+ "sizeof",
+ "cast",
+ "namespace",
+ "using",
+ "__foo", // something that has 2 underscores
+ "foo__bar", // something that has 2 underscores
+ "gl_foo", // something that starts with gl_
+ "webgl_foo" // something that starts with webgl_
+];
+
+description();
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+
+var reservedWordsLists = [
+ GLSL_1_0_17_words,
+ GLSL_1_0_17_FutureWords
+];
+
+var reservedWords = [];
+for (var ii = 0; ii < reservedWordsLists.length; ++ii) {
+ var list = reservedWordsLists[ii];
+ for (var jj = 0; jj < list.length; ++jj) {
+ reservedWords.push(list[jj]);
+ }
+}
+
+var src = [];
+for (var ii = 0; ii < 4; ++ii) {
+ var vsrc = document.getElementById("vertexShader" + ii).text;
+ var fsrc = document.getElementById("fragmentShader" + ii).text;
+ src.push({vsrc: vsrc, fsrc: fsrc});
+}
+
+var wordNdx = 0;
+
+function testNextWord() {
+ if (wordNdx >= reservedWords.length) {
+ finishTest();
+ return;
+ }
+ testWord(reservedWords[wordNdx]);
+ ++wordNdx;
+ setTimeout(testNextWord, 0);
+}
+testNextWord();
+
+function testWord(word) {
+ debug("");
+ debug("testing: " + word);
+
+ for (var ii = 0; ii < src.length; ++ii) {
+ var vs = src[ii].vsrc.replace(/\$replaceMe/g, word);
+ var fs = src[ii].fsrc.replace(/\$replaceMe/g, word);
+
+ var success = true;
+ var program = wtu.loadProgram(gl, vs, fs, function(msg) {
+ //debug(msg);
+ success = false;
+ }, true);
+ if (success) {
+ testFailed("shader with: '" + word + "' compiled even though it should not");
+ } else {
+ testPassed("shader with: '" + word + "' correctly failed to compile");
+ }
+ if (program) {
+ gl.deleteProgram(program);
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no GL errors");
+ }
+}
+
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-short-circuiting-operators.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-short-circuiting-operators.html
new file mode 100644
index 000000000..5e08d2a6e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-short-circuiting-operators.html
@@ -0,0 +1,182 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebGL short-circuit evaluation</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"></script>
+ </head>
+ <body>
+ <div id="description"></div>
+ <div id="console"></div>
+ <canvas id="example" width="2" height="2"> </canvas>
+
+ <!-------------------------------------
+ WebGL Shaders
+---------------------------------------->
+ <!-- Pass through Shaders -->
+ <script id="vshader0" type="x-shader/x-vertex">
+ /* PASS-THROUGH VERTEX SHADER */
+ attribute vec4 vPosition;
+
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader0" type="x-shader/x-fragment">
+ /* PASS-THROUGH FRAGMENT SHADER */
+ precision mediump float;
+ varying vec4 vPassThrough;
+
+ void main()
+ {
+ gl_FragColor = vPassThrough;
+ }
+ </script>
+
+ <!-- basic conditonal short circuit Shaders -->
+ <script id="vshader1" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ varying vec4 vPassThrough;
+
+ void main()
+ {
+ int x = 1;
+ $(variables)
+
+ if ($(condition))
+ { /*do nothing*/ }
+
+ /* if x was unmodified return green, else return red */
+ vPassThrough = (x == 1) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader1" type="x-shader/x-fragment">
+ precision mediump float;
+
+ void main()
+ {
+ int x = 1;
+ $(variables)
+
+ if ($(condition))
+ { /*do nothing*/ }
+
+ gl_FragColor = (x == 1) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
+ }
+ </script>
+
+ <!-- Main body of the Webgl program -->
+ <script>
+ "use strict";
+ description();
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext();
+
+ wtu.setupUnitQuad(gl, [0, 1]);
+
+ var shaderTemplates = [
+ { vs: "vshader1", fs: "fshader0" }, // basic vertex short-circuit test
+ { vs: "vshader0", fs: "fshader1" }, // basic fragment short-circuit test
+ ];
+
+ /* replace the names of the shaders in the tempate variables with
+ * the shaders themselves */
+ for (var ii = 0; ii < shaderTemplates.length; ++ii) {
+ var template = shaderTemplates[ii];
+ template.vs = wtu.getScript(template.vs);
+ template.fs = wtu.getScript(template.fs);
+ }
+
+ /* define the conditon that will be used in the shaders. If additional
+ * variables are needed that are not present i the shader they my be
+ * defined in the variables variable */
+ var tests = [
+ { condition: "true || (x = 0) == 1", variables: "" }, /* test basic 'or' short circuit */
+ { condition: "false && (x = 0) == 1", variables: "" }, /* test basic 'and' short circuit */
+ { condition: "(j == 3 && j == k) || (j > (x = 0))", variables: "int j = 3;\nint k = 3;" }, /* test basic 'or' short circuit with actual condition */
+ { condition: "(j == 3 && j == k) && (j > (x = 0))", variables: "int j = 3;\nint k = 4;" }, /* test basic 'and' short circuit with actual condition */
+ { condition: "(j + 3 > k && ((j < 10) || (x + 5 > j + (x = 0))) || ( x = 0 ) == 7)", variables: "int j = 5;\nint k = 3;" }, /* complex test */
+ { condition: "j + 1 == 6 ? x == 1 || j > (x = 0) : (x = 0) == 1 && (x = 0) <= 1", variables: "int j = 5;" }, /* nested with ternary operator */
+ { condition: "true && (true || (x = 0) == 1)", variables: "" }, /* test unfold short circuit update order correctness */
+ ];
+
+ function testShortCircuit(test) {
+ debug("");
+ debug("testing short circuit condition: " + test.condition);
+
+ /* Setting clear color to blue */
+ gl.clearColor(0.0, 0.0, 1.0, 1.0);
+
+ for (var ii = 0; ii < shaderTemplates.length; ++ii) {
+
+ /* clear the screen so that subsequent tests don't conflict */
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ var template = shaderTemplates[ii];
+
+ var vs = wtu.replaceParams(template.vs, test);
+ var fs = wtu.replaceParams(template.fs, test);
+
+ var program = wtu.setupProgram(gl, [vs, fs], ['vPosition'], undefined, true);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green", 0);
+
+ gl.deleteProgram(program);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no GL errors");
+ }
+ }
+
+ var testNdx = 0;
+ function runNextTest() {
+ testShortCircuit(tests[testNdx++]);
+ if (testNdx >= tests.length) {
+ finishTest();
+ } else {
+ setTimeout(runNextTest, 0);
+ }
+ }
+
+ runNextTest();
+
+ var successfullyParsed = true;
+
+ </script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-similar-uniform-array-names.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-similar-uniform-array-names.html
new file mode 100644
index 000000000..cf4d796b7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-similar-uniform-array-names.html
@@ -0,0 +1,132 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>GLSL similar names issue</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 a_position;
+void main(void) {
+ gl_Position = a_position;
+}
+</script>
+<script id="fshader1" type="x-shader/x-fragment">
+precision mediump float;
+uniform vec4 u_nameCollision[2];
+uniform vec4 u_nameCollision2[2];
+uniform vec4 u_name[2];
+void main(void) {
+ gl_FragColor = u_nameCollision[0] + u_nameCollision2[0] + u_name[0];
+}
+</script>
+<script id="fshader2" type="x-shader/x-fragment">
+precision mediump float;
+uniform vec4 u_nameCollision2[2];
+uniform vec4 u_nameCollision[2];
+uniform vec4 u_name[2];
+void main(void) {
+ gl_FragColor = u_nameCollision2[0] + u_nameCollision[0] + u_name[0];
+}
+</script>
+<script id="fshader3" type="x-shader/x-fragment">
+precision mediump float;
+uniform vec4 u_nameCollision[2];
+uniform vec4 u_name[2];
+uniform vec4 u_nameCollision2[2];
+void main(void) {
+ gl_FragColor = u_nameCollision[0] + u_name[0] + u_nameCollision2[0];
+}
+</script>
+<script id="fshader4" type="x-shader/x-fragment">
+precision mediump float;
+uniform vec4 u_nameCollision2[2];
+uniform vec4 u_name[2];
+uniform vec4 u_nameCollision[2];
+void main(void) {
+ gl_FragColor = u_nameCollision2[0] + u_name[0] + u_nameCollision[0];
+}
+</script>
+<script id="fshader5" type="x-shader/x-fragment">
+precision mediump float;
+uniform vec4 u_name[2];
+uniform vec4 u_nameCollision[2];
+uniform vec4 u_nameCollision2[2];
+void main(void) {
+ gl_FragColor = u_name[0] + u_nameCollision[0] + u_nameCollision2[0];
+}
+</script>
+<script id="fshader6" type="x-shader/x-fragment">
+precision mediump float;
+uniform vec4 u_name[2];
+uniform vec4 u_nameCollision2[2];
+uniform vec4 u_nameCollision[2];
+void main(void) {
+ gl_FragColor = u_name[0] + u_nameCollision2[0] + u_nameCollision[0];
+}
+</script>
+</head>
+<body>
+<canvas id="canvas" width="50" height="50"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description();
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+wtu.setupUnitQuad(gl);
+
+for (var ii = 0; ii < 6; ++ii) {
+ var program = wtu.setupProgram(gl, ["vshader", "fshader" + (ii + 1)], ["a_position"]);
+ var loc1 = gl.getUniformLocation(program, "u_name[0]");
+ var loc2 = gl.getUniformLocation(program, "u_nameCollision[0]");
+ var loc3 = gl.getUniformLocation(program, "u_nameCollision2[0]");
+ gl.uniform4fv(loc1, [1, 0, 0, 0]);
+ gl.uniform4fv(loc2, [0, 1, 0, 0]);
+ gl.uniform4fv(loc3, [0, 0, 0, 1]);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [255, 255, 0, 255], "Should be yellow");
+}
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-too-many-uniforms.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-too-many-uniforms.html
new file mode 100644
index 000000000..1b6260c94
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-too-many-uniforms.html
@@ -0,0 +1,146 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 a_position;
+ void main()
+ {
+ gl_Position = a_position;
+ }
+</script>
+<script id="vshader-max" type="x-shader/x-vertex">
+ attribute vec4 a_position;
+ uniform vec4 u_color[$(maxUniformVectors)];
+ void main()
+ {
+ vec4 v = vec4(0, 0, 0, 0);
+ for (int i = 0; i < $(maxUniformVectors); ++i) {
+ v = v + vec4(u_color[i]);
+ }
+ gl_Position = a_position + v;
+ }
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+ void main()
+ {
+ gl_FragColor = vec4(0, 1, 0, 1);
+ }
+</script>
+<script id="fshader-max" type="x-shader/x-fragment">
+ precision mediump float;
+ uniform vec4 u_color[$(maxUniformVectors)];
+ void main()
+ {
+ vec4 v = vec4(0, 0, 0, 0);
+ for (int i = 0; i < $(maxUniformVectors); ++i) {
+ v = v + vec4(u_color[i]);
+ }
+ gl_FragColor = v;
+ }
+</script>
+<script>
+"use strict";
+description("checks shader with too many uniforms fails");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+var maxFragmentUniformVectors = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS);
+var maxVertexUniformVectors = gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS);
+
+// Up to 2 uniform vector registers may be spent for literal constants in
+// vshader-max or fshader-max code. One vector row is used for the vec4, and
+// another may be used for integer constants that are allowed to be treated
+// internally as floats and are packable to the space of one row. This is
+// according to the GLSL ES variable packing algorithm detailed in Section 7 of
+// Appendix A of the GLSL ES Specification 10.0.17.
+var maxVectorStorageUsedForLiterals = 2;
+
+var tests = [
+ { desc: "using all uniforms in vertex shader should succeed",
+ maxUniformVectors: maxVertexUniformVectors - maxVectorStorageUsedForLiterals,
+ vShader: "vshader-max",
+ fShader: "fshader",
+ success: true,
+ },
+ { desc: "using too many uniforms in vertex shader should fail",
+ maxUniformVectors: maxVertexUniformVectors + 1,
+ vShader: "vshader-max",
+ fShader: "fshader",
+ color: [0, 1, 0, 1],
+ success: false,
+ },
+ { desc: "using all uniforms in fragment shader should succeed",
+ maxUniformVectors: maxFragmentUniformVectors - maxVectorStorageUsedForLiterals,
+ vShader: "vshader",
+ fShader: "fshader-max",
+ success: true,
+ },
+ { desc: "using too many uniforms in fragment shader should fail",
+ maxUniformVectors: maxFragmentUniformVectors + 1,
+ vShader: "vshader",
+ fShader: "fshader-max",
+ color: [0, 1, 0, 1],
+ success: false,
+ },
+];
+
+var glslTests = [];
+
+for (var ii = 0; ii < tests.length; ++ii) {
+ var test = tests[ii];
+ var vSrc = wtu.replaceParams(wtu.getScript(test.vShader), test);
+ var fSrc = wtu.replaceParams(wtu.getScript(test.fShader), test);
+ glslTests.push({
+ vShaderSource: vSrc,
+ fShaderSource: fSrc,
+ linkSuccess: test.success,
+ passMsg: 'shader ' + test.desc,
+ });
+}
+
+GLSLConformanceTester.runTests(glslTests);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-undefined-preprocessor-symbol.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-undefined-preprocessor-symbol.frag.html
new file mode 100644
index 000000000..efda8d899
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-undefined-preprocessor-symbol.frag.html
@@ -0,0 +1,64 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader (3.4) undefined preprocessor symbol should fail
+#if UNDEFINED_FOO
+ // according to ES GLSL spec 3.4 undefined symbols should fail.
+#else
+ precision mediump float;
+ void main()
+ {
+ gl_FragColor = vec4(0.0,0.0,0.0,1.0);
+ }
+#endif
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-uniform-in-loop-condition.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-uniform-in-loop-condition.vert.html
new file mode 100644
index 000000000..f776cf1c5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-uniform-in-loop-condition.vert.html
@@ -0,0 +1,65 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader with uniform variable in loop condition should fail
+// http://www.khronos.org/registry/webgl/specs/latest/#SUPPORTED_GLSL_CONSTRUCTS
+uniform int u_numIterations;
+attribute vec4 a_position;
+
+void main()
+{
+ float count = 0.0;
+ for (int i = 0; i < u_numIterations; i++) {
+ count += 1.0;
+ }
+ gl_Position = a_position + vec4(count, count, count, count);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec2-return-value.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec2-return-value.frag.html
new file mode 100644
index 000000000..f46202f6a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec2-return-value.frag.html
@@ -0,0 +1,69 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// Shader with vec2 return value from function call should succeed
+precision mediump float;
+
+vec2 functionResult();
+
+void main()
+{
+ vec2 r = functionResult();
+ gl_FragColor = vec4(r.x, r.y, r.x, r.y);
+}
+
+vec2 functionResult()
+{
+ return vec2(1.0, 1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec3-return-value.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec3-return-value.frag.html
new file mode 100644
index 000000000..c3f848836
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec3-return-value.frag.html
@@ -0,0 +1,69 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// Shader with vec3 return value from function call should succeed
+precision mediump float;
+
+vec3 functionResult();
+
+void main()
+{
+ vec3 r = functionResult();
+ gl_FragColor = vec4(r.x, r.y, r.z, r.x);
+}
+
+vec3 functionResult()
+{
+ return vec3(1.0, 1.0, 1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-return-value.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-return-value.frag.html
new file mode 100644
index 000000000..2d001b99a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-return-value.frag.html
@@ -0,0 +1,69 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// Shader with vec4 return value from function call should succeed
+precision mediump float;
+
+vec4 functionResult();
+
+void main()
+{
+ vec4 r = functionResult();
+ gl_FragColor = vec4(r.x, r.y, r.z, r.w);
+}
+
+vec4 functionResult()
+{
+ return vec4(1.0, 1.0, 1.0, 1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-vec3-vec4-conditional.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-vec3-vec4-conditional.html
new file mode 100644
index 000000000..9d25ad6bf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-vec3-vec4-conditional.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader that vec4->vec3->vec4 conditional should succeed
+precision mediump float;
+uniform float x;
+void main()
+{
+ gl_FragColor = vec4((x > 0.0 ? vec4(1.0, 1.0, 1.0, 0.0) : vec4(0.1, 0.1, 0.1, 0.0)).xyz, 1.0);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.frag.html
new file mode 100644
index 000000000..96de76dc6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.frag.html
@@ -0,0 +1,64 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader that uses __VERSION__==100 should succeed
+#if __VERSION__ == 100
+ precision mediump float;
+ void main()
+ {
+ gl_FragColor = vec4(0.0,0.0,0.0,1.0);
+ }
+#else
+ foo
+#endif
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.vert.html
new file mode 100644
index 000000000..a46f52b1b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.vert.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader uses the #version 100 directive should succeed
+#version 100
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-120.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-120.vert.html
new file mode 100644
index 000000000..d6ff2b2f5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-120.vert.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader uses the #version not 100 directive should fail
+#version 120
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-130.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-130.vert.html
new file mode 100644
index 000000000..f30a69506
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-130.vert.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader uses the #version not 100 directive should fail
+#version 130
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-webgl-identifier.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-webgl-identifier.vert.html
new file mode 100644
index 000000000..3bde4248a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-webgl-identifier.vert.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader that uses webgl identifier should fail
+attribute vec4 webgl_vPosition;
+void main()
+{
+ gl_Position = webgl_vPosition;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-while-loop.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-while-loop.html
new file mode 100644
index 000000000..f1f317419
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-while-loop.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with while loop should fail
+precision mediump float;
+void main() {
+ int k = 0;
+ while (k < 5) {
+ k++;
+ }
+ gl_FragColor = vec4(float(k));
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-without-precision.frag.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-without-precision.frag.html
new file mode 100644
index 000000000..1145f05e2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-without-precision.frag.html
@@ -0,0 +1,60 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader without precision should fail
+uniform vec4 color;
+void main()
+{
+ gl_FragColor = color;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-constant-expression-loop-conditions.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-constant-expression-loop-conditions.html
new file mode 100644
index 000000000..744a82a15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-constant-expression-loop-conditions.html
@@ -0,0 +1,146 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>WebGL GLSL Conformance Tests</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css" />
+ <link rel="stylesheet" href="../../resources/glsl-feature-tests.css" />
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"></script>
+ <script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+ <div id="description"></div>
+ <div id="console"></div>
+ <script id="vertexShaderLiteralLoopCondition" type="text/something-not-javascript">
+ attribute vec4 a_position;
+ void main()
+ {
+ for (int i = 0; i < 5 + 5; i++) { }
+ gl_Position = a_position;
+ }
+ </script>
+ <script id="fragmentShaderLiteralLoopCondition" type="text/something-not-javascript">
+ void main()
+ {
+ for (int i = 0; i < 5 + 5; i++) { }
+ gl_FragColor = vec4(1.0);
+ }
+ </script>
+ <script id="vertexShaderConstVarLoopCondition" type="text/something-not-javascript">
+ attribute vec4 a_position;
+ void main()
+ {
+ // Explicitly constant variables can be part of a constant expression
+ const int constVar = 5;
+ for (int i = 0; i < 5 + constVar; i++) { }
+ gl_Position = a_position;
+ }
+ </script>
+ <script id="fragmentShaderConstVarLoopCondition" type="text/something-not-javascript">
+ void main()
+ {
+ // Explicitly constant variables can be part of a constant expression
+ const int constVar = 5;
+ for (int i = 0; i < constVar + 5; i++) { }
+ gl_FragColor = vec4(1.0);
+ }
+ </script>
+ <script id="vertexShaderNonConstVarLoopCondition" type="text/something-not-javascript">
+ attribute vec4 a_position;
+ void main()
+ {
+ // Despite assigning a constant and not modifying it, nonConstVar is not semantically a constant expression
+ int nonConstVar = 10;
+ for (int i = 0; i < nonConstVar; i++) { }
+ gl_Position = a_position;
+ }
+ </script>
+ <script id="fragmentShaderNonConstVarLoopCondition" type="text/something-not-javascript">
+ void main()
+ {
+ // Despite assigning a constant and not modifying it, nonConstVar is not semantically a constant expression
+ int nonConstVar = 10;
+ for (int i = 0; i < nonConstVar; i++) { }
+ gl_FragColor = vec4(1.0);
+ }
+ </script>
+ <script>
+ "use strict";
+ var wtu = WebGLTestUtils;
+
+ var tests = [];
+ tests.push({
+ vShaderSource: wtu.getScript("vertexShaderLiteralLoopCondition"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fragmentShaderLiteralLoopCondition"),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "Shaders with literals in the loop condition should compile and link.",
+ });
+ tests.push({
+ vShaderSource: wtu.getScript("vertexShaderConstVarLoopCondition"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fragmentShaderConstVarLoopCondition"),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "Shaders with constant variables in the loop condition should compile and link.",
+ });
+ tests.push({
+ vShaderSource: wtu.getScript("vertexShaderConstVarLoopCondition"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fragmentShaderConstVarLoopCondition"),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "Shaders with constant variables in the loop condition should compile and link.",
+ });
+ tests.push({
+ vShaderSource: wtu.getScript("vertexShaderNonConstVarLoopCondition"),
+ vShaderSuccess: false,
+ fShaderSource: wtu.getScript("fragmentShaderLiteralLoopCondition"),
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "Vertex shader with non-const variable in the loop condition should fail.",
+ });
+ tests.push({
+ vShaderSource: wtu.getScript("vertexShaderLiteralLoopCondition"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fragmentShaderNonConstVarLoopCondition"),
+ fShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "Fragment shader with non-const variable in the loop condition should fail.",
+ });
+
+ GLSLConformanceTester.runTests(tests);
+ var successfullyParsed = true;
+ </script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-invariance.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-invariance.html
new file mode 100644
index 000000000..3d80f9617
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-invariance.html
@@ -0,0 +1,353 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShaderVariant" type="text/something-not-javascript">
+varying vec4 v_varying;
+
+void main()
+{
+ gl_PointSize = 1.0;
+ gl_Position = v_varying;
+}
+</script>
+<script id="vertexShaderInvariant" type="text/something-not-javascript">
+invariant varying vec4 v_varying;
+
+void main()
+{
+ gl_Position = v_varying;
+}
+</script>
+<script id="vertexShaderSeparateInvariant" type="text/something-not-javascript">
+varying vec4 v_varying;
+invariant v_varying;
+
+void main()
+{
+ gl_Position = v_varying;
+}
+</script>
+<script id="vertexShaderSeparateInvariantWrongOrder" type="text/something-not-javascript">
+invariant v_varying;
+varying vec4 v_varying;
+
+void main()
+{
+ gl_Position = v_varying;
+}
+</script>
+<script id="vertexShaderGlobalInvariant" type="text/something-not-javascript">
+#pragma STDGL invariant(all)
+varying vec4 v_varying;
+
+void main()
+{
+ gl_Position = v_varying;
+}
+</script>
+<script id="vertexShaderInvariantGlPosition" type="text/something-not-javascript">
+invariant gl_Position;
+
+void main()
+{
+ gl_Position = vec4(0, 0, 0, 0);
+}
+</script>
+<script id="vertexShaderInvariantGlPointSize" type="text/something-not-javascript">
+invariant gl_PointSize;
+
+void main()
+{
+ gl_PointSize = 1.0;
+ gl_Position = vec4(0, 0, 0, 0);
+}
+</script>
+<script id="fragmentShaderVariant" type="text/something-not-javascript">
+precision mediump float;
+
+varying vec4 v_varying;
+
+void main()
+{
+ gl_FragColor = v_varying;
+}
+</script>
+<script id="fragmentShaderInvariant" type="text/something-not-javascript">
+precision mediump float;
+
+invariant varying vec4 v_varying;
+
+void main()
+{
+ gl_FragColor = v_varying;
+}
+</script>
+<script id="fragmentShaderSeparateInvariant" type="text/something-not-javascript">
+precision mediump float;
+
+varying vec4 v_varying;
+invariant v_varying;
+
+void main()
+{
+ gl_FragColor = v_varying;
+}
+</script>
+<script id="fragmentShaderSeparateInvariantWrongOrder" type="text/something-not-javascript">
+precision mediump float;
+
+invariant v_varying;
+varying vec4 v_varying;
+
+void main()
+{
+ gl_FragColor = v_varying;
+}
+</script>
+<script id="fragmentShaderGlobalInvariant" type="text/something-not-javascript">
+#pragma STDGL invariant(all)
+precision mediump float;
+
+varying vec4 v_varying;
+
+void main()
+{
+ gl_FragColor = v_varying;
+}
+</script>
+<script id="fragmentShaderInvariantGlFragCoord" type="text/something-not-javascript">
+invariant gl_FragCoord;
+
+void main()
+{
+ gl_FragColor = gl_FragCoord;
+}
+</script>
+<script id="fragmentShaderVariantGlFragCoord" type="text/something-not-javascript">
+void main()
+{
+ gl_FragColor = gl_FragCoord;
+}
+</script>
+<script id="fragmentShaderInvariantGlPointCoord" type="text/something-not-javascript">
+invariant gl_PointCoord;
+
+void main()
+{
+ gl_FragColor = vec4(gl_PointCoord, 0.0, 0.0);
+}
+</script>
+<script id="fragmentShaderVariantGlPointCoord" type="text/something-not-javascript">
+void main()
+{
+ gl_FragColor = vec4(gl_PointCoord, 0.0, 0.0);
+}
+</script>
+<script id="fragmentShaderInvariantGlFrontFacing" type="text/something-not-javascript">
+invariant gl_FrontFacing;
+
+void main()
+{
+ gl_FragColor = gl_FrontFacing ? vec4(1, 1, 1, 1) : vec4(0, 0, 0, 1);
+}
+</script>
+<script id="fragmentShaderVariantGlFrontFacing" type="text/something-not-javascript">
+void main()
+{
+ gl_FragColor = gl_FrontFacing ? vec4(1, 1, 1, 1) : vec4(0, 0, 0, 1);
+}
+</script>
+<script>
+// GLSL 1.0.17 4.3.5
+"use strict";
+// See GLSL ES spec 1.0.17 section 4.6.4 "Invariance and linkage".
+GLSLConformanceTester.runTests([
+ {
+ vShaderId: "vertexShaderVariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderInvariant",
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "vertex shader with variant varying and fragment shader with invariant varying must fail",
+ },
+ {
+ vShaderId: "vertexShaderInvariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderVariant",
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "vertex shader with invariant varying and fragment shader with variant varying must fail",
+ },
+ {
+ vShaderId: "vertexShaderVariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderGlobalInvariant",
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "vertex shader with variant varying and fragment shader with invariant (global setting) varying must fail",
+ },
+ {
+ vShaderId: "vertexShaderGlobalInvariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderVariant",
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "vertex shader with invariant (global setting) varying and fragment shader with variant varying must fail",
+ },
+ {
+ vShaderId: "vertexShaderGlobalInvariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderInvariant",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vertex shader with invariant (global setting) varying and fragment shader with invariant varying must succeed",
+ },
+ {
+ vShaderId: "vertexShaderSeparateInvariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderInvariant",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vertex shader with invariant (separately set) varying and fragment shader with invariant varying must succeed",
+ },
+ {
+ vShaderId: "vertexShaderInvariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderSeparateInvariant",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vertex shader with invariant varying and fragment shader with invariant (separately set) varying must succeed",
+ },
+ {
+ vShaderId: "vertexShaderSeparateInvariantWrongOrder",
+ vShaderSuccess: false,
+ fShaderId: "fragmentShaderInvariant",
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "vertex shader with invariant (separately set in wrong order) varying must fail",
+ },
+ {
+ vShaderId: "vertexShaderInvariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderSeparateInvariantWrongOrder",
+ fShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "fragment shader with invariant (separately set in wrong order) varying must fail",
+ },
+ {
+ vShaderId: "vertexShaderInvariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderGlobalInvariant",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vertex shader with invariant varying and fragment shader with invariant (global setting) varying must succeed",
+ },
+ {
+ vShaderId: "vertexShaderInvariantGlPosition",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderInvariantGlFragCoord",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vertex shader with invariant gl_Position and fragment shader with invariant gl_FragCoord must succeed",
+ },
+ {
+ vShaderId: "vertexShaderVariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderInvariantGlFragCoord",
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "vertex shader with variant gl_Position and fragment shader with invariant gl_FragCoord must fail",
+ },
+ {
+ vShaderId: "vertexShaderInvariantGlPosition",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderVariantGlFragCoord",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vertex shader with invariant gl_Position and fragment shader with variant gl_FragCoord must succeed",
+ },
+ {
+ vShaderId: "vertexShaderInvariantGlPointSize",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderInvariantGlPointCoord",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vertex shader with invariant gl_PointSize and fragment shader with invariant gl_PointCoord must succeed",
+ },
+ {
+ vShaderId: "vertexShaderVariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderInvariantGlPointCoord",
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "vertex shader with variant gl_PointSize and fragment shader with invariant gl_PointCoord must fail",
+ },
+ {
+ vShaderId: "vertexShaderInvariantGlPointSize",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderVariantGlPointCoord",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vertex shader with invariant gl_PointSize and fragment shader with variant gl_PointCoord must succeed",
+ },
+ {
+ vShaderId: "vertexShaderVariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderVariantGlFrontFacing",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "fragment shader with variant gl_FrontFacing must succeed compilation",
+ },
+ {
+ vShaderId: "vertexShaderVariant",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderInvariantGlFrontFacing",
+ fShaderSuccess: false,
+ linkSuccess: false,
+ passMsg: "fragment shader with invariant gl_FrontFacing must fail compilation",
+ },
+]);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-uniforms.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-uniforms.html
new file mode 100644
index 000000000..37b5a9654
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-uniforms.html
@@ -0,0 +1,110 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// Shaders with mis-matching uniform types should fail
+// GLSL 1.017 4.3.4
+uniform $(type) u_uniform;
+
+void main()
+{
+ gl_Position = $(code);
+}
+</script>
+<script id="fragmentShader" type="text/something-not-javascript">
+// Shaders with mis-matching uniform types should fail
+// GLSL 1.017 4.3.4
+precision mediump float;
+
+uniform $(type) u_uniform;
+
+void main()
+{
+ gl_FragColor = $(code);
+}
+</script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var uniformTypes = [
+ { type: "bool", code: "vec4(u_uniform, 0, 0, 0)", },
+ { type: "float", code: "vec4(u_uniform, 0, 0, 0)", },
+ { type: "int", code: "vec4(u_uniform, 0, 0, 0)", },
+ { type: "vec2", code: "vec4(u_uniform, 0, 0)", },
+ { type: "ivec2", code: "vec4(u_uniform, 0, 0)", },
+ { type: "bvec2", code: "vec4(u_uniform, 0, 0)", },
+ { type: "vec3", code: "vec4(u_uniform, 0)", },
+ { type: "ivec3", code: "vec4(u_uniform, 0)", },
+ { type: "bvec3", code: "vec4(u_uniform, 0)", },
+ { type: "vec4", code: "vec4(u_uniform)", },
+ { type: "ivec4", code: "vec4(u_uniform)", },
+ { type: "bvec4", code: "vec4(u_uniform)", },
+ { type: "mat2", code: "vec4(u_uniform[0][0], 0, 0, 0)", },
+ { type: "mat3", code: "vec4(u_uniform[0][0], 0, 0, 0)", },
+ { type: "mat4", code: "vec4(u_uniform[0][0], 0, 0, 0)", },
+];
+var vSource = wtu.getScript("vertexShader");
+var fSource = wtu.getScript("fragmentShader");
+var tests = [];
+for (var ii = 0; ii < uniformTypes.length; ++ii) {
+ var u1 = uniformTypes[ii];
+ var vs = wtu.replaceParams(vSource, u1);
+ for (var jj = ii + 1; jj < uniformTypes.length; ++jj) {
+ var u2 = uniformTypes[jj];
+ var fs = wtu.replaceParams(fSource, u2);
+ tests.push({
+ vShaderSource: vs,
+ vShaderSuccess: true,
+ fShaderSource: fs,
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "vertex shader with uniform " + u1.type + " and fragment shader with uniform " + u2.type + " with the same name should fail to link",
+ });
+ }
+}
+
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-varyings.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-varyings.html
new file mode 100644
index 000000000..f76026274
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-varyings.html
@@ -0,0 +1,103 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// Shaders with mis-matching varying types should fail
+// GLSL 1.0.17 4.3.5
+attribute $(type) a_attribute;
+varying $(type) v_varying;
+
+void main()
+{
+ v_varying = a_attribute;
+ gl_Position = vec4(0,0,0,0);
+}
+</script>
+<script id="fragmentShader" type="text/something-not-javascript">
+// Shaders with mis-matching varyings types should fail
+// GLSL 1.0.17 4.3.5
+precision mediump float;
+
+varying $(type) v_varying;
+
+void main()
+{
+ gl_FragColor = $(code);
+}
+</script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var varyingTypes = [
+ { type: "float", code: "vec4(v_varying, 0, 0, 0)", },
+ { type: "vec2", code: "vec4(v_varying, 0, 0)", },
+ { type: "vec3", code: "vec4(v_varying, 0)", },
+ { type: "vec4", code: "vec4(v_varying)", },
+ { type: "mat2", code: "vec4(v_varying[0][0], 0, 0, 0)", },
+ { type: "mat3", code: "vec4(v_varying[0][0], 0, 0, 0)", },
+ { type: "mat4", code: "vec4(v_varying[0][0], 0, 0, 0)", },
+];
+var vSource = wtu.getScript("vertexShader");
+var fSource = wtu.getScript("fragmentShader");
+var tests = [];
+for (var ii = 0; ii < varyingTypes.length; ++ii) {
+ var u1 = varyingTypes[ii];
+ var vs = wtu.replaceParams(vSource, u1);
+ for (var jj = ii + 1; jj < varyingTypes.length; ++jj) {
+ var u2 = varyingTypes[jj];
+ var fs = wtu.replaceParams(fSource, u2);
+ tests.push({
+ vShaderSource: vs,
+ vShaderSuccess: true,
+ fShaderSource: fs,
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "vertex shader with varying " + u1.type + " and fragment shader with varying " + u2.type + " with the same name should fail to link",
+ });
+ }
+}
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-missing-varyings.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-missing-varyings.html
new file mode 100644
index 000000000..e2fa5ba60
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-missing-varyings.html
@@ -0,0 +1,97 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// GLSL 1.0.17 4.3.5
+void main()
+{
+ gl_Position = vec4(0,0,0,0);
+}
+</script>
+<script id="fragmentShader" type="text/something-not-javascript">
+// GLSL 1.0.17 4.3.5
+precision mediump float;
+
+varying $(type) v_varying;
+
+void main()
+{
+ gl_FragColor = $(code);
+}
+</script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var varyingTypes = [
+ { type: "float", code: "vec4(v_varying, 0, 0, 0)", },
+ { type: "vec2", code: "vec4(v_varying, 0, 0)", },
+ { type: "vec3", code: "vec4(v_varying, 0)", },
+ { type: "vec4", code: "vec4(v_varying)", },
+ { type: "mat2", code: "vec4(v_varying[0][0], 0, 0, 0)", },
+ { type: "mat3", code: "vec4(v_varying[0][0], 0, 0, 0)", },
+ { type: "mat4", code: "vec4(v_varying[0][0], 0, 0, 0)", },
+];
+var vSource = wtu.getScript("vertexShader");
+var fSource = wtu.getScript("fragmentShader");
+var tests = [];
+for (var ii = 0; ii < varyingTypes.length; ++ii) {
+ var u1 = varyingTypes[ii];
+ var vs = wtu.replaceParams(vSource, u1);
+ for (var jj = ii + 1; jj < varyingTypes.length; ++jj) {
+ var u2 = varyingTypes[jj];
+ var fs = wtu.replaceParams(fSource, u2);
+ tests.push({
+ vShaderSource: vs,
+ vShaderSuccess: true,
+ fShaderSource: fs,
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "vertex shader no varyings and fragment shader with varying " + u2.type + " should fail to link",
+ });
+ }
+}
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-name-conflicts.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-name-conflicts.html
new file mode 100644
index 000000000..e5c0ee8c6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-name-conflicts.html
@@ -0,0 +1,106 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader should succeed
+precision mediump float;
+uniform vec4 foo;
+void main()
+{
+ gl_FragColor = foo;
+}
+</script>
+<script id="vertexShader" type="text/something-not-javascript">
+// vertex shader should succeed
+attribute vec4 foo;
+void main()
+{
+ gl_Position = foo;
+}
+</script>
+<script>
+"use strict";
+
+/*
+GLSL 1.017 section 4.2.6
+
+...
+
+With the exception of uniform declarations, vertex and fragment shaders
+have separate name spaces. Functions and global variables declared in a
+vertex shader cannot be referenced by a fragment shader and vice versa.
+Uniforms have a single name space. Uniforms declared with the same name
+must have matching types and precisions.
+
+Section 4.3.3
+
+Attribute variables are required to have global scope
+
+Section 4.3.4
+
+The uniform qualifier is used to declare global variables
+
+QED: If both uniforms and attributes are in the global namespace they
+conflict across shaders
+
+Note: This was brought up on the OpenGL ES working group and confirmed
+that the spec required these conflicts to fail to link.
+
+Though most drivers allow this to work, some drivers to do no therefore
+WebGL implementation must enforce this restriction to provide consistent
+behavior.
+*/
+
+GLSLConformanceTester.runTests([
+ { vShaderId: 'vertexShader',
+ vShaderSuccess: true,
+ fShaderId: 'fragmentShader',
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: 'shaders with conflicting uniform/attribute names should fail'
+ },
+]);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-uniform-structs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-uniform-structs.html
new file mode 100644
index 000000000..418e76790
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-uniform-structs.html
@@ -0,0 +1,312 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShaderStructSequence" type="text/something-not-javascript">
+// Structures must have the same name, sequence of type names, and
+// type definitions, and field names to be considered the same type.
+// GLSL 1.017 4.2.4
+precision mediump float;
+struct info {
+ vec4 pos;
+ vec4 color;
+};
+
+uniform info uni;
+void main()
+{
+ gl_Position = uni.pos;
+}
+</script>
+<script id="fragmentShaderStructSequence" type="text/something-not-javascript">
+// Structures must have the same name, sequence of type names, and
+// type definitions, and field names to be considered the same type.
+// GLSL 1.017 4.2.4
+precision mediump float;
+struct info {
+ vec4 color;
+ vec4 pos;
+};
+
+uniform info uni;
+void main()
+{
+ gl_FragColor = uni.color;
+}
+</script>
+<script id="vertexShaderStructName" type="text/something-not-javascript">
+// Structures must have the same name, sequence of type names, and
+// type definitions, and field names to be considered the same type.
+// GLSL 1.017 4.2.4
+precision mediump float;
+struct info {
+ vec4 pos;
+ vec4 color;
+};
+
+uniform info uni;
+void main()
+{
+ gl_Position = uni.pos;
+}
+</script>
+<script id="fragmentShaderStructNameFailure" type="text/something-not-javascript">
+// Structures must have the same name, sequence of type names, and
+// type definitions, and field names to be considered the same type.
+// GLSL 1.017 4.2.4
+precision mediump float;
+struct info1 {
+ vec4 pos;
+ vec4 color;
+};
+
+uniform info1 uni;
+void main()
+{
+ gl_FragColor = uni.color;
+}
+</script>
+<script id="fragmentShaderStructNameSuccess" type="text/something-not-javascript">
+// Structures must have the same name, sequence of type names, and
+// type definitions, and field names to be considered the same type.
+// GLSL 1.017 4.2.4
+precision mediump float;
+
+// Add a struct before info to make sure the struct info here is assigned
+// a different internal unique ID from the struct info in vertex shader.
+struct extra {
+ vec4 p;
+};
+
+struct info {
+ vec4 pos;
+ vec4 color;
+};
+
+uniform info uni;
+void main()
+{
+ extra my;
+ my.p = uni.color;
+ gl_FragColor = my.p;
+}
+</script>
+<script id="vertexShaderStructFieldName" type="text/something-not-javascript">
+// Structures must have the same name, sequence of type names, and
+// type definitions, and field names to be considered the same type.
+// GLSL 1.017 4.2.4
+precision mediump float;
+struct info {
+ vec4 pos;
+ vec4 color;
+};
+
+uniform info uni;
+void main()
+{
+ gl_Position = uni.pos;
+}
+</script>
+<script id="fragmentShaderStructFieldName" type="text/something-not-javascript">
+// Structures must have the same name, sequence of type names, and
+// type definitions, and field names to be considered the same type.
+// GLSL 1.017 4.2.4
+precision mediump float;
+struct info {
+ vec4 pos1;
+ vec4 color;
+};
+
+uniform info uni;
+void main()
+{
+ gl_FragColor = uni.color;
+}
+</script>
+<script id="vertexShaderStructFieldType" type="text/something-not-javascript">
+// Structures must have the same name, sequence of type names, and
+// type definitions, and field names to be considered the same type.
+// GLSL 1.017 4.2.4
+precision mediump float;
+struct info {
+ vec4 pos;
+ vec4 color;
+};
+
+uniform info uni;
+void main()
+{
+ gl_Position = uni.pos;
+}
+</script>
+<script id="fragmentShaderStructFieldType" type="text/something-not-javascript">
+// Structures must have the same name, sequence of type names, and
+// type definitions, and field names to be considered the same type.
+// GLSL 1.017 4.2.4
+precision mediump float;
+struct info {
+ vec3 pos;
+ vec4 color;
+};
+
+uniform info uni;
+void main()
+{
+ gl_FragColor = uni.color;
+}
+</script>
+<script id="vertexShaderStructFieldPrecision" type="text/something-not-javascript">
+// Structures must have the same name, sequence of type names, and
+// type definitions, and field names to be considered the same type.
+// GLSL 1.017 4.2.4
+struct info {
+ mediump vec4 pos;
+ highp vec4 color;
+};
+
+uniform info uni;
+void main()
+{
+ gl_Position = uni.pos;
+}
+</script>
+<script id="fragmentShaderStructFieldPrecision" type="text/something-not-javascript">
+// Structures must have the same name, sequence of type names, and
+// type definitions, and field names to be considered the same type.
+// GLSL 1.017 4.2.4
+precision mediump float;
+struct info {
+ vec4 pos;
+ vec4 color;
+};
+
+uniform info uni;
+void main()
+{
+ gl_FragColor = uni.color;
+}
+</script>
+<script id="vertexShaderUnnamedStruct" type="text/something-not-javascript">
+// ANGLE regression on Windows, crbug.com/401296
+uniform struct {
+ float f;
+ vec4 v;
+} u_struct;
+
+void main()
+{
+ gl_Position = u_struct.f * u_struct.v;
+}
+</script>
+<script id="fragmentShaderSimple" type="text/something-not-javascript">
+void main()
+{
+ gl_FragColor = vec4(1.0);
+}
+</script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+
+var tests = [];
+tests.push({
+ vShaderSource: wtu.getScript("vertexShaderStructName"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fragmentShaderStructNameSuccess"),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "Structures with the same defination must be considered the same type.",
+});
+tests.push({
+ vShaderSource: wtu.getScript("vertexShaderStructName"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fragmentShaderStructNameFailure"),
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "Structures must have the same name to be considered the same type.",
+});
+tests.push({
+ vShaderSource: wtu.getScript("vertexShaderStructSequence"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fragmentShaderStructSequence"),
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "Structures must have the same sequence of type names to be considered the same type.",
+});
+tests.push({
+ vShaderSource: wtu.getScript("vertexShaderStructFieldName"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fragmentShaderStructFieldName"),
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "Structures must have the same field names to be considered the same type.",
+});
+tests.push({
+ vShaderSource: wtu.getScript("vertexShaderStructFieldType"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fragmentShaderStructFieldType"),
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "Structures must have the same type definitions to be considered the same type.",
+});
+tests.push({
+ vShaderSource: wtu.getScript("vertexShaderStructFieldPrecision"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fragmentShaderStructFieldPrecision"),
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "Structures must have the same type definitions (including precision) to be considered the same type.",
+});
+tests.push({
+ vShaderSource: wtu.getScript("vertexShaderUnnamedStruct"),
+ vShaderSuccess: true,
+ fShaderSource: wtu.getScript("fragmentShaderSimple"),
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "Shaders with uniforms of unnamed struct type should compile and link successfully.",
+});
+
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-varyings.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-varyings.html
new file mode 100644
index 000000000..608f33fe3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-varyings.html
@@ -0,0 +1,126 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShaderNoVarying" type="text/something-not-javascript">
+void main()
+{
+ gl_Position = vec4(0,0,0,0);
+}
+</script>
+<script id="vertexShaderUnusedVarying" type="text/something-not-javascript">
+varying vec4 v_varying;
+
+void main()
+{
+ gl_Position = vec4(0,0,0,0);
+}
+</script>
+<script id="vertexShaderUsedVarying" type="text/something-not-javascript">
+varying vec4 v_varying;
+
+void main()
+{
+ gl_Position = v_varying;
+}
+</script>
+<script id="fragmentShaderUnusedVarying" type="text/something-not-javascript">
+precision mediump float;
+
+varying vec4 v_varying;
+
+void main()
+{
+ gl_FragColor = vec4(0,0,0,0);
+}
+</script>
+<script id="fragmentShaderUsedVarying" type="text/something-not-javascript">
+precision mediump float;
+
+varying vec4 v_varying;
+
+void main()
+{
+ gl_FragColor = v_varying;
+}
+</script>
+<script>
+// GLSL 1.0.17 4.3.5
+"use strict";
+GLSLConformanceTester.runTests([
+ {
+ vShaderId: "vertexShaderNoVarying",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderUnusedVarying",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vertex shader with no varying and fragment shader with unused varying must succeed",
+ },
+ {
+ vShaderId: "vertexShaderNoVarying",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderUsedVarying",
+ fShaderSuccess: true,
+ linkSuccess: false,
+ passMsg: "vertex shader with no varying and fragment shader with used varying must fail",
+ },
+ {
+ vShaderId: "vertexShaderUnusedVarying",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderUnusedVarying",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vertex shader with unused varying and fragment shader with unused varying must succeed",
+ },
+ {
+ vShaderId: "vertexShaderUnusedVarying",
+ vShaderSuccess: true,
+ fShaderId: "fragmentShaderUsedVarying",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "vertex shader with unused varying and fragment shader with used varying must succeed",
+ },
+]);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shared.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shared.html
new file mode 100644
index 000000000..dc8fe3d0f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/shared.html
@@ -0,0 +1,175 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="sharedVertexShader" type="text/something-not-javascript">
+// shared vertex shader should succeed.
+uniform mat4 viewProjection;
+uniform vec3 worldPosition;
+uniform vec3 nextPosition;
+uniform float fishLength;
+uniform float fishWaveLength;
+uniform float fishBendAmount;
+attribute vec4 position;
+attribute vec2 texCoord;
+varying vec4 v_position;
+varying vec2 v_texCoord;
+varying vec3 v_surfaceToLight;
+void main() {
+ vec3 vz = normalize(worldPosition - nextPosition);
+ vec3 vx = normalize(cross(vec3(0,1,0), vz));
+ vec3 vy = cross(vz, vx);
+ mat4 orientMat = mat4(
+ vec4(vx, 0),
+ vec4(vy, 0),
+ vec4(vz, 0),
+ vec4(worldPosition, 1));
+ mat4 world = orientMat;
+ mat4 worldViewProjection = viewProjection * world;
+ mat4 worldInverseTranspose = world;
+
+ v_texCoord = texCoord;
+ // NOTE:If you change this you need to change the laser code to match!
+ float mult = position.z > 0.0 ?
+ (position.z / fishLength) :
+ (-position.z / fishLength * 2.0);
+ float s = sin(mult * fishWaveLength);
+ float a = sign(s);
+ float offset = pow(mult, 2.0) * s * fishBendAmount;
+ v_position = (
+ worldViewProjection *
+ (position +
+ vec4(offset, 0, 0, 0)));
+ v_surfaceToLight = (world * position).xyz;
+ gl_Position = v_position;
+}
+</script>
+<script id="fragmentShaderA" type="text/something-not-javascript">
+// shared fragment shader should succeed.
+precision mediump float;
+uniform vec4 lightColor;
+varying vec4 v_position;
+varying vec2 v_texCoord;
+varying vec3 v_surfaceToLight;
+
+uniform vec4 ambient;
+uniform sampler2D diffuse;
+uniform vec4 specular;
+uniform float shininess;
+uniform float specularFactor;
+// #fogUniforms
+
+vec4 lit(float l ,float h, float m) {
+ return vec4(1.0,
+ max(l, 0.0),
+ (l > 0.0) ? pow(max(0.0, h), m) : 0.0,
+ 1.0);
+}
+void main() {
+ vec4 diffuseColor = texture2D(diffuse, v_texCoord);
+ vec4 normalSpec = vec4(0,0,0,0); // #noNormalMap
+ vec3 surfaceToLight = normalize(v_surfaceToLight);
+ vec3 halfVector = normalize(surfaceToLight);
+ vec4 litR = lit(1.0, 1.0, shininess);
+ vec4 outColor = vec4(
+ (lightColor * (diffuseColor * litR.y + diffuseColor * ambient +
+ specular * litR.z * specularFactor * normalSpec.a)).rgb,
+ diffuseColor.a);
+ // #fogCode
+ gl_FragColor = outColor;
+}
+</script>
+<script id="fragmentShaderB" type="text/something-not-javascript">
+// shared fragment shader should succeed.
+precision mediump float;
+varying vec4 v_position;
+varying vec2 v_texCoord;
+varying vec3 v_surfaceToLight;
+
+// #fogUniforms
+
+vec4 lit(float l ,float h, float m) {
+ return vec4(1.0,
+ max(l, 0.0),
+ (l > 0.0) ? pow(max(0.0, h), m) : 0.0,
+ 1.0);
+}
+void main() {
+ vec4 normalSpec = vec4(0,0,0,0); // #noNormalMap
+ vec4 reflection = vec4(0,0,0,0); // #noReflection
+ vec3 surfaceToLight = normalize(v_surfaceToLight);
+ vec4 skyColor = vec4(0.5,0.5,1,1); // #noReflection
+
+ vec3 halfVector = normalize(surfaceToLight);
+ vec4 litR = lit(1.0, 1.0, 10.0);
+ vec4 outColor = vec4(mix(
+ skyColor,
+ vec4(1,2,3,4) * (litR.y + litR.z * normalSpec.a),
+ 1.0 - reflection.r).rgb,
+ 1.0);
+ // #fogCode
+ gl_FragColor = outColor;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTests([
+ { vShaderSource: document.getElementById("sharedVertexShader").text,
+ vShaderSuccess: true,
+ fShaderSource: document.getElementById("fragmentShaderA").text,
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: 'shared fragment shader should succeed',
+ },
+ { vShaderSource: document.getElementById("sharedVertexShader").text,
+ vShaderSuccess: true,
+ fShaderSource: document.getElementById("fragmentShaderB").text,
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: 'shared fragment shader should succeed',
+ }
+]);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-equals.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-equals.html
new file mode 100644
index 000000000..b9233e20a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-equals.html
@@ -0,0 +1,180 @@
+
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>GLSL Structure Equals Test</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+
+<script id="simple-vs" type="x-shader/x-vertex">
+attribute vec4 a_position;
+void main(void) {
+ gl_Position = a_position;
+}
+</script>
+<script id="simple-struct-fs" type="x-shader/x-fragment">
+precision mediump float;
+struct my_struct {
+ float f;
+};
+
+my_struct a = my_struct(1.0);
+my_struct b = my_struct(1.0);
+
+void main(void) {
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+
+ if (a == b) {
+ gl_FragColor.y = 1.0;
+ }
+}
+</script>
+<script id="vec-struct-fs" type="x-shader/x-fragment">
+precision mediump float;
+struct my_struct {
+ vec3 v;
+};
+
+my_struct a = my_struct(vec3(1.0, 2.0, 3.0));
+my_struct b = my_struct(vec3(1.0, 2.0, 3.0));
+
+void main(void) {
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+
+ if (a == b) {
+ gl_FragColor.y = 1.0;
+ }
+}
+</script>
+<script id="nested-struct-fs" type="x-shader/x-fragment">
+precision mediump float;
+
+struct s1
+{
+ float f;
+};
+
+struct s2
+{
+ s1 s;
+};
+
+s2 a = s2(s1(1.0));
+s2 b = s2(s1(1.0));
+
+void main(void) {
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+
+ if (a == b) {
+ gl_FragColor.y = 1.0;
+ }
+}
+</script>
+<script id="nested-vec-struct-fs" type="x-shader/x-fragment">
+precision mediump float;
+
+struct s1
+{
+ vec3 v;
+};
+
+struct s2
+{
+ s1 s;
+};
+
+s2 a = s2(s1(vec3(1.0, 2.0, 3.0)));
+s2 b = s2(s1(vec3(1.0, 2.0, 3.0)));
+
+void main(void) {
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+
+ if (a == b) {
+ gl_FragColor.y = 1.0;
+ }
+}
+</script>
+</head>
+<body>
+<canvas id="canvas" width="50" height="50"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("Testing struct equals");
+
+var wtu = WebGLTestUtils;
+GLSLConformanceTester.runRenderTests([
+ {
+ vShaderId: "simple-vs",
+ vShaderSuccess: true,
+ fShaderId: "simple-struct-fs",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "Simple struct with one float",
+ },
+ {
+ vShaderId: "simple-vs",
+ vShaderSuccess: true,
+ fShaderId: "vec-struct-fs",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "Simple struct with a vector",
+ },
+ {
+ vShaderId: "simple-vs",
+ vShaderSuccess: true,
+ fShaderId: "nested-struct-fs",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "Nested struct with a float",
+ },
+ {
+ vShaderId: "simple-vs",
+ vShaderSuccess: true,
+ fShaderId: "nested-vec-struct-fs",
+ fShaderSuccess: true,
+ linkSuccess: true,
+ passMsg: "Nested struct with a vector",
+ },
+]);
+debug("");
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-mixed-array-declarators.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-mixed-array-declarators.html
new file mode 100644
index 000000000..6a6f0f494
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-mixed-array-declarators.html
@@ -0,0 +1,92 @@
+<!--
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<title></title>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+precision mediump float;
+void main() {
+ struct S {
+ $(type) field;
+ };
+ S s1[2], s2;
+ $(var).field = $(initializer);
+ gl_FragColor = $(asVec4);
+}
+</script>
+<script>
+"use strict";
+description("Verifies that mixed (array vs. not array) struct declarators work correctly.");
+var tests = [];
+var wtu = WebGLTestUtils;
+var typeInfos = [
+ { type: 'float', initializer: '1.0', asVec4: 'vec4(0.0,$(var).field,0.0,1.0)' },
+ { type: 'vec2', initializer: 'vec2(0.0, 1.0)', asVec4: 'vec4($(var).field,0.0,1.0)' },
+ { type: 'vec3', initializer: 'vec3(0.0, 1.0, 0.0)', asVec4: 'vec4($(var).field,1.0)' },
+ { type: 'vec4', initializer: 'vec4(0.0, 1.0, 0.0, 1.0)', asVec4: '$(var).field' },
+ { type: 'int', initializer: '1', asVec4: 'vec4(0.0,$(var).field,0.0,1.0)' },
+ { type: 'ivec2', initializer: 'ivec2(0, 1)', asVec4: 'vec4($(var).field,0.0,1.0)' },
+ { type: 'ivec3', initializer: 'ivec3(0, 1, 0)', asVec4: 'vec4($(var).field,1.0)' },
+ { type: 'ivec4', initializer: 'ivec4(0, 1, 0, 1)', asVec4: 'vec4($(var).field)' },
+ { type: 'bool', initializer: 'true', asVec4: 'vec4(0.0,$(var).field,0.0,1.0)' },
+ { type: 'bvec2', initializer: 'bvec2(false, true)', asVec4: 'vec4($(var).field,0.0,1.0)' },
+ { type: 'bvec3', initializer: 'bvec3(false, true, false)', asVec4: 'vec4($(var).field,1.0)' },
+ { type: 'bvec4', initializer: 'bvec4(false,true,false,true)',asVec4: 'vec4($(var).field)' },
+];
+['s1[0]', 's1[1]', 's2'].forEach(function(varName) {
+ typeInfos.forEach(function (typeInfo) {
+ var replaceParams = {
+ type: typeInfo.type,
+ initializer: typeInfo.initializer,
+ var: varName,
+ asVec4: wtu.replaceParams(typeInfo.asVec4, {var: varName})
+ };
+ tests.push({
+ fShaderSource: wtu.replaceParams(wtu.getScript('fragmentShader'), replaceParams),
+ passMsg: typeInfo.type,
+ fShaderSuccess: true,
+ linkSuccess: true,
+ render:true
+ });
+ });
+});
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-exceeds-maximum.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-exceeds-maximum.html
new file mode 100644
index 000000000..90854462b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-exceeds-maximum.html
@@ -0,0 +1,78 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// shader with too-deep struct nesting should fail per WebGL spec
+struct nesting5 {
+ vec4 vecfield;
+};
+
+struct nesting4 {
+ nesting5 field5;
+};
+
+struct nesting3 {
+ nesting4 field4;
+};
+
+struct nesting2 {
+ nesting3 field3;
+};
+
+struct nesting1 {
+ nesting2 field2;
+};
+
+uniform nesting1 uniform1;
+void main()
+{
+ gl_Position = uniform1.field2.field3.field4.field5.vecfield;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names.html
new file mode 100644
index 000000000..b2027c3ce
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names.html
@@ -0,0 +1,95 @@
+<!--
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<title></title>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+precision mediump float;
+struct S { $(outer_type) u; };
+void main() {
+ S S; // This is legal, 'S' as a typename is defined in another scope.
+ {
+ struct S { $(inner_type) a; }; // This is legal as well, 'S' is now defined as a variable name in an ancestor scope
+ S newvar;
+ newvar.a = $(initializer);
+ gl_FragColor = $(fragColor);
+ }
+}
+</script>
+<script>
+"use strict";
+description("This test verifies that defining a typename in a new scope when the typename is the name of a variable that hides a typename declaration succeeds for all combinations of GLSL types.");
+var tests = [];
+var wtu = WebGLTestUtils;
+var typeInfo = [
+ { Type: 'float', initializer: '1.0', fragColor: 'vec4(0.0, newvar.a, 0.0, 1.0)' },
+ { Type: 'vec2', initializer: 'vec2(0.0, 1.0)', fragColor: 'vec4(newvar.a, 0.0, 1.0)' },
+ { Type: 'vec3', initializer: 'vec3(0.0, 1.0, 0.0)', fragColor: 'vec4(newvar.a, 1.0)' },
+ { Type: 'vec4', initializer: 'vec4(0.0, 1.0, 0.0, 1.0)', fragColor: 'newvar.a' },
+ { Type: 'int', initializer: '1', fragColor: 'vec4(0.0, newvar.a, 0.0, 1.0)' },
+ { Type: 'ivec2', initializer: 'ivec2(0, 1)', fragColor: 'vec4(newvar.a, 0.0, 1.0)' },
+ { Type: 'ivec3', initializer: 'ivec3(0, 1, 0)', fragColor: 'vec4(newvar.a, 1.0)' },
+ { Type: 'ivec4', initializer: 'ivec4(0, 1, 0, 1)', fragColor: 'vec4(newvar.a)' },
+ { Type: 'bool', initializer: 'true', fragColor: 'vec4(0.0, newvar.a, 0.0, 1.0)' },
+ { Type: 'bvec2', initializer: 'bvec2(false, true)', fragColor: 'vec4(newvar.a, 0.0, 1.0)' },
+ { Type: 'bvec3', initializer: 'bvec3(false, true, false)', fragColor: 'vec4(newvar.a, 1.0)' },
+ { Type: 'bvec4', initializer: 'bvec4(false,true,false,true)',fragColor: 'vec4(newvar.a)' },
+];
+typeInfo.forEach(function (outerType) {
+ typeInfo.forEach(function (innerType) {
+ var replaceParams = {
+ outer_type: outerType.Type,
+ inner_type: innerType.Type,
+ // use the initializer and fragColor for the inner type. Its definition should override the variable name in the outerscope.
+ initializer: innerType.initializer,
+ fragColor: innerType.fragColor
+ };
+ tests.push({
+ fShaderSource: wtu.replaceParams(wtu.getScript('fragmentShader'), replaceParams),
+ passMsg: 'Outer struct type: ' + outerType.Type + ' inner struct type: ' + innerType.Type,
+ fShaderSuccess: true,
+ linkSuccess: true,
+ render: true
+ });
+ })
+})
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-under-maximum.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-under-maximum.html
new file mode 100644
index 000000000..2436ac8d7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-under-maximum.html
@@ -0,0 +1,74 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+// shader with struct nesting less than maximum in WebGL spec should succeed
+struct nesting4 {
+ vec4 vecfield;
+};
+
+struct nesting3 {
+ nesting4 field4;
+};
+
+struct nesting2 {
+ nesting3 field3;
+};
+
+struct nesting1 {
+ nesting2 field2;
+};
+
+uniform nesting1 uniform1;
+void main()
+{
+ gl_Position = uniform1.field2.field3.field4.vecfield;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-specifiers-in-uniforms.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-specifiers-in-uniforms.html
new file mode 100644
index 000000000..d49bee2fc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-specifiers-in-uniforms.html
@@ -0,0 +1,86 @@
+<!--
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<title></title>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+precision mediump float;
+uniform struct S { $(type) field;} s;
+void main() {
+ // All uniforms are required to be zero initialized. Add the color green
+ // to make the rendering test pass.
+ gl_FragColor = $(asVec4) + vec4(0.0, 1.0, 0.0, 1.0);
+}
+</script>
+<script>
+"use strict";
+description("Verifies that structure specifiers work with uniforms.");
+var tests = [];
+var wtu = WebGLTestUtils;
+var typeInfos = [
+ { type: 'float', asVec4: 'vec4(0.0,s.field,0.0,0.0)' },
+ { type: 'vec2', asVec4: 'vec4(s.field,0.0,0.0)' },
+ { type: 'vec3', asVec4: 'vec4(s.field,0.0)' },
+ { type: 'vec4', asVec4: 's.field' },
+ { type: 'int', asVec4: 'vec4(0.0,s.field,0.0,0.0)' },
+ { type: 'ivec2', asVec4: 'vec4(s.field,0.0,0.0)' },
+ { type: 'ivec3', asVec4: 'vec4(s.field,0.0)' },
+ { type: 'ivec4', asVec4: 'vec4(s.field)' },
+ { type: 'bool', asVec4: 'vec4(0.0,s.field,0.0,0.0)' },
+ { type: 'bvec2', asVec4: 'vec4(s.field,0.0,0.0)' },
+ { type: 'bvec3', asVec4: 'vec4(s.field,0.0)' },
+ { type: 'bvec4', asVec4: 'vec4(s.field)' },
+];
+typeInfos.forEach(function (typeInfo) {
+ var replaceParams = {
+ type: typeInfo.type,
+ asVec4: typeInfo.asVec4
+ };
+ tests.push({
+ fShaderSource: wtu.replaceParams(wtu.getScript('fragmentShader'), replaceParams),
+ passMsg: typeInfo.type,
+ fShaderSuccess: true,
+ linkSuccess: true,
+ render:true
+ });
+});
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-unary-operators.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-unary-operators.html
new file mode 100644
index 000000000..8f7cdbcea
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-unary-operators.html
@@ -0,0 +1,91 @@
+<!--
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<title></title>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+precision mediump float;
+struct S { $(type) t; };
+void main() {
+ S a;
+ a.t = $(initializer);
+ S b = $(operator)a; // Unary operators not allowed
+ gl_FragColor = $(fragColor);
+}
+</script>
+<script>
+"use strict";
+description("This test verifies that unary operators +, ++, -, --, !, and ~ do not work on structures. Per the spec, field selectors, equality and assignment are the only operators allowed on structures.");
+var tests = [];
+var wtu = WebGLTestUtils;
+var operators = ['+', '++', '-', '--', '!', '~']
+var typeInfos = [
+ { type: 'float', initializer: '1.0', fragColor: 'vec4(0.0, b.t, 0.0, 1.0)' },
+ { type: 'vec2', initializer: 'vec2(0.0, 1.0)', fragColor: 'vec4(b.t, 0.0, 1.0)' },
+ { type: 'vec3', initializer: 'vec3(0.0, 1.0, 0.0)', fragColor: 'vec4(b.t, 1.0)' },
+ { type: 'vec4', initializer: 'vec4(0.0, 1.0, 0.0, 1.0)', fragColor: 'b.t' },
+ { type: 'int', initializer: '1', fragColor: 'vec4(0.0, b.t, 0.0, 1.0)' },
+ { type: 'ivec2', initializer: 'ivec2(0, 1)', fragColor: 'vec4(b.t, 0.0, 1.0)' },
+ { type: 'ivec3', initializer: 'ivec3(0, 1, 0)', fragColor: 'vec4(b.t, 1.0)' },
+ { type: 'ivec4', initializer: 'ivec4(0, 1, 0, 1)', fragColor: 'vec4(b.t)' },
+ { type: 'bool', initializer: 'true', fragColor: 'vec4(0.0, b.t, 0.0, 1.0)' },
+ { type: 'bvec2', initializer: 'bvec2(false, true)', fragColor: 'vec4(b.t, 0.0, 1.0)' },
+ { type: 'bvec3', initializer: 'bvec3(false, true, false)', fragColor: 'vec4(b.t, 1.0)' },
+ { type: 'bvec4', initializer: 'bvec4(false,true,false,true)',fragColor: 'vec4(b.t)' },
+];
+operators.forEach(function (operator) {
+ typeInfos.forEach(function (typeInfo) {
+ var replaceParams = {
+ initializer: typeInfo.initializer,
+ type: typeInfo.type,
+ fragColor: typeInfo.fragColor,
+ operator: operator,
+ };
+ tests.push({
+ fShaderSource: wtu.replaceParams(wtu.getScript('fragmentShader'), replaceParams),
+ passMsg: 'Unary operator ' + operator + ' cannot be used on a struct with a ' + typeInfo.type,
+ fShaderSuccess: false,
+ linkSuccess: false
+ });
+ });
+});
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-global-initializers.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-global-initializers.html
new file mode 100644
index 000000000..e0f18c790
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-global-initializers.html
@@ -0,0 +1,88 @@
+<!--
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<title>Ternary Operators in Global Initializers</title>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+precision mediump float;
+const $(type) green = $(green);
+const $(type) black = $(black);
+$(type) var = (true) ? green : black;
+void main() {
+ gl_FragColor = $(asVec4);
+}
+</script>
+<script>
+"use strict";
+description("This test verifies that ternary operators can be used in global initializers.");
+var tests = [];
+var wtu = WebGLTestUtils;
+var typeInfos = [
+ { type: 'float', green: '1.0', black: '0.0', asVec4: 'vec4(0.0,var,0.0,1.0)' },
+ { type: 'vec2', green: 'vec2(0.0,1.0)', black: 'vec2(0.0,0.0)', asVec4: 'vec4(var,0.0,1.0)' },
+ { type: 'vec3', green: 'vec3(0.0,1.0,0.0)', black: 'vec3(0.0,0.0,0.0)', asVec4: 'vec4(var,1.0)' },
+ { type: 'vec4', green: 'vec4(0.0,1.0,0.0,1.0)', black: 'vec4(0.0,0.0,0.0,0.0)', asVec4: 'var' },
+ { type: 'int', green: '1', black: '0', asVec4: 'vec4(0.0,var,0.0,1.0)' },
+ { type: 'ivec2', green: 'ivec2(0,1)', black: 'ivec2(0,0)', asVec4: 'vec4(var,0.0,1.0)' },
+ { type: 'ivec3', green: 'ivec3(0,1,0)', black: 'ivec3(0,0,0)', asVec4: 'vec4(var,1.0)' },
+ { type: 'ivec4', green: 'ivec4(0,1,0,1)', black: 'ivec4(0,0,0,0)', asVec4: 'vec4(var)' },
+ { type: 'bool', green: 'true', black: 'false', asVec4: 'vec4(0.0,var,0.0,1.0)' },
+ { type: 'bvec2', green: 'bvec2(false,true)', black: 'bvec2(false,false)', asVec4: 'vec4(var,0.0,1.0)' },
+ { type: 'bvec3', green: 'bvec3(false,true,false)', black: 'bvec3(false,false,false)', asVec4: 'vec4(var,1.0)' },
+ { type: 'bvec4', green: 'bvec4(false,true,false,true)',black: 'bvec4(false,false,false,false)', asVec4: 'vec4(var)' },
+];
+typeInfos.forEach(function (typeInfo) {
+ var replaceParams = {
+ type: typeInfo.type,
+ green: typeInfo.green,
+ black: typeInfo.black,
+ asVec4: typeInfo.asVec4,
+ };
+ tests.push({
+ fShaderSource: wtu.replaceParams(wtu.getScript('fragmentShader'), replaceParams),
+ passMsg: typeInfo.type,
+ fShaderSuccess: true,
+ linkSuccess: true,
+ render: true
+ });
+});
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-initializers.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-initializers.html
new file mode 100644
index 000000000..51bfcb8f0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-initializers.html
@@ -0,0 +1,145 @@
+<!--
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+<title></title>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="intFragShader" type="text/something-not-javascript">
+void main() {
+ int i = 2, j = (i > 1) ? 1 : 0;
+ gl_FragColor = vec4(0.0, j, 0.0, 1.0);
+}
+</script>
+<script id="ivec2FragShader" type="text/something-not-javascript">
+void main() {
+ ivec2 i = ivec2(2, 0), j = (i.x > 1) ? ivec2(0, 1) : ivec2(0, 0);
+ gl_FragColor = vec4(j, 0.0, 1.0);
+}
+</script>
+<script id="ivec3FragShader" type="text/something-not-javascript">
+void main() {
+ ivec3 i = ivec3(0, 2, 0), j = (i.y > 1) ? ivec3(0, 1, 0) : ivec3(0, 0, 0);
+ gl_FragColor = vec4(j, 1.0);
+}
+</script>
+<script id="ivec4FragShader" type="text/something-not-javascript">
+void main() {
+ ivec4 i = ivec4(0.0, 0.0, 2.0, 0.0), j = (i.z > 1) ? ivec4(0, 1, 0, 1) : ivec4(0, 0, 0, 1);
+ gl_FragColor = vec4(j);
+}
+</script>
+<script id="floatFragShader" type="text/something-not-javascript">
+void main() {
+ precision mediump float;
+ float i = 2.0, j = (i > 1.0) ? 1.0 : 0.0;
+ gl_FragColor = vec4(0.0, j, 0.0, 1.0);
+}
+</script>
+<script id="vec2FragShader" type="text/something-not-javascript">
+void main() {
+ precision mediump float;
+ vec2 i = vec2(2.0, 0.0), j = (i.x > 1.0) ? vec2(0.0, 1.0) : vec2(0.0, 0.0);
+ gl_FragColor = vec4(j, 0.0, 1.0);
+}
+</script>
+<script id="vec3FragShader" type="text/something-not-javascript">
+void main() {
+ precision mediump float;
+ vec3 i = vec3(0.0, 2.0, 0.0), j = (i.y > 1.0) ? vec3(0.0, 1.0, 0.0) : vec3(0.0, 0.0, 0.0);
+ gl_FragColor = vec4(j, 1.0);
+}
+</script>
+<script id="vec4FragShader" type="text/something-not-javascript">
+void main() {
+ precision mediump float;
+ vec4 i = vec4(0.0, 0.0, 2.0, 0.0), j = (i.z > 1.0) ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(0.0, 0.0, 0.0, 1.0);
+ gl_FragColor = j;
+}
+</script>
+<script id="boolFragShader" type="text/something-not-javascript">
+void main() {
+ bool i = true, j = i ? true : false;
+ gl_FragColor = vec4(0.0, j, 0.0, 1.0);
+}
+</script>
+<script id="bvec2FragShader" type="text/something-not-javascript">
+void main() {
+ bvec2 i = bvec2(true, false), j = i.x ? bvec2(false, true) : bvec2(false, false);
+ gl_FragColor = vec4(j, 0.0, 1.0);
+}
+</script>
+<script id="bvec3FragShader" type="text/something-not-javascript">
+void main() {
+ bvec3 i = bvec3(false, true, false), j = i.y ? bvec3(false, true, false) : bvec3(false, false, false);
+ gl_FragColor = vec4(j, 1.0);
+}
+</script>
+<script id="bvec4FragShader" type="text/something-not-javascript">
+void main() {
+ bvec4 i = bvec4(false, false, true, true), j = i.z ? bvec4(false, true, false, true) : bvec4(false, false, false, true);
+ gl_FragColor = vec4(j);
+}
+</script>
+<script>
+"use strict";
+description("This test verifies initializers with ternary operators correctly initialize all variables.");
+// Test fragment shaders are of the form
+// void main() {
+// {type} i = {initializer}, j = {ternary test using i that succeeds} ? : {green} : {black};
+// gl_FragColor = vec4(...); // Emit green so that test will pass
+// }
+// The fragment shader must compile and link with the default vertex shader. J must be able to use the values of I as well as have its own
+// values properly initialized.
+var tests = [
+ { fShaderId: 'intFragShader', passMsg: 'Ternary operator in integer initalization', fShaderSuccess: true, linkSuccess: true, render: true },
+ { fShaderId: 'ivec2FragShader', passMsg: 'Ternary operator in ivec2 initalization', fShaderSuccess: true, linkSuccess: true, render: true },
+ { fShaderId: 'ivec3FragShader', passMsg: 'Ternary operator in ivec3 initalization', fShaderSuccess: true, linkSuccess: true, render: true },
+ { fShaderId: 'ivec4FragShader', passMsg: 'Ternary operator in ivec4 initalization', fShaderSuccess: true, linkSuccess: true, render: true },
+ { fShaderId: 'floatFragShader', passMsg: 'Ternary operator in float initalization', fShaderSuccess: true, linkSuccess: true, render: true },
+ { fShaderId: 'vec2FragShader', passMsg: 'Ternary operator in vec2 initalization', fShaderSuccess: true, linkSuccess: true, render: true },
+ { fShaderId: 'vec3FragShader', passMsg: 'Ternary operator in vec3 initalization', fShaderSuccess: true, linkSuccess: true, render: true },
+ { fShaderId: 'vec4FragShader', passMsg: 'Ternary operator in vec4 initalization', fShaderSuccess: true, linkSuccess: true, render: true },
+ { fShaderId: 'boolFragShader', passMsg: 'Ternary operator in bool initalization', fShaderSuccess: true, linkSuccess: true, render: true },
+ { fShaderId: 'bvec2FragShader', passMsg: 'Ternary operator in bvec2 initalization', fShaderSuccess: true, linkSuccess: true, render: true },
+ { fShaderId: 'bvec3FragShader', passMsg: 'Ternary operator in bvec3 initalization', fShaderSuccess: true, linkSuccess: true, render: true },
+ { fShaderId: 'bvec4FragShader', passMsg: 'Ternary operator in bvec4 initalization', fShaderSuccess: true, linkSuccess: true, render: true },
+];
+GLSLConformanceTester.runTests(tests);
+var successfullyParsed = true;
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/uniform-location-length-limits.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/uniform-location-length-limits.html
new file mode 100644
index 000000000..6692e92bc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/misc/uniform-location-length-limits.html
@@ -0,0 +1,109 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<title>WebGL uniform location length tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+There is supposed to be an example drawing here, but it's not important.
+</canvas>
+<div id="description">Verify limits on the lengths of uniform locations per WebGL spec, "Maximum Uniform and Attribute Location Lengths".</div>
+<div id="console"></div>
+<script id="goodVertexShader" type="x-shader/x-vertex">
+// A vertex shader where the needed uniform location is exactly 256 characters.
+struct Nesting2 {
+ vec4 identifier62CharactersLong_01234567890123456789012345678901234;
+};
+
+struct Nesting1 {
+ Nesting2 identifier64CharactersLong_0123456789012345678901234567890123456;
+};
+
+uniform Nesting1 identifier128CharactersLong_0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789;
+
+void main() {
+ gl_Position = identifier128CharactersLong_0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789.identifier64CharactersLong_0123456789012345678901234567890123456.identifier62CharactersLong_01234567890123456789012345678901234;
+}
+</script>
+<script id="badVertexShader" type="x-shader/x-vertex">
+// A vertex shader where the needed uniform location is 257 characters.
+struct Nesting2 {
+ vec4 identifier63CharactersLong_012345678901234567890123456789012345;
+};
+
+struct Nesting1 {
+ Nesting2 identifier64CharactersLong_0123456789012345678901234567890123456;
+};
+
+uniform Nesting1 identifier128CharactersLong_0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789;
+
+void main() {
+ Nesting2 temp = identifier128CharactersLong_0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789.identifier64CharactersLong_0123456789012345678901234567890123456;
+ gl_Position = temp.identifier63CharactersLong_012345678901234567890123456789012345;
+}
+</script>
+<script id="fragmentShader" type="x-shader/x-fragment">
+precision mediump float;
+
+void main() {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+debug("Test uniform location underneath the length limit");
+var program = wtu.loadProgramFromScript(gl, "goodVertexShader", "fragmentShader");
+shouldBe('gl.getProgramParameter(program, gl.LINK_STATUS)', 'true');
+var uniformLoc = gl.getUniformLocation(program, "identifier128CharactersLong_0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789.identifier64CharactersLong_0123456789012345678901234567890123456.identifier62CharactersLong_01234567890123456789012345678901234");
+shouldBeNonNull('uniformLoc');
+wtu.glErrorShouldBe(gl, gl.NONE);
+
+debug("Test uniform location over the length limit");
+program = wtu.loadProgramFromScript(gl, "badVertexShader", "fragmentShader");
+wtu.glErrorShouldBe(gl, gl.NONE);
+shouldBe('gl.getProgramParameter(program, gl.LINK_STATUS)', 'true');
+var uniformLoc = gl.getUniformLocation(program, "identifier128CharactersLong_0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789.identifier64CharactersLong_0123456789012345678901234567890123456.identifier63CharactersLong_012345678901234567890123456789012345");
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
+shouldBeNull('uniformLoc');
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/00_test_list.txt
new file mode 100644
index 000000000..7c2da3e8f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/00_test_list.txt
@@ -0,0 +1,8 @@
+_webgl_field.vert.html
+_webgl_function.vert.html
+_webgl_struct.vert.html
+_webgl_variable.vert.html
+webgl_field.vert.html
+webgl_function.vert.html
+webgl_struct.vert.html
+webgl_variable.vert.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_field.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_field.vert.html
new file mode 100644
index 000000000..a0a459c29
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_field.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// use of reserved _webgl prefix as structure field should fail
+struct Foo {
+ int _webgl_bar;
+};
+
+void main() {
+ Foo foo = Foo(1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_function.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_function.vert.html
new file mode 100644
index 000000000..da0ddeaa0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_function.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// use of reserved _webgl prefix as function name should fail
+vec4 _webgl_foo() {
+ return vec4(1.0);
+}
+
+void main() {
+ gl_Position = _webgl_foo();
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_struct.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_struct.vert.html
new file mode 100644
index 000000000..7bfc52cd4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_struct.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// use of reserved _webgl prefix as structure name should fail
+struct _webgl_Foo {
+ int bar;
+};
+
+void main() {
+ _webgl_Foo foo = _webgl_Foo(1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_variable.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_variable.vert.html
new file mode 100644
index 000000000..ea21ca0d9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_variable.vert.html
@@ -0,0 +1,59 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// use of reserved _webgl prefix as structure field should fail
+void main() {
+ vec4 _webgl_foo;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_field.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_field.vert.html
new file mode 100644
index 000000000..908513dbc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_field.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// use of reserved webgl_ prefix as structure field should fail
+struct Foo {
+ int webgl_bar;
+};
+
+void main() {
+ Foo foo = Foo(1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_function.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_function.vert.html
new file mode 100644
index 000000000..b133d42dd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_function.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// use of reserved webgl_ prefix as function name should fail
+vec4 webgl_foo() {
+ return vec4(1.0);
+}
+
+void main() {
+ gl_Position = webgl_foo();
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_struct.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_struct.vert.html
new file mode 100644
index 000000000..d57c57dc3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_struct.vert.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// use of reserved webgl_ prefix as structure name should fail
+struct webgl_Foo {
+ int bar;
+};
+
+void main() {
+ webgl_Foo foo = webgl_Foo(1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_variable.vert.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_variable.vert.html
new file mode 100644
index 000000000..3df092c36
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_variable.vert.html
@@ -0,0 +1,59 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vertexShader" type="text/something-not-javascript">
+
+// use of reserved webgl_ prefix as variable should fail
+void main() {
+ vec4 webgl_foo;
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/00_test_list.txt
new file mode 100644
index 000000000..c0f612d81
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/00_test_list.txt
@@ -0,0 +1,4 @@
+glsl-function-texture2d-bias.html
+glsl-function-texture2dlod.html
+glsl-function-texture2dproj.html
+--min-version 1.0.3 glsl-function-texture2dprojlod.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2d-bias.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2d-bias.html
new file mode 100644
index 000000000..e10bcb160
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2d-bias.html
@@ -0,0 +1,126 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texture2D GLSL conformance test.</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="256" height="256" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader2d" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord;
+void main() {
+ gl_Position = vPosition;
+ texCoord = texCoord0;
+}
+</script>
+<script id="fshader2d" type="x-shader/x-fragment">
+precision mediump float;
+uniform sampler2D tex;
+uniform float bias;
+varying vec2 texCoord;
+void main() {
+ gl_FragData[0] = texture2D(tex, texCoord, bias);
+}
+</script>
+<script>
+"use strict";
+description("tests GLSL texture2D function with bias");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+
+shouldBe("canvas.width", "256");
+shouldBe("canvas.height", "256");
+
+var gl = wtu.create3DContext(canvas);
+var program = wtu.setupProgram(
+ gl, ['vshader2d', 'fshader2d'], ['vPosition', 'texCoord0'], [0, 1]);
+wtu.setupUnitQuad(gl, 0, 1);
+
+var colors = [
+ {name: 'red', color:[255, 0, 0, 255]},
+ {name: 'green', color:[0, 255, 0, 255]},
+ {name: 'blue', color:[0, 0, 255, 255]},
+ {name: 'yellow', color:[255, 255, 0, 255]},
+ {name: 'magenta', color:[255, 0, 255, 255]},
+ {name: 'cyan', color:[0, 255, 255, 255]},
+ {name: 'pink', color:[255, 128, 128, 255]},
+ {name: 'gray', color:[128, 128, 128, 255]},
+ {name: 'light green', color:[128, 255, 128, 255]},
+];
+
+shouldBe("colors.length", "9");
+
+var tex = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex);
+gl.texParameteri(
+ gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
+
+for (var ii = 0; ii < colors.length; ++ii) {
+ var color = colors[ii];
+ var size = Math.pow(2, colors.length - ii - 1);
+ wtu.fillTexture(gl, tex, size, size, color.color, ii);
+}
+
+var loc = gl.getUniformLocation(program, "bias");
+
+for (var ii = 0; ii < colors.length; ++ii) {
+ gl.uniform1f(loc, ii);
+ var color = colors[ii];
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, color.color,
+ "256x256 texture drawn to 256x256 dest with bias = " + ii +
+ " should be " + color.name);
+}
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+
+var successfullyParsed = true;
+
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dlod.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dlod.html
new file mode 100644
index 000000000..414d86632
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dlod.html
@@ -0,0 +1,134 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texture2D GLSL conformance test.</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="256" height="256" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader2d" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec4 color;
+uniform sampler2D tex;
+uniform float lod;
+void main() {
+ gl_Position = vPosition;
+ color = texture2DLod(tex, texCoord0, lod);
+}
+</script>
+<script id="fshader2d" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 color;
+void main() {
+ gl_FragData[0] = color;
+}
+</script>
+<script>
+"use strict";
+description("tests GLSL texture2DLod function");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+
+shouldBe("canvas.width", "256");
+shouldBe("canvas.height", "256");
+
+var colors = [
+ {name: 'red', color:[255, 0, 0, 255]},
+ {name: 'green', color:[0, 255, 0, 255]},
+ {name: 'blue', color:[0, 0, 255, 255]},
+ {name: 'yellow', color:[255, 255, 0, 255]},
+ {name: 'magenta', color:[255, 0, 255, 255]},
+ {name: 'cyan', color:[0, 255, 255, 255]},
+ {name: 'pink', color:[255, 128, 128, 255]},
+ {name: 'gray', color:[128, 128, 128, 255]},
+ {name: 'light green', color:[128, 255, 128, 255]},
+];
+
+var gl = wtu.create3DContext(canvas);
+if (gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS) > 0) {
+ runTest();
+} else {
+ testPassed("MAX_VERTEX_TEXTURE_IMAGE_UNITS == 0, this is okay.");
+}
+
+function runTest() {
+ var program = wtu.setupProgram(
+ gl, ['vshader2d', 'fshader2d'], ['vPosition', 'texCoord0'], [0, 1]);
+ wtu.setupUnitQuad(gl, 0, 1);
+
+ shouldBe("colors.length", "9");
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texParameteri(
+ gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST_MIPMAP_LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
+
+ for (var ii = 0; ii < colors.length; ++ii) {
+ var color = colors[ii];
+ var size = Math.pow(2, colors.length - ii - 1);
+ wtu.fillTexture(gl, tex, size, size, color.color, ii);
+ }
+
+ var loc = gl.getUniformLocation(program, "lod");
+
+ for (var ii = 0; ii < colors.length; ++ii) {
+ gl.uniform1f(loc, ii);
+ var color = colors[ii];
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, color.color,
+ "256x256 texture drawn to 256x256 dest with lod = " + ii +
+ " should be " + color.name);
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+}
+
+var successfullyParsed = true;
+
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dproj.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dproj.html
new file mode 100644
index 000000000..df9159e09
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dproj.html
@@ -0,0 +1,141 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texture2D GLSL conformance test.</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader0" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord;
+void main() {
+ gl_Position = vPosition;
+ texCoord = texCoord0;
+}
+</script>
+<script id="fshader0" type="x-shader/x-fragment">
+precision mediump float;
+uniform sampler2D tex;
+uniform float divisor;
+varying vec2 texCoord;
+void main() {
+ gl_FragData[0] = texture2DProj(tex, vec3(texCoord, divisor));
+}
+</script>
+<script id="vshader1" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord;
+void main() {
+ gl_Position = vPosition;
+ texCoord = texCoord0;
+}
+</script>
+<script id="fshader1" type="x-shader/x-fragment">
+precision mediump float;
+uniform sampler2D tex;
+uniform float divisor;
+varying vec2 texCoord;
+void main() {
+ gl_FragData[0] = texture2DProj(tex, vec4(texCoord, 123.0, divisor));
+}
+</script>
+<script>
+"use strict";
+description("tests GLSL texture2DProj function with");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example", {antialias: false});
+
+wtu.setupUnitQuad(gl, 0, 1);
+var tex = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
+
+var c = document.createElement("canvas");
+c.width = 16;
+c.height = 16;
+var ctx = c.getContext("2d");
+ctx.fillStyle = "rgb(0,255,0)";
+ctx.fillRect(0, 0, 16, 16);
+ctx.fillStyle = "rgb(0,0,255)";
+ctx.fillRect(0, 0, 8, 8);
+ctx.fillRect(8, 8, 8, 8);
+
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);
+
+for (var ss = 0; ss < 2; ++ss) {
+ debug("");
+ debug(ss ? "testing vec4 version" : "testing vec3 version");
+ var program = wtu.setupProgram(
+ gl, ['vshader' + ss, 'fshader' + ss],
+ ['vPosition', 'texCoord0'], [0, 1]);
+ gl.useProgram(program);
+ var loc = gl.getUniformLocation(program, "divisor");
+
+ for (var ii = 0; ii < 3; ++ii) {
+ var denominator = Math.pow(2, ii);
+ gl.uniform1f(loc, 1 / denominator);
+ wtu.clearAndDrawUnitQuad(gl);
+ var size = 16 / denominator;
+ for (var yy = 0; yy < 32; yy += size) {
+ for (var xx = 0; xx < 32; xx += size) {
+ var odd = (xx / size + yy / size) % 2;
+ var color = odd ? [0, 255, 0, 255] : [0, 0, 255, 255];
+ var msg = "" + xx + ", " + yy + ", " + size + ", " + size + " should be " + (odd ? "green" : "blue");
+ wtu.checkCanvasRect(gl, xx, yy, size, size, color, msg);
+ }
+ }
+ }
+}
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+
+var successfullyParsed = true;
+
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dprojlod.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dprojlod.html
new file mode 100644
index 000000000..1dfb83171
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dprojlod.html
@@ -0,0 +1,165 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texture2D GLSL conformance test.</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="256" height="256" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader2d0" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+varying vec4 color;
+uniform sampler2D tex;
+uniform float divisor;
+uniform float lod;
+void main() {
+ gl_Position = vPosition;
+ color = texture2DProjLod(tex, vec3(0.75 * divisor, 0.25 * divisor, divisor), lod);
+}
+</script>
+<script id="vshader2d1" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+varying vec4 color;
+uniform sampler2D tex;
+uniform float divisor;
+uniform float lod;
+void main() {
+ gl_Position = vPosition;
+ color = texture2DProjLod(tex, vec4(0.75 * divisor, 0.25 * divisor, 123.0, divisor), lod);
+}
+</script>
+<script id="fshader2d" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 color;
+void main() {
+ gl_FragData[0] = color;
+}
+</script>
+<script>
+"use strict";
+description("tests GLSL texture2DProjLod function");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+
+shouldBe("canvas.width", "256");
+shouldBe("canvas.height", "256");
+
+var colors = [
+ {name: 'red', color:[255, 0, 0, 255]},
+ {name: 'green', color:[0, 255, 0, 255]},
+ {name: 'blue', color:[0, 0, 255, 255]},
+ {name: 'yellow', color:[255, 255, 0, 255]},
+ {name: 'magenta', color:[255, 0, 255, 255]},
+ {name: 'cyan', color:[0, 255, 255, 255]},
+ {name: 'pink', color:[255, 128, 128, 255]},
+ {name: 'gray', color:[128, 128, 128, 255]},
+ {name: 'light green', color:[128, 255, 128, 255]},
+];
+
+var gl = wtu.create3DContext(canvas);
+if (gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS) > 0) {
+ runTest();
+} else {
+ testPassed("MAX_VERTEX_TEXTURE_IMAGE_UNITS == 0, this is okay.");
+}
+
+function runTest() {
+ shouldBe("colors.length", "9");
+ for (var ss = 0; ss < 2; ++ss) {
+ debug("");
+ debug(ss ? "testing vec4 version" : "testing vec3 version");
+ var program = wtu.setupProgram(
+ gl, ['vshader2d' + ss, 'fshader2d'], ['vPosition', 'texCoord0'], [0, 1]);
+ wtu.setupUnitQuad(gl, 0, 1);
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texParameteri(
+ gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST_MIPMAP_NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
+
+ // Fill the top right quadrant of each texture level with one of the colors
+ for (var ii = 0; ii < colors.length; ++ii) {
+ var color = colors[ii];
+ var size = Math.pow(2, colors.length - ii - 1);
+
+ var c = document.createElement("canvas");
+ c.width = size;
+ c.height = size;
+ var ctx = c.getContext("2d");
+ ctx.fillStyle = "rgb(0,0,0)";
+ ctx.fillRect(0, 0, size, size);
+ ctx.fillStyle = "rgb(" + color.color[0] + "," + color.color[1] + "," + color.color[2] + ")";
+ ctx.fillRect(size / 2, 0, size / 2, size / 2);
+
+ gl.texImage2D(gl.TEXTURE_2D, ii, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);
+ }
+
+ var lodLoc = gl.getUniformLocation(program, "lod");
+ var divLoc = gl.getUniformLocation(program, "divisor");
+
+ for (var div = 1; div < 4; ++div) {
+ for (var ii = 0; ii < colors.length - 1; ++ii) {
+ gl.uniform1f(lodLoc, ii);
+ gl.uniform1f(divLoc, div);
+ var lodColor = colors[ii];
+ var size = Math.pow(2, colors.length - ii - 1);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, lodColor.color,
+ "sampling with lod = " + ii +
+ " divider = " + div +
+ " should be " + lodColor.name);
+ }
+ }
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+}
+
+var successfullyParsed = true;
+
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/00_test_list.txt
new file mode 100644
index 000000000..31fe0f8f2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/00_test_list.txt
@@ -0,0 +1,6 @@
+gl-fragcoord.html
+gl-frontfacing.html
+gl-pointcoord.html
+--min-version 1.0.2 glsl-built-ins.html
+--min-version 1.0.3 gl-fragcoord-xy-values.html
+--min-version 1.0.3 gl-fragdata-and-fragcolor.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord-xy-values.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord-xy-values.html
new file mode 100644
index 000000000..ad1268fee
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord-xy-values.html
@@ -0,0 +1,209 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>gl-fragcoord Test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="canvas" width="32" height="32">
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+ <script id="vshader" type="x-shader/x-vertex">
+ // Inputs
+ attribute vec4 aPosInfo;
+
+ // Outputs
+ varying vec2 vTargetPixelCoord;
+
+ void main()
+ {
+ vTargetPixelCoord = aPosInfo.zw;
+
+ gl_PointSize = 1.0;
+ gl_Position = vec4(aPosInfo.xy, 0.0, 1.0);
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+
+ // Inputs
+ varying vec2 vTargetPixelCoord;
+
+ // Colors used to signal correctness
+ const vec4 red = vec4(1.0, 0.0, 0.0, 1.0);
+ const vec4 green = vec4(0.0, 1.0, 0.0, 1.0);
+
+ void main()
+ {
+ // Check pixel index
+ bool pixelIxValid = (floor(gl_FragCoord.xy) == vTargetPixelCoord);
+
+ // Check fractional part of coordinates
+ bool fracCoordValid = all(lessThan(abs(fract(gl_FragCoord.xy) - vec2(0.5)), vec2(0.0001)));
+
+ gl_FragColor = (pixelIxValid && fracCoordValid) ? green : red;
+ }
+ </script>
+
+ <script id="test_fshader" type="x-shader/x-fragment">
+ // Shader to test if the frame buffer positions within the output pixel are different
+ // for the five render passes
+ // Pass on frame buffer position in varying, change in vertex shader : vTargetPixelCoord = aPosInfo.xy;
+ // Set test_fshader in setupProgram()
+
+ precision mediump float;
+
+ // Inputs
+ varying vec2 vTargetPixelCoord;
+
+ const vec2 pixSize = vec2(2.0/32.0, 2.0/32.0);
+
+ void main()
+ {
+ // Coordinates within a framebuffer pixel [0, 1>
+ vec2 inPixelCoord = fract(vTargetPixelCoord / pixSize);
+
+ // Create different color dependent on the position inside the framebuffer pixel
+ float r = (inPixelCoord.x < 0.4) ? 0.2 : (inPixelCoord.x > 0.6) ? 0.8 : 0.5;
+ float g = (inPixelCoord.y < 0.4) ? 0.2 : (inPixelCoord.y > 0.6) ? 0.8 : 0.5;
+
+ gl_FragColor = vec4(r, g, 0.0, 1.0);
+ }
+ </script>
+
+ <script>
+ "use strict";
+
+ // Test if gl_FragCoord.xy values are always of the form :
+ // (first framebuffer pixel index + 0.5, second framebuffer pixel index + 0.5)
+ // (if no multisampling)
+
+ // This is done by rendering a set of points which targets either the center of the
+ // output pixel or the center of one of the quadrants
+
+ // Constants
+ var floatsPerAttribute = 4;
+
+ // Globals
+ var wtu;
+ var gl;
+ var program;
+ var vxBuffer;
+
+ // Set data for one attribute (framebuffer.xy, pixel_index.xy)
+ function setPixelData(data, dIx, xx, yy, xSize, ySize, xOffset, yOffset)
+ {
+ // Frame buffer first coordinate [-1, 1]
+ data[dIx++] = (xx + 0.5) * xSize + xOffset - 1;
+
+ // Frame buffer second coordinate [-1, 1]
+ data[dIx++] = (yy + 0.5) * ySize + yOffset - 1;
+
+ // Frame buffer pixel first index
+ data[dIx++] = xx;
+
+ // Frame buffer pixel second index
+ data[dIx++] = yy;
+
+ return dIx;
+ }
+
+ // Create attribute data
+ function createAttributeData(xOffset, yOffset)
+ {
+ // Retrieve realised dimensions of viewport
+ var widthPx = gl.drawingBufferWidth;
+ var heightPx = gl.drawingBufferHeight;
+ var pixelCount = widthPx * heightPx;
+
+ // Pixel size in framebuffer coordinates
+ var pWidth = 2 / widthPx;
+ var pHeight = 2 / heightPx;
+ var data = new Float32Array(pixelCount * floatsPerAttribute);
+ var dIx = 0;
+ for (var yy = 0; yy < heightPx; ++yy)
+ for (var xx = 0; xx < widthPx; ++xx)
+ dIx = setPixelData(data, dIx, xx, yy, pWidth, pHeight, xOffset * pWidth, yOffset * pHeight);
+
+ if (dIx !== data.length)
+ wtu.error("gl-fragcoord-xy-values.html, createAttributeData(), index not correct at end");
+
+ return data;
+ }
+
+ // Initialize test
+ function init()
+ {
+ description("tests gl_FragCoord.xy values");
+
+ wtu = WebGLTestUtils;
+ gl = wtu.create3DContext("canvas", { antialias: false });
+ program = wtu.setupProgram(gl, ["vshader", "fshader"], ["aPosInfo"]);
+ vxBuffer = gl.createBuffer();
+
+ gl.bindBuffer(gl.ARRAY_BUFFER, vxBuffer);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, floatsPerAttribute, gl.FLOAT, false, 0, 0);
+ }
+
+ // Render data
+ function render(xOffset, yOffset, passMsg)
+ {
+ // Set attribute data
+ var data = createAttributeData(xOffset, yOffset);
+ gl.bufferData(gl.ARRAY_BUFFER, data, gl.DYNAMIC_DRAW);
+
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.drawArrays(gl.POINTS, 0, data.length / floatsPerAttribute);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from draw");
+ var green = [0, 255, 0, 255];
+ wtu.checkCanvas(gl, green, passMsg);
+ }
+
+ // Run tests
+ init();
+ render( 0, 0, "green : sampling at center of output pixel is correct");
+ render( 0.25, 0.25, "green : sampling in top right quadrant of output pixel is correct");
+ render(-0.25, 0.25, "green : sampling in top left quadrant of output pixel is correct");
+ render( 0.25, -0.25, "green : sampling in bottom right quadrant of output pixel is correct");
+ render(-0.25, -0.25, "green : sampling in bottom left quadrant of output pixel is correct");
+ var successfullyParsed = true;
+ </script>
+<script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord.html
new file mode 100644
index 000000000..a6f25126a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord.html
@@ -0,0 +1,108 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>gl-fragcoord Test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="32" height="32">
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+ void main()
+ {
+ gl_FragColor = vec4(
+ floor(gl_FragCoord.x * 4.0 / 32.0) / 4.0,
+ floor(gl_FragCoord.y * 4.0 / 32.0) / 4.0,
+ floor(gl_FragCoord.z * 4.0) / 4.0,
+ 1);
+ }
+ </script>
+
+ <script>
+ "use strict";
+ function init()
+ {
+ description("tests gl_FragCoord");
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(
+ [-1, -1, -1, 1, -1, 0, -1, 1, 0,
+ -1, 1, 0, 1, -1, 0, 1, 1, 1]),
+ gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from draw");
+
+ for (var xx = 0; xx < 32; xx += 4) {
+ for (var yy = 0; yy < 32; yy += 4) {
+ var zz = (xx / 64) + (yy / 64);
+ var color = [
+ Math.floor(Math.floor(xx * 4.0 / 32.0) / 4 * 256),
+ Math.floor(Math.floor(yy * 4.0 / 32.0) / 4 * 256),
+ Math.floor(Math.floor(zz * 4.0) / 4 * 256)
+ ];
+ var msg = "should be " + color;
+ wtu.checkCanvasRect(
+ gl, xx, yy, 1, 1, color, msg, 4);
+ }
+ }
+ }
+
+ init();
+ var successfullyParsed = true;
+ </script>
+<script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragdata-and-fragcolor.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragdata-and-fragcolor.html
new file mode 100644
index 000000000..dcc470eb2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragdata-and-fragcolor.html
@@ -0,0 +1,61 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL Conformance Tests</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+<script src="../../resources/glsl-conformance-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script id="fragmentShader" type="text/something-not-javascript">
+// fragment shader with static assignment to both gl_FragData[0] and gl_FragColor should fail.
+// GLES spec section 3.8.2 subsection Shader Outputs.
+precision mediump float;
+
+void main()
+{
+ gl_FragData[0] = vec4(1, 0, 0, 1);
+ gl_FragColor = vec4(0, 1, 0, 1);
+}
+</script>
+<script>
+"use strict";
+GLSLConformanceTester.runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-frontfacing.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-frontfacing.html
new file mode 100644
index 000000000..94ab5b175
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-frontfacing.html
@@ -0,0 +1,109 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>gl-fragcoord Test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="32" height="32">
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+ void main()
+ {
+ gl_FragColor = vec4(
+ gl_FrontFacing ? 1.0 : 0.0,
+ gl_FrontFacing ? 0.0 : 1.0,
+ 0,
+ 1);
+ }
+ </script>
+
+ <script>
+ "use strict";
+ function init()
+ {
+ description("tests gl_FrontFacing");
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+
+ var gridRes = 4;
+ wtu.setupIndexedQuad(gl, gridRes, 0, true);
+
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawElements(gl.TRIANGLES, gridRes * gridRes * 6, gl.UNSIGNED_SHORT, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from draw");
+
+ var step = 32 / gridRes;
+ var halfStep = step / 2;
+ var quarterStep = halfStep / 2;
+ for (var xx = 0; xx < 32; xx += step) {
+ for (var yy = 0; yy < 32; yy += step) {
+ for (var ii = 0; ii < 2; ++ii) {
+ var color = [
+ ii == 0 ? 255 : 0,
+ ii == 0 ? 0 : 255,
+ 0
+ ];
+ var msg = "should be " + color;
+ wtu.checkCanvasRect(
+ gl,
+ xx + quarterStep + halfStep * ii,
+ yy + quarterStep + halfStep * ii,
+ 1, 1, color, msg, 4);
+ }
+ }
+ }
+ }
+
+ init();
+ var successfullyParsed = true;
+ </script>
+<script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-pointcoord.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-pointcoord.html
new file mode 100644
index 000000000..b05417605
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-pointcoord.html
@@ -0,0 +1,164 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>gl-pointcoord Test</title>
+ <link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script src="../../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="256" height="256">
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ uniform float uPointSize;
+ void main()
+ {
+ gl_PointSize = uPointSize;
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+ void main()
+ {
+ gl_FragColor = vec4(
+ gl_PointCoord.x,
+ gl_PointCoord.y,
+ 0,
+ 1);
+ }
+ </script>
+
+ <script>
+ "use strict";
+ description("Checks gl_PointCoord and gl_PointSize");
+ debug("");
+
+ // NOTE: I'm not 100% confident in this test. I think it is correct.
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ shouldBeNonNull("gl");
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+
+ var canvas = gl.canvas;
+ var width = canvas.width;
+ var height = canvas.height;
+ shouldBe("width", "height");
+
+ var maxPointSize = gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE)[1];
+ shouldBeTrue("maxPointSize >= 1");
+ // The minimum and maximum point sizes may be floating-point numbers.
+ shouldBeTrue("Math.floor(maxPointSize) >= 1");
+ maxPointSize = Math.floor(maxPointSize);
+ shouldBeTrue("maxPointSize % 1 == 0");
+
+ maxPointSize = Math.min(maxPointSize, 64);
+ var pointWidth = maxPointSize / width;
+ var pointStep = Math.floor(maxPointSize / 4);
+ var pointStep = Math.max(1, pointStep);
+
+ var pointSizeLoc = gl.getUniformLocation(program, "uPointSize");
+ gl.uniform1f(pointSizeLoc, maxPointSize);
+
+ var pixelOffset = (maxPointSize % 2) ? (1 / width) : 0;
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(
+ gl.ARRAY_BUFFER,
+ new Float32Array(
+ [-0.5 + pixelOffset, -0.5 + pixelOffset,
+ 0.5 + pixelOffset, -0.5 + pixelOffset,
+ -0.5 + pixelOffset, 0.5 + pixelOffset,
+ 0.5 + pixelOffset, 0.5 + pixelOffset]),
+ gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ gl.drawArrays(gl.POINTS, 0, 4);
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+
+ function s2p(s) {
+ return (s + 1.0) * 0.5 * width;
+ }
+
+ //function print(x, y) {
+ // var b = new Uint8Array(4);
+ // gl.readPixels(x, y, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, b);
+ // debug("" + x + "," + y + ": " + b[0] + "," + b[1] + "," + b[2]);
+ //}
+ //
+ //for (var ii = 0; ii < 100; ++ii) {
+ // print(ii, ii);
+ //}
+
+ for (var py = 0; py < 2; ++py) {
+ for (var px = 0; px < 2; ++px) {
+ debug("");
+ var pointX = -0.5 + px + pixelOffset;
+ var pointY = -0.5 + py + pixelOffset;
+ for (var yy = 0; yy < maxPointSize; yy += pointStep) {
+ for (var xx = 0; xx < maxPointSize; xx += pointStep) {
+ // formula for s and t from OpenGL ES 2.0 spec section 3.3
+ var xw = s2p(pointX);
+ var yw = s2p(pointY);
+ //debug("xw: " + xw + " yw: " + yw);
+ var u = xx / maxPointSize * 2 - 1;
+ var v = yy / maxPointSize * 2 - 1;
+ var xf = Math.floor(s2p(pointX + u * pointWidth));
+ var yf = Math.floor(s2p(pointY + v * pointWidth));
+ //debug("xf: " + xf + " yf: " + yf);
+ var s = 0.5 + (xf + 0.5 - xw) / maxPointSize;
+ var t = 0.5 + (yf + 0.5 - yw) / maxPointSize;
+ //debug("s: " + s + " t: " + t);
+ var color = [Math.floor(s * 255), Math.floor((1 - t) * 255), 0];
+ var msg = "pixel " + xf + "," + yf + " should be " + color;
+ wtu.checkCanvasRect(gl, xf, yf, 1, 1, color, msg, 4);
+ }
+ }
+ }
+ }
+
+ var successfullyParsed = true;
+ </script>
+ <script src="../../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/glsl-built-ins.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/glsl-built-ins.html
new file mode 100644
index 000000000..387ab1f16
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/glsl/variables/glsl-built-ins.html
@@ -0,0 +1,123 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL built in variables Conformance Test</title>
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="example" width="2" height="2"> </canvas>
+<script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 a_position;
+ void main()
+ {
+ gl_Position = a_position;
+ }
+</script>
+<script id="vshaderCheck" type="x-shader/x-vertex">
+ attribute vec4 a_position;
+ varying vec4 v_color;
+ void main()
+ {
+ gl_Position = a_position;
+ v_color = (gl_$(name) == $(max)) ? vec4(0,1,0,1) : vec4(1,0,0,1);
+ }
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+ varying vec4 v_color;
+ void main()
+ {
+ gl_FragColor = v_color;
+ }
+</script>
+<script id="fshaderCheck" type="x-shader/x-fragment">
+ precision mediump float;
+ void main()
+ {
+ gl_FragColor = (gl_$(name) == $(max)) ? vec4(0,1,0,1) : vec4(1,0,0,1);
+ }
+</script>
+<script>
+"use strict";
+description();
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+var variables = [
+ { name: 'MaxVertexAttribs', min: 8, },
+ { name: 'MaxVertexUniformVectors', min: 128, },
+ { name: 'MaxVaryingVectors', min: 8, },
+ { name: 'MaxVertexTextureImageUnits', min: 0, },
+ { name: 'MaxCombinedTextureImageUnits', min: 8, },
+ { name: 'MaxTextureImageUnits', min: 8, },
+ { name: 'MaxFragmentUniformVectors', min: 16, },
+ { name: 'MaxDrawBuffers', min: 1, max: 1}, // MAX_DRAW_BUFFERS is not defined for WebGL :-(
+];
+
+var toUnderscore = function(str) {
+ return str.replace(/([a-z])([A-Z])/g, function (g) { return g[0] + "_" + g[1].toUpperCase() }).toUpperCase();
+};
+
+var shaderPairs = [
+ [wtu.getScript("vshader"), wtu.getScript("fshaderCheck")],
+ [wtu.getScript("vshaderCheck"), wtu.getScript("fshader")],
+];
+
+wtu.setupUnitQuad(gl);
+
+variables.forEach(function(variable) {
+ debug("");
+ debug("Testing gl_" + variable.name);
+ if (!variable.max) {
+ variable.max = gl.getParameter(gl[toUnderscore(variable.name)]);
+ expectTrue(variable.max >= variable.min, "gl.getParameter(gl." + toUnderscore(variable.name) + ") >= " + variable.min);
+ }
+ shaderPairs.forEach(function(pair) {
+ var shaders = [wtu.replaceParams(pair[0], variable), wtu.replaceParams(pair[1], variable)];
+ var program = wtu.setupProgram(gl, shaders, ["a_position"], undefined, true);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+ });
+});
+
+var successfullyParsed = true;
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/00_test_list.txt
new file mode 100644
index 000000000..0b342cad1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/00_test_list.txt
@@ -0,0 +1,5 @@
+gl-min-attribs.html
+gl-max-texture-dimensions.html
+gl-min-textures.html
+gl-min-uniforms.html
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-max-texture-dimensions.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-max-texture-dimensions.html
new file mode 100644
index 000000000..6c626f6dc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-max-texture-dimensions.html
@@ -0,0 +1,132 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL the max advertized texture size is supported.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord;
+void main()
+{
+ gl_Position = vPosition;
+ texCoord = texCoord0;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform samplerCube tex;
+varying vec2 texCoord;
+void main()
+{
+ gl_FragColor = textureCube(tex, normalize(vec3(texCoord, 1)));
+}
+</script>
+<script>
+"use strict";
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+function shouldBePowerOfTwo(n, name) {
+ var power = Math.round(Math.log(n) / Math.log(2));
+ if (Math.pow(2, power) == n) {
+ testPassed(name + ' is a power of two.');
+ } else {
+ testFailed(name + ' should be a power of two, but was ' + n);
+ }
+}
+
+// Note: It seems like a reasonable assuption that a 1xN texture size should
+// work. Even 1 by 128k is only 512k
+var maxSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
+debug("advertised max size: " + maxSize);
+debug("verifying max size is power-of-two (implied by GLES 2.0 section 3.7.1)");
+shouldBePowerOfTwo(maxSize, 'Max size');
+var testSize = Math.min(maxSize, 128 * 1024);
+var pixels = new Uint8Array(testSize * 4);
+for (var ii = 0; ii < testSize; ++ii) {
+ var off = ii * 4;
+ pixels[off + 0] = 0;
+ pixels[off + 1] = 255;
+ pixels[off + 2] = 128;
+ pixels[off + 3] = 255;
+}
+var tex = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex);
+
+debug("test " + testSize + "x1");
+gl.texImage2D(
+ gl.TEXTURE_2D, 0, gl.RGBA, testSize, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ pixels);
+gl.generateMipmap(gl.TEXTURE_2D);
+
+wtu.clearAndDrawUnitQuad(gl);
+wtu.checkCanvas(gl, [0, 255, 128, 255],
+ "Should be 0, 255, 128, 255");
+debug("test 1x" + testSize);
+gl.texImage2D(
+ gl.TEXTURE_2D, 0, gl.RGBA, 1, testSize, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ pixels);
+gl.generateMipmap(gl.TEXTURE_2D);
+
+wtu.clearAndDrawUnitQuad(gl);
+wtu.checkCanvas(gl, [0, 255, 128, 255],
+ "Should be 0, 255, 128, 255");
+
+var program = wtu.setupProgram(
+ gl, ['vshader', 'fshader'], ['vPosition', 'texCoord0'], [0, 1]);
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+
+// NOTE: We can't easily test cube maps because they require width == height
+// and we might not have enough memory for maxSize by maxSize texture.
+
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-min-attribs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-min-attribs.html
new file mode 100644
index 000000000..7ab8ba704
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-min-attribs.html
@@ -0,0 +1,109 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL the minimum number of attributes are supported.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec4 v0;
+attribute vec4 v1;
+attribute vec4 v2;
+attribute vec4 v3;
+attribute vec4 v4;
+attribute vec4 v5;
+attribute vec4 v6;
+varying vec4 color;
+void main()
+{
+ gl_Position = vPosition;
+ color = v0 + v1 + v2 + v3 + v4 + v5 + v6;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 color;
+void main()
+{
+ gl_FragColor = color;
+}
+</script>
+<script>
+"use strict";
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+var program = wtu.setupProgram(
+ gl,
+ ['vshader', 'fshader'],
+ ['vPosition', 'v0', 'v1', 'v2', 'v3', 'v4', 'v5', 'v6'],
+ [0, 1, 2, 3, 4, 5, 6, 7]);
+
+for (var ii = 0; ii < 7; ++ii) {
+ var v = (ii + 1) / 28;
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ v, v/2, v/4, v/8,
+ v, v/2, v/4, v/8,
+ v, v/2, v/4, v/8,
+ v, v/2, v/4, v/8,
+ v, v/2, v/4, v/8,
+ v, v/2, v/4, v/8]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(ii + 1);
+ gl.vertexAttribPointer(ii + 1, 4, gl.FLOAT, false, 0, 0);
+}
+
+wtu.clearAndDrawUnitQuad(gl);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.checkCanvasRect(gl, 0, 0, gl.canvas.width, gl.canvas.height, [255, 127, 64, 32], "Should render 255,127,64,32 (+/-1)", 1);
+
+var successfullyParsed = true;
+
+</script>
+</body>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-min-textures.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-min-textures.html
new file mode 100644
index 000000000..91f25c6a9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-min-textures.html
@@ -0,0 +1,104 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL the minimum number of uniforms are supported.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+#define NUM_TEXTURES 8 // See spec
+precision mediump float;
+uniform sampler2D uni[NUM_TEXTURES];
+void main()
+{
+ vec4 c = vec4(0,0,0,0);
+ // The loop was manually unrolled in order to verify that this works.
+ // A separate test sampler-array-using-loop-index.html checks that
+ // loops indexing sampler arrays still work.
+ c += texture2D(uni[0], vec2(0.5, 0.5));
+ c += texture2D(uni[1], vec2(0.5, 0.5));
+ c += texture2D(uni[2], vec2(0.5, 0.5));
+ c += texture2D(uni[3], vec2(0.5, 0.5));
+ c += texture2D(uni[4], vec2(0.5, 0.5));
+ c += texture2D(uni[5], vec2(0.5, 0.5));
+ c += texture2D(uni[6], vec2(0.5, 0.5));
+ c += texture2D(uni[7], vec2(0.5, 0.5));
+ gl_FragColor = c;
+}
+</script>
+<script>
+"use strict";
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+//------------------------------------------------------------------------------
+var program = wtu.setupProgram(
+ gl, ['vshader', 'fshader'], ['vPosition'], [0]);
+
+for (var ii = 0; ii < 8; ++ii) {
+ var loc = gl.getUniformLocation(program, "uni[" + ii + "]");
+ gl.activeTexture(gl.TEXTURE0 + ii);
+ var tex = gl.createTexture();
+ wtu.fillTexture(gl, tex, 1, 1, [32, 16, 8, ii * 9], 0);
+ gl.uniform1i(loc, ii);
+}
+
+wtu.clearAndDrawUnitQuad(gl);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.checkCanvas(gl, [255, 128, 64, 252],
+ "Should render using all texture units", 1);
+
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-min-uniforms.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-min-uniforms.html
new file mode 100644
index 000000000..a8dd78530
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/limits/gl-min-uniforms.html
@@ -0,0 +1,128 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL the minimum number of uniforms are supported.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+#define NUM_UNIFORMS 128 // See spec
+attribute vec4 vPosition;
+uniform vec4 uni[NUM_UNIFORMS];
+varying vec4 color;
+void main()
+{
+ gl_Position = vPosition;
+ vec4 c = vec4(0,0,0,0);
+ for (int ii = 0; ii < NUM_UNIFORMS; ++ii) {
+ c += uni[ii];
+ }
+ color = c;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 color;
+void main()
+{
+ gl_FragColor = color;
+}
+</script>
+<script id="vshader2" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+
+<script id="fshader2" type="x-shader/x-fragment">
+precision mediump float;
+#define NUM_UNIFORMS 16 // See spec
+uniform vec4 uni[NUM_UNIFORMS];
+void main()
+{
+ vec4 c = vec4(0,0,0,0);
+ for (int ii = 0; ii < NUM_UNIFORMS; ++ii) {
+ c += uni[ii];
+ }
+ gl_FragColor = vec4(c.r, c.g, c.b, c.a / 120.0);
+}
+</script>
+<script>
+"use strict";
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+//------------------------------------------------------------------------------
+var program = wtu.setupProgram(gl, ['vshader', 'fshader'], ['vPosition'], [0]);
+
+for (var ii = 0; ii < 128; ++ii) {
+ var loc = gl.getUniformLocation(program, "uni[" + ii + "]");
+ gl.uniform4f(loc, 2/256, 2/512, 2/1024, ii/8128);
+}
+
+wtu.clearAndDrawUnitQuad(gl);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.checkCanvasRect(gl, 0, 0, gl.canvas.width, gl.canvas.height, [255, 127, 64, 255], "Should render 255,127,64,32 (+/-1)", 1);
+
+//------------------------------------------------------------------------------
+var program = wtu.setupProgram(gl, ['vshader2', 'fshader2'], ['vPosition'], [0]);
+
+for (var ii = 0; ii < 16; ++ii) {
+ var loc = gl.getUniformLocation(program, "uni[" + ii + "]");
+ gl.uniform4f(loc, 16/2048, 16/1024, 16/512, ii);
+}
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.clearAndDrawUnitQuad(gl);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.checkCanvasRect(gl, 0, 0, gl.canvas.width, gl.canvas.height, [32, 64, 127, 255], "Should render 32,64,127,255 (+/-1)", 1);
+
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/00_test_list.txt
new file mode 100644
index 000000000..3941fd9f7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/00_test_list.txt
@@ -0,0 +1,14 @@
+bad-arguments-test.html
+--min-version 1.0.2 boolean-argument-conversion.html
+--min-version 1.0.2 delayed-drawing.html
+error-reporting.html
+instanceof-test.html
+invalid-passed-params.html
+is-object.html
+null-object-behaviour.html
+functions-returning-strings.html
+object-deletion-behaviour.html
+shader-precision-format.html
+type-conversion-test.html
+uninitialized-test.html
+webgl-specific.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/bad-arguments-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/bad-arguments-test.html
new file mode 100644
index 000000000..a9c7a5c4c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/bad-arguments-test.html
@@ -0,0 +1,120 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+description("Tests calling WebGL APIs with wrong argument types");
+
+var context = wtu.create3DContext();
+var program = wtu.loadStandardProgram(context);
+var shader = wtu.loadStandardVertexShader(context);
+var shouldGenerateGLError = wtu.shouldGenerateGLError;
+
+assertMsg(program != null, "Program Compiled");
+assertMsg(shader != null, "Shader Compiled");
+
+var loc = context.getUniformLocation(program, "u_modelViewProjMatrix");
+assertMsg(loc != null, "getUniformLocation succeeded");
+
+var testArguments = [
+ { value: "foo",
+ throws: true },
+ { value: 0,
+ throws: true },
+ { value: null,
+ throws: false },
+ { value: undefined,
+ throws: false }
+];
+
+var argument;
+
+function shouldBeEmptyString(command) {
+ shouldBe(command, "''");
+}
+
+for (var i = 0; i < testArguments.length; ++i) {
+ var func, func2;
+ if (testArguments[i].throws) {
+ func = shouldThrow;
+ func2 = shouldThrow;
+ } else {
+ func = shouldBeUndefined;
+ func2 = shouldBeNull;
+ }
+ argument = testArguments[i].value;
+ func("context.compileShader(argument)");
+ func("context.linkProgram(argument)");
+ func("context.attachShader(program, argument)");
+ func("context.attachShader(argument, shader)");
+ func("context.detachShader(program, argument)");
+ func("context.detachShader(argument, shader)");
+ func("context.useProgram(argument)");
+ func("context.shaderSource(argument, 'foo')");
+ func("context.bindAttribLocation(argument, 0, 'foo')");
+ func("context.bindBuffer(context.ARRAY_BUFFER, argument)");
+ func("context.bindFramebuffer(context.FRAMEBUFFER, argument)");
+ func("context.bindRenderbuffer(context.RENDERBUFFER, argument)");
+ func("context.bindTexture(context.TEXTURE_2D, argument)");
+ func("context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument)");
+ func("context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0)");
+ func("context.uniform2fv(argument, new Float32Array([0.0, 0.0]))");
+ func("context.uniform2iv(argument, new Int32Array([0, 0]))");
+ func("context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0]))");
+
+ func2("context.getProgramInfoLog(argument)");
+ func2("context.getProgramParameter(argument, 0)");
+ func2("context.getShaderInfoLog(argument)");
+ func2("context.getShaderParameter(argument, 0)");
+ func2("context.getShaderSource(argument)");
+ func2("context.getUniform(argument, loc)");
+ func2("context.getUniform(program, argument)");
+ func2("context.getUniformLocation(argument, 'u_modelViewProjMatrix')");
+
+}
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/boolean-argument-conversion.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/boolean-argument-conversion.html
new file mode 100644
index 000000000..e48a68c50
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/boolean-argument-conversion.html
@@ -0,0 +1,138 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../../resources/test-eval.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+description("Test that conversion of boolean arguments of WebGL functions follows EcmaScript 9.2. ToBoolean");
+debug("");
+debug("When an object is converted to a boolean, it should always evaluate as true. Any valueOf() method should not even get called. See Mozilla bug 727590 where Gecko incorrectly converted such an argument to a Number instead of a Boolean, giving the wrong behavior. See 9.2 and 9.3 in the EcmaScript specification.");
+debug("");
+var gl = wtu.create3DContext();
+var program = wtu.loadStandardProgram(gl);
+var shader = wtu.loadStandardVertexShader(gl);
+var shouldGenerateGLError = wtu.shouldGenerateGLError;
+
+assertMsg(program != null, "Program Compiled");
+assertMsg(shader != null, "Shader Compiled");
+
+var uloc = gl.getUniformLocation(program, "u_modelViewProjMatrix");
+var aloc = gl.getAttribLocation(program, "a_vertex");
+
+gl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer());
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from initialization.");
+assertMsg(uloc, "Uniform not found");
+assertMsg(aloc >= 0, "Attribute not found");
+
+var boolArg = { valueOf: function() { throw "Converting an Object to a Boolean should just give 'true' without further evaluation"; } }
+
+function shouldNotThrowWithBoolArgs(code) {
+ try {
+ TestEval(code);
+ } catch(e) {
+ testFailed(code + " threw exception: " + e);
+ return;
+ }
+ testPassed(code + " converted its boolean arguments correctly");
+}
+
+shouldNotThrowWithBoolArgs(
+ "gl.colorMask(boolArg, boolArg, boolArg, boolArg)"
+);
+
+shouldNotThrowWithBoolArgs(
+ "gl.depthMask(boolArg)"
+);
+
+shouldNotThrowWithBoolArgs(
+ "gl.sampleCoverage(1, boolArg)"
+);
+
+function zeroArray(length) {
+ var a = new Array(length);
+ for (var i = 0; i < length; i++)
+ a[i] = 0;
+ return a;
+}
+
+function zeroFloat32Array(length) {
+ var a = new Float32Array(length);
+ for (var i = 0; i < length; i++)
+ a[i] = 0;
+ return a;
+}
+
+shouldNotThrowWithBoolArgs(
+ "gl.uniformMatrix2fv(uloc, boolArg, zeroFloat32Array(4))"
+);
+
+shouldNotThrowWithBoolArgs(
+ "gl.uniformMatrix2fv(uloc, boolArg, zeroArray(4))"
+);
+
+shouldNotThrowWithBoolArgs(
+ "gl.uniformMatrix3fv(uloc, boolArg, zeroFloat32Array(9))"
+);
+
+shouldNotThrowWithBoolArgs(
+ "gl.uniformMatrix3fv(uloc, boolArg, zeroArray(9))"
+);
+
+shouldNotThrowWithBoolArgs(
+ "gl.uniformMatrix4fv(uloc, boolArg, zeroFloat32Array(16))"
+);
+
+shouldNotThrowWithBoolArgs(
+ "gl.uniformMatrix4fv(uloc, boolArg, zeroArray(16))"
+);
+
+shouldNotThrowWithBoolArgs(
+ "gl.vertexAttribPointer(aloc, 4, gl.FLOAT, boolArg, 4, 0)"
+);
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/delayed-drawing.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/delayed-drawing.html
new file mode 100644
index 000000000..08fab67a3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/delayed-drawing.html
@@ -0,0 +1,87 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Delayed Drawing test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+enableJSTestPreVerboseLogging();
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+
+var tex = gl.createTexture();
+wtu.fillTexture(gl, tex, 5, 3, [0, 192, 128, 255]);
+
+var loc = gl.getUniformLocation(program, "tex");
+gl.uniform1i(loc, 0);
+
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+
+
+drawAndCheck();
+
+setTimeout(step2, 1000);
+
+function step2() {
+ drawAndCheck();
+ finishTest();
+}
+
+function drawAndCheck() {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors before drawing.");
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from drawing.");
+ wtu.checkCanvas(
+ gl, [0, 192, 128, 255],
+ "draw should be 0, 192, 128, 255");
+}
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/error-reporting.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/error-reporting.html
new file mode 100644
index 000000000..27f960fdc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/error-reporting.html
@@ -0,0 +1,98 @@
+<!--
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Tests generation of synthetic and real GL errors");
+
+var wtu = WebGLTestUtils;
+var context = wtu.create3DContext();
+var program = wtu.loadStandardProgram(context);
+
+// Other tests like incorrect-context-object-behaviour already test the raising
+// of many synthetic GL errors. This test verifies the raising of certain
+// known real GL errors, and contains a few regression tests for bugs
+// discovered in the synthetic error generation and in the WebGL
+// implementation itself.
+
+wtu.glErrorShouldBe(context, context.NO_ERROR);
+
+debug("Testing getActiveAttrib");
+// Synthetic OpenGL error
+shouldBeNull("context.getActiveAttrib(null, 2)");
+wtu.glErrorShouldBe(context, context.INVALID_VALUE);
+// Error state should be clear by this point
+wtu.glErrorShouldBe(context, context.NO_ERROR);
+// Real OpenGL error
+shouldBeNull("context.getActiveAttrib(program, 2)");
+wtu.glErrorShouldBe(context, context.INVALID_VALUE);
+// Error state should be clear by this point
+wtu.glErrorShouldBe(context, context.NO_ERROR);
+
+debug("Testing getActiveUniform");
+// Synthetic OpenGL error
+shouldBeNull("context.getActiveUniform(null, 0)");
+wtu.glErrorShouldBe(context, context.INVALID_VALUE);
+// Error state should be clear by this point
+wtu.glErrorShouldBe(context, context.NO_ERROR);
+// Real OpenGL error
+shouldBeNull("context.getActiveUniform(program, 50)");
+wtu.glErrorShouldBe(context, context.INVALID_VALUE);
+// Error state should be clear by this point
+wtu.glErrorShouldBe(context, context.NO_ERROR);
+
+debug("Testing attempts to manipulate the default framebuffer");
+shouldBeUndefined("context.bindFramebuffer(context.FRAMEBUFFER, null)");
+wtu.glErrorShouldBe(context, context.NO_ERROR);
+shouldBeUndefined("context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, null)");
+// Synthetic OpenGL error
+wtu.glErrorShouldBe(context, context.INVALID_OPERATION);
+// Error state should be clear by this point
+wtu.glErrorShouldBe(context, context.NO_ERROR);
+shouldBeUndefined("context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, null, 0)");
+// Synthetic OpenGL error
+wtu.glErrorShouldBe(context, context.INVALID_OPERATION);
+// Error state should be clear by this point
+wtu.glErrorShouldBe(context, context.NO_ERROR);
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html
new file mode 100644
index 000000000..13cf333f1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html
@@ -0,0 +1,127 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../../resources/test-eval.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+"use strict";
+description("Test that functions returning strings really do return strings (and not e.g. null)");
+debug("");
+
+var validVertexShaderString =
+ "attribute vec4 aVertex; attribute vec4 aColor; varying vec4 vColor; void main() { vColor = aColor; gl_Position = aVertex; }";
+var validFragmentShaderString =
+ "precision mediump float; varying vec4 vColor; void main() { gl_FragColor = vColor; }";
+
+function shouldReturnString(_a)
+{
+ var exception;
+ var _av;
+ try {
+ _av = TestEval(_a);
+ } catch (e) {
+ exception = e;
+ }
+
+ if (exception)
+ testFailed(_a + ' should return a string. Threw exception ' + exception);
+ else if (typeof _av == "string")
+ testPassed(_a + ' returns a string');
+ else
+ testFailed(_a + ' should return a string. Returns: "' + _av + '"');
+}
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ var vs = gl.createShader(gl.VERTEX_SHADER);
+ shouldReturnString("gl.getShaderSource(vs)");
+ shouldReturnString("gl.getShaderInfoLog(vs)");
+ gl.shaderSource(vs, validVertexShaderString);
+ gl.compileShader(vs);
+ shouldReturnString("gl.getShaderSource(vs)");
+ shouldReturnString("gl.getShaderInfoLog(vs)");
+
+ var fs = gl.createShader(gl.FRAGMENT_SHADER);
+ shouldReturnString("gl.getShaderSource(fs)");
+ shouldReturnString("gl.getShaderInfoLog(fs)");
+ gl.shaderSource(fs, validFragmentShaderString);
+ gl.compileShader(fs);
+ shouldReturnString("gl.getShaderSource(fs)");
+ shouldReturnString("gl.getShaderInfoLog(fs)");
+
+ var prog = gl.createProgram();
+ shouldReturnString("gl.getProgramInfoLog(prog)");
+ gl.attachShader(prog, vs);
+ gl.attachShader(prog, fs);
+ gl.linkProgram(prog);
+ shouldReturnString("gl.getProgramInfoLog(prog)");
+
+ // Make sure different numbers of extensions doesn't result in
+ // different test output.
+ var exts = gl.getSupportedExtensions();
+ var allPassed = true;
+ for (var ii = 0; ii < exts.length; ++ii) {
+ var s = exts[ii];
+ if (typeof s != "string") {
+ shouldReturnString("gl.getSupportedExtensions()[" + s + "]");
+ allPassed = false;
+ }
+ }
+ if (allPassed) {
+ testPassed('getSupportedExtensions() returns an array of strings');
+ }
+
+ shouldReturnString("gl.getParameter(gl.VENDOR)");
+ shouldReturnString("gl.getParameter(gl.RENDERER)");
+ shouldReturnString("gl.getParameter(gl.VERSION)");
+ shouldReturnString("gl.getParameter(gl.SHADING_LANGUAGE_VERSION)");
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/instanceof-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/instanceof-test.html
new file mode 100644
index 000000000..4ad14c39a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/instanceof-test.html
@@ -0,0 +1,113 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL instanceof test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="canvas" width="2" height="2" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+varying vec2 texCoord;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform vec4 color;
+void main()
+{
+ gl_FragColor = color;
+}
+</script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+description(document.title);
+debug("Tests that instanceof works on WebGL objects.");
+debug("");
+var gl = wtu.create3DContext("canvas");
+shouldBeTrue('gl instanceof WebGLRenderingContext');
+shouldBeTrue('gl.createBuffer() instanceof WebGLBuffer');
+shouldBeTrue('gl.createFramebuffer() instanceof WebGLFramebuffer');
+shouldBeTrue('gl.createProgram() instanceof WebGLProgram');
+shouldBeTrue('gl.createRenderbuffer() instanceof WebGLRenderbuffer');
+shouldBeTrue('gl.createShader(gl.VERTEX_SHADER) instanceof WebGLShader');
+shouldBeTrue('gl.createTexture() instanceof WebGLTexture');
+
+var program = wtu.setupProgram(gl, ['vshader', 'fshader'], ['vPosition'], [0]);
+
+shouldBeTrue('gl.getUniformLocation(program, "color") instanceof WebGLUniformLocation');
+shouldBeTrue('gl.getActiveAttrib(program, 0) instanceof WebGLActiveInfo');
+shouldBeTrue('gl.getActiveUniform(program, 0) instanceof WebGLActiveInfo');
+
+debug("");
+debug("Tests that those WebGL objects can not be constructed through new operator");
+debug("");
+
+function shouldThrowWithNew(objectType, objectName)
+{
+ try {
+ new objectType;
+ testFailed('new ' + objectName + ' did not throw');
+ } catch (e) {
+ testPassed('new ' + objectName + ' threw an error');
+ }
+}
+
+shouldThrowWithNew(window.WebGLRenderingContext, 'WebGLRenderingContext');
+shouldThrowWithNew(window.WebGLActiveInfo, 'WebGLActiveInfo');
+shouldThrowWithNew(window.WebGLBuffer, 'WebGLBuffer');
+shouldThrowWithNew(window.WebGLFramebuffer, 'WebGLFramebuffer');
+shouldThrowWithNew(window.WebGLProgram, 'WebGLProgram');
+shouldThrowWithNew(window.WebGLRenderbuffer, 'WebGLRenderbuffer');
+shouldThrowWithNew(window.WebGLShader, 'WebGLShader');
+shouldThrowWithNew(window.WebGLTexture, 'WebGLTexture');
+shouldThrowWithNew(window.WebGLUniformLocation, 'WebGLUniformLocation');
+shouldThrowWithNew(window.WebGLShaderPrecisionFormat, 'WebGLShaderPrecisionFormat');
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html
new file mode 100644
index 000000000..1d9924852
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html
@@ -0,0 +1,200 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/desktop-gl-constants.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Test for invalid passed parameters");
+
+var wtu = WebGLTestUtils;
+var context = wtu.create3DContext();
+
+debug("");
+debug("Test createShader()");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.createShader(context.FRAGMENT_SHADER)");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.createShader(context.VERTEX_SHADER)");
+wtu.shouldGenerateGLError(context, context.INVALID_ENUM, "context.createShader(0)");
+wtu.shouldGenerateGLError(context, context.INVALID_ENUM, "context.createShader(context.TRIANGLES)");
+
+debug("");
+debug("Test clear()");
+wtu.shouldGenerateGLError(context, context.INVALID_VALUE, "context.clear(desktopGL['ACCUM_BUFFER_BIT'])");
+wtu.shouldGenerateGLError(context, context.INVALID_VALUE, "context.clear(desktopGL['ACCUM_BUFFER_BIT'] | context.COLOR_BUFFER_BIT)");
+wtu.shouldGenerateGLError(context, context.INVALID_VALUE, "context.clear(desktopGL['ACCUM_BUFFER_BIT'] | context.COLOR_BUFFER_BIT | context.DEPTH_BUFFER_BIT | context.STENCIL_BUFFER_BIT)");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.clear(context.COLOR_BUFFER_BIT | context.DEPTH_BUFFER_BIT | context.STENCIL_BUFFER_BIT)");
+
+debug("");
+debug("Test bufferData()");
+var buffer = context.createBuffer();
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.bindBuffer(context.ARRAY_BUFFER, buffer)");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.bufferData(context.ARRAY_BUFFER, 16, context.STREAM_DRAW)");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.bufferData(context.ARRAY_BUFFER, 16, context.STATIC_DRAW)");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.bufferData(context.ARRAY_BUFFER, 16, context.DYNAMIC_DRAW)");
+wtu.shouldGenerateGLError(context, context.INVALID_ENUM, "context.bufferData(context.ARRAY_BUFFER, 16, desktopGL['STREAM_READ'])");
+wtu.shouldGenerateGLError(context, context.INVALID_ENUM, "context.bufferData(context.ARRAY_BUFFER, 16, desktopGL['STREAM_COPY'])");
+wtu.shouldGenerateGLError(context, context.INVALID_ENUM, "context.bufferData(context.ARRAY_BUFFER, 16, desktopGL['STATIC_READ'])");
+wtu.shouldGenerateGLError(context, context.INVALID_ENUM, "context.bufferData(context.ARRAY_BUFFER, 16, desktopGL['STATIC_COPY'])");
+wtu.shouldGenerateGLError(context, context.INVALID_ENUM, "context.bufferData(context.ARRAY_BUFFER, 16, desktopGL['DYNAMIC_READ'])");
+wtu.shouldGenerateGLError(context, context.INVALID_ENUM, "context.bufferData(context.ARRAY_BUFFER, 16, desktopGL['DYNAMIC_COPY'])");
+
+debug("");
+debug("Test {copy}Tex{Sub}Image2D with negative offset/width/height");
+var tex = context.createTexture();
+var pixels = new Uint8Array(2 * 2 * 4);
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.bindTexture(context.TEXTURE_2D, tex)");
+wtu.shouldGenerateGLError(context, context.INVALID_VALUE, "context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, -16, -16, 0, context.RGBA, context.UNSIGNED_BYTE, null)");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, 16, 16, 0, context.RGBA, context.UNSIGNED_BYTE, null)");
+wtu.shouldGenerateGLError(context, context.INVALID_VALUE, "context.texSubImage2D(context.TEXTURE_2D, 0, -1, -1, 2, 2, context.RGBA, context.UNSIGNED_BYTE, pixels)");
+wtu.shouldGenerateGLError(context, context.INVALID_VALUE, "context.texSubImage2D(context.TEXTURE_2D, 0, 0, 0, -1, -1, context.RGBA, context.UNSIGNED_BYTE, pixels)");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.texSubImage2D(context.TEXTURE_2D, 0, 0, 0, 2, 2, context.RGBA, context.UNSIGNED_BYTE, pixels)");
+wtu.shouldGenerateGLError(context, context.INVALID_VALUE, "context.copyTexImage2D(context.TEXTURE_2D, 0, context.RGBA, 0, 0, -1, -1, 0)");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.copyTexImage2D(context.TEXTURE_2D, 0, context.RGBA, 0, 0, 16, 16, 0)");
+wtu.shouldGenerateGLError(context, context.INVALID_VALUE, "context.copyTexSubImage2D(context.TEXTURE_2D, 0, -1, -1, 0, 0, 2, 2)");
+wtu.shouldGenerateGLError(context, context.INVALID_VALUE, "context.copyTexSubImage2D(context.TEXTURE_2D, 0, 0, 0, 0, 0, -1, -1)");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.copyTexSubImage2D(context.TEXTURE_2D, 0, 0, 0, 0, 0, 2, 2)");
+
+debug("");
+debug("Test renderbufferStorage() with negative width/height");
+var renderbuffer = context.createRenderbuffer();
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.bindRenderbuffer(context.RENDERBUFFER, renderbuffer)");
+wtu.shouldGenerateGLError(context, context.INVALID_VALUE, "context.renderbufferStorage(context.RENDERBUFFER, context.RGBA4, -2, -2)");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.renderbufferStorage(context.RENDERBUFFER, context.RGBA4, 16, 16)");
+
+debug("");
+debug("Test scissor() with negative width/height");
+wtu.shouldGenerateGLError(context, context.INVALID_VALUE, "context.scissor(0, 0, -2, -2)");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.scissor(0, 0, 16, 16)");
+
+debug("");
+debug("Test viewport() with negative width/height");
+wtu.shouldGenerateGLError(context, context.INVALID_VALUE, "context.viewport(0, 0, -2, -2)");
+wtu.shouldGenerateGLError(context, context.NO_ERROR, "context.viewport(0, 0, 16, 16)");
+
+debug("");
+debug("Set up a program to test invalid characters");
+var invalidSet = ['"', '$', '`', '@', '\\', "'"];
+var validUniformName = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_1234567890";
+var validAttribName = "abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
+function generateShaderSource(opt_invalidIdentifierChar, opt_invalidCommentChar) {
+ var invalidIdentifierString = "";
+ var invalidCommentString = "";
+ if (opt_invalidIdentifierChar != undefined) {
+ invalidIdentifierString += opt_invalidIdentifierChar;
+ }
+ if (opt_invalidCommentChar != undefined) {
+ invalidCommentString += opt_invalidCommentChar;
+ }
+ return "uniform float " + validUniformName + invalidIdentifierString + ";\n"
+ + "varying float " + validAttribName + ";\n"
+ + "void main() {\n"
+ + validAttribName + " = " + validUniformName + ";\n"
+ + "gl_Position = vec4(0.0, 0.0, 0.0, 1.0); }\n";
+ + "//.+-/*%<>[](){}^|&~=!:;,?# " + invalidCommentString;
+}
+var vShader = context.createShader(context.VERTEX_SHADER);
+context.shaderSource(vShader, generateShaderSource());
+context.compileShader(vShader);
+shouldBe("context.getError()", "context.NO_ERROR");
+var fShader = context.createShader(context.FRAGMENT_SHADER);
+context.shaderSource(fShader, "precision mediump float;\n"
+ + "varying float " + validAttribName + ";\n"
+ + "void main() {\n"
+ + "gl_FragColor = vec4(" + validAttribName + ", 0.0, 0.0, 1.0); }");
+context.compileShader(fShader);
+shouldBe("context.getError()", "context.NO_ERROR");
+var program = context.createProgram();
+context.attachShader(program, vShader);
+context.attachShader(program, fShader);
+context.linkProgram(program);
+var linkStatus = context.getProgramParameter(program, context.LINK_STATUS);
+shouldBeTrue("linkStatus");
+if (!linkStatus)
+ debug(context.getProgramInfoLog(program));
+shouldBe("context.getError()", "context.NO_ERROR");
+context.bindAttribLocation(program, 1, validAttribName);
+shouldBe("context.getError()", "context.NO_ERROR");
+context.getAttribLocation(program, validAttribName);
+shouldBe("context.getError()", "context.NO_ERROR");
+context.getUniformLocation(program, validUniformName);
+shouldBe("context.getError()", "context.NO_ERROR");
+
+debug("");
+debug("Test shaderSource() with invalid characters");
+for (var i = 0; i < invalidSet.length; ++i) {
+ var validShaderSource = generateShaderSource(undefined, invalidSet[i]);
+ context.shaderSource(vShader, validShaderSource);
+ shouldBe("context.getError()", "context.NO_ERROR");
+ var invalidShaderSource = generateShaderSource(invalidSet[i], undefined);
+ context.shaderSource(vShader, invalidShaderSource);
+ shouldBe("context.getError()", "context.INVALID_VALUE");
+}
+
+debug("");
+debug("Test bindAttribLocation() with invalid characters");
+for (var i = 0; i < invalidSet.length; ++i) {
+ var invalidName = validAttribName + invalidSet[i];
+ context.bindAttribLocation(program, 1, invalidName);
+ shouldBe("context.getError()", "context.INVALID_VALUE");
+}
+
+debug("");
+debug("Test getAttribLocation() with invalid characters");
+for (var i = 0; i < invalidSet.length; ++i) {
+ var invalidName = validAttribName + invalidSet[i];
+ context.getAttribLocation(program, invalidName);
+ shouldBe("context.getError()", "context.INVALID_VALUE");
+}
+
+debug("");
+debug("Test getUniformLocation() with invalid characters");
+for (var i = 0; i < invalidSet.length; ++i) {
+ var invalidName = validUniformName + invalidSet[i];
+ context.getUniformLocation(program, invalidName);
+ shouldBe("context.getError()", "context.INVALID_VALUE");
+}
+
+debug("")
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/is-object.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/is-object.html
new file mode 100644
index 000000000..b80f24b17
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/is-object.html
@@ -0,0 +1,101 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas">
+<script>
+"use strict";
+var wtu;
+var canvas;
+var gl;
+var shouldGenerateGLError;
+
+var buffer;
+var framebuffer;
+var program;
+var renderbuffer;
+var shader;
+var texture;
+
+description("Tests 'is' calls against non-bound and deleted objects");
+
+wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+shouldGenerateGLError = wtu.shouldGenerateGLError;
+
+shouldGenerateGLError(gl, gl.NO_ERROR, "buffer = gl.createBuffer()");
+shouldBeFalse("gl.isBuffer(buffer)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, buffer)");
+shouldBeTrue("gl.isBuffer(buffer)");
+debug("");
+
+shouldGenerateGLError(gl, gl.NO_ERROR, "framebuffer = gl.createFramebuffer()");
+shouldBeFalse("gl.isFramebuffer(framebuffer)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer)");
+shouldBeTrue("gl.isFramebuffer(framebuffer)");
+debug("");
+
+shouldGenerateGLError(gl, gl.NO_ERROR, "renderbuffer = gl.createRenderbuffer()");
+shouldBeFalse("gl.isRenderbuffer(renderbuffer)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer)");
+shouldBeTrue("gl.isRenderbuffer(renderbuffer)");
+debug("");
+
+shouldGenerateGLError(gl, gl.NO_ERROR, "texture = gl.createTexture()");
+shouldBeFalse("gl.isTexture(texture)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_2D, texture)");
+shouldBeTrue("gl.isTexture(texture)");
+debug("");
+
+shouldGenerateGLError(gl, gl.NO_ERROR, "program = gl.createProgram()");
+shouldBeTrue("gl.isProgram(program)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteProgram(program)");
+shouldBeFalse("gl.isProgram(program)");
+debug("");
+
+shouldGenerateGLError(gl, gl.NO_ERROR, "shader = gl.createShader(gl.VERTEX_SHADER)");
+shouldBeTrue("gl.isShader(shader)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteShader(shader)");
+shouldBeFalse("gl.isShader(shader)");
+debug("");
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html
new file mode 100644
index 000000000..f3ae86c7b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html
@@ -0,0 +1,112 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+description("Tests calling WebGL APIs without providing the necessary objects");
+
+var context = wtu.create3DContext();
+var program = wtu.loadStandardProgram(context);
+var shader = wtu.loadStandardVertexShader(context);
+var shouldGenerateGLError = wtu.shouldGenerateGLError;
+
+assertMsg(program != null, "Program Compiled");
+assertMsg(shader != null, "Shader Compiled");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.compileShader(undefined)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.linkProgram(undefined)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.attachShader(undefined, undefined)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.attachShader(program, undefined)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.attachShader(undefined, shader)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.detachShader(program, undefined)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.detachShader(undefined, shader)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.shaderSource(undefined, undefined)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.shaderSource(undefined, 'foo')");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.bindAttribLocation(undefined, 0, 'foo')");
+shouldThrow("context.bindBuffer(context.ARRAY_BUFFER, 0)");
+shouldThrow("context.bindFramebuffer(context.FRAMEBUFFER, 0)");
+shouldThrow("context.bindRenderbuffer(context.RENDERBUFFER, 0)");
+shouldThrow("context.bindTexture(context.TEXTURE_2D, 0)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.bindBuffer(context.ARRAY_BUFFER, null)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.bindFramebuffer(context.FRAMEBUFFER, null)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.bindRenderbuffer(context.RENDERBUFFER, null)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.bindTexture(context.TEXTURE_2D, null)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.bindBuffer(context.ARRAY_BUFFER, undefined)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.bindFramebuffer(context.FRAMEBUFFER, undefined)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.bindRenderbuffer(context.RENDERBUFFER, undefined)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.bindTexture(context.TEXTURE_2D, undefined)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, null)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, null, 0)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.getProgramParameter(undefined, 0)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.getProgramInfoLog(undefined, 0)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.getShaderParameter(undefined, 0)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.getShaderInfoLog(undefined, 0)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.getShaderSource(undefined)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.getUniform(undefined, null)");
+shouldGenerateGLError(context, context.INVALID_VALUE, "context.getUniformLocation(undefined, 'foo')");
+
+debug("");
+debug("check with bindings");
+context.bindBuffer(context.ARRAY_BUFFER, context.createBuffer());
+context.bindTexture(context.TEXTURE_2D, context.createTexture());
+shouldGenerateGLError(context, context.NO_ERROR, "context.bufferData(context.ARRAY_BUFFER, 1, context.STATIC_DRAW)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.getBufferParameter(context.ARRAY_BUFFER, context.BUFFER_SIZE)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, 1, 1, 0, context.RGBA, context.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]))");
+shouldGenerateGLError(context, context.NO_ERROR, "context.texParameteri(context.TEXTURE_2D, context.TEXTURE_MIN_FILTER, context.NEAREST)");
+shouldGenerateGLError(context, context.NO_ERROR, "context.getTexParameter(context.TEXTURE_2D, context.TEXTURE_MIN_FILTER)");
+
+debug("");
+debug("check without bindings");
+context.bindBuffer(context.ARRAY_BUFFER, null);
+context.bindTexture(context.TEXTURE_2D, null);
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.bufferData(context.ARRAY_BUFFER, 1, context.STATIC_DRAW)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.getBufferParameter(context.ARRAY_BUFFER, context.BUFFER_SIZE)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.texImage2D(context.TEXTURE_2D, 0, context.RGBA, 1, 1, 0, context.RGBA, context.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]))");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.texParameteri(context.TEXTURE_2D, context.TEXTURE_MIN_FILTER, context.NEAREST)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.getTexParameter(context.TEXTURE_2D, context.TEXTURE_MIN_FILTER)");
+
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html
new file mode 100644
index 000000000..a7a228e3e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html
@@ -0,0 +1,449 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Tests deletion behavior for texture, renderbuffer, shader, and program");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+var shouldGenerateGLError = wtu.shouldGenerateGLError;
+
+debug("");
+debug("shader and program deletion");
+
+var vertexShader = wtu.loadStandardVertexShader(gl);
+assertMsg(vertexShader, "vertex shader loaded");
+var fragmentShader = wtu.loadStandardFragmentShader(gl);
+assertMsg(fragmentShader, "fragment shader loaded");
+
+var program = gl.createProgram();
+shouldBeNonNull("program");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.attachShader(program, vertexShader)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.attachShader(program, fragmentShader)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.linkProgram(program)");
+shouldBeTrue("gl.getProgramParameter(program, gl.LINK_STATUS)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.useProgram(program)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteShader(vertexShader)");
+shouldBeTrue("gl.isShader(vertexShader)");
+shouldBeTrue("gl.getShaderParameter(vertexShader, gl.DELETE_STATUS)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.detachShader(program, vertexShader)");
+shouldBeFalse("gl.isShader(vertexShader)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteShader(fragmentShader)");
+shouldBeTrue("gl.isShader(fragmentShader)");
+shouldBeTrue("gl.getShaderParameter(fragmentShader, gl.DELETE_STATUS)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteProgram(program)");
+shouldBeTrue("gl.isProgram(program)");
+shouldBeTrue("gl.getProgramParameter(program, gl.DELETE_STATUS)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.useProgram(null)");
+shouldBeFalse("gl.isProgram(program)");
+shouldBeFalse("gl.isShader(fragmentShader)");
+
+debug("");
+debug("texture deletion");
+
+var fbo = gl.createFramebuffer(), fbo2 = gl.createFramebuffer(), fbo3 = gl.createFramebuffer();
+shouldBeNonNull("fbo");
+shouldBeNonNull("fbo2");
+shouldBeNonNull("fbo3");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+
+var tex = gl.createTexture();
+shouldBeNonNull("tex");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_2D, tex)");
+shouldBe("gl.getParameter(gl.TEXTURE_BINDING_2D)", "tex");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0)");
+shouldBe("gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)", "tex");
+shouldBe("gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)", "gl.TEXTURE");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteTexture(tex)");
+// Deleting a texture bound to the currently-bound fbo is the same as
+// detaching the textue from fbo first, then delete the texture.
+shouldBe("gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)", "gl.NONE");
+shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)");
+shouldBeFalse("gl.isTexture(tex)");
+shouldBeNull("gl.getParameter(gl.TEXTURE_BINDING_2D)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_2D, tex)");
+shouldBeNull("gl.getParameter(gl.TEXTURE_BINDING_2D)");
+
+var texCubeMap = gl.createTexture();
+shouldBeNonNull("texCubeMap");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCubeMap)");
+shouldBe("gl.getParameter(gl.TEXTURE_BINDING_CUBE_MAP)", "texCubeMap");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteTexture(texCubeMap)");
+shouldBeFalse("gl.isTexture(texCubeMap)");
+shouldBeNull("gl.getParameter(gl.TEXTURE_BINDING_CUBE_MAP)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCubeMap)");
+shouldBeNull("gl.getParameter(gl.TEXTURE_BINDING_CUBE_MAP)");
+
+var t = gl.createTexture();
+shouldBeNonNull("t");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_2D, t)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteTexture(t)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_2D, t)");
+shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE)");
+
+var t2 = gl.createTexture();
+shouldBeNonNull("t2");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.activeTexture(gl.TEXTURE0)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_2D, t2)");
+shouldBe("gl.getParameter(gl.TEXTURE_BINDING_2D)", "t2");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.activeTexture(gl.TEXTURE1)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_2D, t2)");
+shouldBe("gl.getParameter(gl.TEXTURE_BINDING_2D)", "t2");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteTexture(t2)");
+shouldBeNull("gl.getParameter(gl.TEXTURE_BINDING_2D)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.activeTexture(gl.TEXTURE0)");
+shouldBeNull("gl.getParameter(gl.TEXTURE_BINDING_2D)");
+
+debug("");
+debug("renderbuffer deletion");
+
+var rbo = gl.createRenderbuffer(), rbo2 = gl.createRenderbuffer(), rbo3 = gl.createRenderbuffer();
+shouldBeNonNull("rbo");
+shouldBeNonNull("rbo2");
+shouldBeNonNull("rbo3");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindRenderbuffer(gl.RENDERBUFFER, rbo)");
+shouldBe("gl.getParameter(gl.RENDERBUFFER_BINDING)", "rbo");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo)");
+shouldBe("gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)", "rbo");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteRenderbuffer(rbo)");
+// Deleting a renderbuffer bound to the currently-bound fbo is the same as
+// detaching the renderbuffer from fbo first, then delete the renderbuffer.
+shouldBe("gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)", "gl.NONE");
+shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)");
+shouldBeFalse("gl.isRenderbuffer(rbo)");
+shouldBeNull("gl.getParameter(gl.RENDERBUFFER_BINDING)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindRenderbuffer(gl.RENDERBUFFER, rbo)");
+shouldBeNull("gl.getParameter(gl.RENDERBUFFER_BINDING)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindRenderbuffer(gl.RENDERBUFFER, rbo2)");
+shouldBe("gl.getParameter(gl.RENDERBUFFER_BINDING)", "rbo2");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteRenderbuffer(rbo3)");
+shouldBe("gl.getParameter(gl.RENDERBUFFER_BINDING)", "rbo2");
+
+debug("");
+debug("using deleted renderbuffer");
+rbo = gl.createRenderbuffer();
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindRenderbuffer(gl.RENDERBUFFER, rbo)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo)");
+if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE) {
+ // make backbuffer red
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, null)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(1,0,0,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ // make fbo green
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(0,1,0,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ // Bind backbuffer.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, null)");
+ // delete renderbuffer. It should still be attached to fbo though.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteRenderbuffer(rbo)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 16, 16, [255,0,0,255], "backbuffer should be red")');
+ // Use fbo that has deleted rbo.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 16, 16, [0,255,0,255], "fbo should be green")');
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(0,0,1,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 16, 16, [0,0,255,255], "fbo should be blue")');
+ // Bind backbuffer.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, null)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 16, 16, [255,0,0,255], "backbuffer should be red")');
+}
+
+debug("");
+debug("renderbuffer attached twice to same framebuffer");
+rbo = gl.createRenderbuffer();
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindRenderbuffer(gl.RENDERBUFFER, rbo)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo)");
+if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE) {
+ rbo2 = gl.createRenderbuffer();
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindRenderbuffer(gl.RENDERBUFFER, rbo2)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16)");
+ // attach rbo2 at two attachment points incompatible with it
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, rbo2)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.RENDERBUFFER, rbo2)");
+ shouldBe("gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)", "rbo2");
+ shouldBe("gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)", "rbo2");
+ // fbo can't be complete as rbo2 is attached at incompatible attachment points
+ shouldNotBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ // now we delete rbo2, which detaches it from the two attachment points where it currently is attached
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteRenderbuffer(rbo2)");
+ shouldBe("gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)", "gl.NONE");
+ shouldBe("gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)", "gl.NONE");
+ // we should now be in the same state as before with only rbo attached, so fbo should be complete again
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ shouldBe("gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)", "rbo");
+}
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteRenderbuffer(rbo)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, null)");
+
+
+
+debug("");
+debug("using deleted texture");
+tex = gl.createTexture();
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_2D, tex)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null)");
+if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE) {
+ // make fbo green
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(0,1,0,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ // Bind backbuffer.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, null)");
+ // delete texture. It should still be attached to fbo though.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteTexture(tex)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 1, 1, [255,0,0,255], "backbuffer should be red")');
+ // Use fbo that has deleted texture.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0,255,0,255], "fbo should be green")');
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(0,0,1,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0,0,255,255], "fbo should be blue")');
+ // Bind backbuffer.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, null)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 16, 16, [255,0,0,255], "backbuffer should be red")');
+}
+
+debug("");
+debug("using deleted renderbuffer");
+rbo = gl.createRenderbuffer();
+shouldBeNonNull("rbo");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindRenderbuffer(gl.RENDERBUFFER, rbo)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo)");
+if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE) {
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo2)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo)");
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ // make backbuffer red
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, null)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(1,0,0,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ // make fbo green
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(0,1,0,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ // delete renderbuffer. It should still be attached to fbo2 though.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteRenderbuffer(rbo)");
+ // fbo has no attachments
+ shouldNotBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ // Use fbo2 that has deleted rbo.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo2)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 16, 16, [0,255,0,255], "fbo should be green")');
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(0,0,1,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 16, 16, [0,0,255,255], "fbo should be blue")');
+ shouldBe("gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)", "rbo");
+
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+ shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)");
+ shouldGenerateGLError(gl, gl.NONE, "gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)");
+ shouldNotBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ // Bind backbuffer.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, null)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 16, 16, [255,0,0,255], "backbuffer should be red")');
+}
+
+debug("");
+debug("using deleted texture");
+tex = gl.createTexture();
+shouldBeNonNull("tex");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_2D, tex)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null)");
+if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE) {
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo2)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0)");
+ // make fbo green
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(0,1,0,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ // delete texture. It should still be attached to fbo2 though.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteTexture(tex)");
+ // fbo has no attachments
+ shouldNotBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ // Use fbo that has deleted texture.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo2)");
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0,255,0,255], "fbo should be green")');
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(0,0,1,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0,0,255,255], "fbo should be blue")');
+ shouldBe("gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)", "tex");
+
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+ shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)");
+ shouldNotBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ // Bind backbuffer.
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, null)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 16, 16, [255,0,0,255], "backbuffer should be red")');
+}
+
+debug("");
+debug("buffer deletion");
+
+var buffer = gl.createBuffer();
+shouldBeNonNull("buffer");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, buffer)");
+shouldBe("gl.getParameter(gl.ARRAY_BUFFER_BINDING)", "buffer");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteBuffer(buffer)");
+shouldBeFalse("gl.isBuffer(buffer)");
+shouldBeNull("gl.getParameter(gl.ARRAY_BUFFER_BINDING)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, buffer)");
+shouldBeNull("gl.getParameter(gl.ARRAY_BUFFER_BINDING)");
+
+var buffer2 = gl.createBuffer();
+shouldBeNonNull("buffer2");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, buffer2)");
+shouldBe("gl.getParameter(gl.ARRAY_BUFFER_BINDING)", "buffer2");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, null)");
+shouldBeNull("gl.getParameter(gl.ARRAY_BUFFER_BINDING)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteBuffer(buffer2)");
+shouldBeFalse("gl.isBuffer(buffer2)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, buffer2)");
+shouldBeNull("gl.getParameter(gl.ARRAY_BUFFER_BINDING)");
+
+var bufferElement = gl.createBuffer();
+shouldBeNonNull("bufferElement");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, bufferElement)");
+shouldBe("gl.getParameter(gl.ELEMENT_ARRAY_BUFFER_BINDING)", "bufferElement");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteBuffer(bufferElement)");
+shouldBeFalse("gl.isBuffer(bufferElement)");
+shouldBeNull("gl.getParameter(gl.ELEMENT_ARRAY_BUFFER_BINDING)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, bufferElement)");
+shouldBeNull("gl.getParameter(gl.ELEMENT_ARRAY_BUFFER_BINDING)");
+
+var b = gl.createBuffer();
+shouldBeNonNull("b");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, b)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bufferData(gl.ARRAY_BUFFER, 1, gl.STATIC_DRAW)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteBuffer(b)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, b)");
+shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.bufferData(gl.ARRAY_BUFFER, 1, gl.STATIC_DRAW)");
+
+var b1 = gl.createBuffer();
+shouldBeNonNull("b1");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, b1);");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.enableVertexAttribArray(1);");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.vertexAttribPointer(1, 4, gl.FLOAT, false, 0, 0);");
+var b2 = gl.createBuffer();
+shouldBeNonNull("b2");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, b2);");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.enableVertexAttribArray(2);");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.vertexAttribPointer(2, 4, gl.FLOAT, false, 0, 0);");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.enableVertexAttribArray(3);");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.vertexAttribPointer(3, 4, gl.FLOAT, false, 0, 0);");
+shouldBe("gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)", "b1");
+shouldBe("gl.getVertexAttrib(2, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)", "b2");
+shouldBe("gl.getVertexAttrib(3, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)", "b2");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteBuffer(b2);");
+shouldBe("gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)", "b1");
+shouldBeNull("gl.getVertexAttrib(2, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)");
+shouldBeNull("gl.getVertexAttrib(3, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteBuffer(b1);");
+shouldBeNull("gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)");
+
+debug("");
+debug("framebuffer deletion");
+
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+shouldBe("gl.getParameter(gl.FRAMEBUFFER_BINDING)", "fbo");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteFramebuffer(fbo)");
+shouldBeFalse("gl.isFramebuffer(fbo)");
+shouldBeNull("gl.getParameter(gl.FRAMEBUFFER_BINDING)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+shouldBeNull("gl.getParameter(gl.FRAMEBUFFER_BINDING)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo2)");
+shouldBe("gl.getParameter(gl.FRAMEBUFFER_BINDING)", "fbo2");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteFramebuffer(fbo3)");
+shouldBe("gl.getParameter(gl.FRAMEBUFFER_BINDING)", "fbo2");
+
+fbo = gl.createFramebuffer();
+rbo = gl.createRenderbuffer();
+shouldBeNonNull("fbo");
+shouldBeNonNull("rbo");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindRenderbuffer(gl.RENDERBUFFER, rbo)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16)");
+shouldGenerateGLError(gl, gl.NO_ERROR, "gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo)");
+if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE) {
+ // set backbuffer to red
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, null)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(1,0,0,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ // set framebuffer to green
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, fbo)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(0,1,0,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ // check framebuffer
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 16, 16, [0,255,0,255], "fbo should be green")');
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 16, 16, 1, 1, [0,0,0,0], "outside fbo should be black")');
+ // delete framebuffer. because this was the bound fbo the backbuffer should be active now
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteFramebuffer(fbo)");
+ // check backbuffer
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 300, 150, [255,0,0,255], "backbuffer should be red")');
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 300, 0, 300, 300, [0,0,0,0], "outside backbuffer should be black")');
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 150, 300, 300, [0,0,0,0], "outside backbuffer should be black")');
+ // check drawing to backbuffer
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clearColor(0,1,0,1)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.clear(gl.COLOR_BUFFER_BIT)");
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 300, 150, [0,255,0,255], "fbo should be green")');
+ shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, null)");
+ // check again because many buggy implementations will have bound to the true backbuffer on deleteFramebuffer.
+ shouldGenerateGLError(gl, gl.NO_ERROR, 'wtu.checkCanvasRect(gl, 0, 0, 300, 150, [0,255,0,255], "fbo should be green")');
+}
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/shader-precision-format.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/shader-precision-format.html
new file mode 100644
index 000000000..7a9f0700e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/shader-precision-format.html
@@ -0,0 +1,160 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL shader precision format test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="canvas" width="2" height="2" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+description(document.title);
+debug("Tests that WebGLShaderPrecisionFormat class and getShaderPrecisionFormat work.");
+debug("");
+var gl = wtu.create3DContext("canvas");
+
+function verifyShaderPrecisionFormat(shadertype, precisiontype) {
+ shouldBeTrue('gl.getShaderPrecisionFormat(' + shadertype + ', ' +
+ precisiontype + ') instanceof WebGLShaderPrecisionFormat');
+}
+
+debug("");
+debug("Test that getShaderPrecisionFormat returns a WebGLShaderPrecisionFormat object.");
+debug("");
+
+verifyShaderPrecisionFormat('gl.VERTEX_SHADER', 'gl.LOW_FLOAT');
+verifyShaderPrecisionFormat('gl.VERTEX_SHADER', 'gl.MEDIUM_FLOAT');
+verifyShaderPrecisionFormat('gl.VERTEX_SHADER', 'gl.HIGH_FLOAT');
+verifyShaderPrecisionFormat('gl.VERTEX_SHADER', 'gl.LOW_INT');
+verifyShaderPrecisionFormat('gl.VERTEX_SHADER', 'gl.MEDIUM_INT');
+verifyShaderPrecisionFormat('gl.VERTEX_SHADER', 'gl.HIGH_INT');
+verifyShaderPrecisionFormat('gl.FRAGMENT_SHADER', 'gl.LOW_FLOAT');
+verifyShaderPrecisionFormat('gl.FRAGMENT_SHADER', 'gl.MEDIUM_FLOAT');
+verifyShaderPrecisionFormat('gl.FRAGMENT_SHADER', 'gl.HIGH_FLOAT');
+verifyShaderPrecisionFormat('gl.FRAGMENT_SHADER', 'gl.LOW_INT');
+verifyShaderPrecisionFormat('gl.FRAGMENT_SHADER', 'gl.MEDIUM_INT');
+verifyShaderPrecisionFormat('gl.FRAGMENT_SHADER', 'gl.HIGH_INT');
+
+debug("");
+debug("Test that getShaderPrecisionFormat throws an error with invalid parameters.");
+debug("");
+
+wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, 'gl.getShaderPrecisionFormat(gl.HIGH_INT, gl.VERTEX_SHADER)');
+
+debug("");
+debug("Test that WebGLShaderPrecisionFormat values are sensible.");
+debug("");
+
+// The minimum values are from OpenGL ES Shading Language spec, section 4.5.
+
+var shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_FLOAT);
+shouldBeTrue('shaderPrecisionFormat.rangeMin >= 1');
+shouldBeTrue('shaderPrecisionFormat.rangeMax >= 1');
+shouldBeTrue('shaderPrecisionFormat.precision >= 8');
+
+shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT);
+shouldBeTrue('shaderPrecisionFormat.rangeMin >= 14');
+shouldBeTrue('shaderPrecisionFormat.rangeMax >= 14');
+shouldBeTrue('shaderPrecisionFormat.precision >= 10');
+
+shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT);
+shouldBeTrue('shaderPrecisionFormat.rangeMin >= 62');
+shouldBeTrue('shaderPrecisionFormat.rangeMax >= 62');
+shouldBeTrue('shaderPrecisionFormat.precision >= 16');
+
+shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_INT);
+shouldBeTrue('shaderPrecisionFormat.rangeMin >= 8');
+shouldBeTrue('shaderPrecisionFormat.rangeMax >= 8');
+shouldBeTrue('shaderPrecisionFormat.precision == 0');
+
+shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_INT);
+shouldBeTrue('shaderPrecisionFormat.rangeMin >= 10');
+shouldBeTrue('shaderPrecisionFormat.rangeMax >= 10');
+shouldBeTrue('shaderPrecisionFormat.precision == 0');
+
+shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_INT);
+shouldBeTrue('shaderPrecisionFormat.rangeMin >= 16');
+shouldBeTrue('shaderPrecisionFormat.rangeMax >= 16');
+shouldBeTrue('shaderPrecisionFormat.precision == 0');
+
+var shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_FLOAT);
+shouldBeTrue('shaderPrecisionFormat.rangeMin >= 1');
+shouldBeTrue('shaderPrecisionFormat.rangeMax >= 1');
+shouldBeTrue('shaderPrecisionFormat.precision >= 8');
+
+shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT);
+shouldBeTrue('shaderPrecisionFormat.rangeMin >= 14');
+shouldBeTrue('shaderPrecisionFormat.rangeMax >= 14');
+shouldBeTrue('shaderPrecisionFormat.precision >= 10');
+
+shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_INT);
+shouldBeTrue('shaderPrecisionFormat.rangeMin >= 8');
+shouldBeTrue('shaderPrecisionFormat.rangeMax >= 8');
+shouldBeTrue('shaderPrecisionFormat.precision == 0');
+
+shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_INT);
+shouldBeTrue('shaderPrecisionFormat.rangeMin >= 10');
+shouldBeTrue('shaderPrecisionFormat.rangeMax >= 10');
+shouldBeTrue('shaderPrecisionFormat.precision == 0');
+
+debug("");
+debug("Test optional highp support in fragment shaders.");
+debug("");
+
+shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT);
+shouldBeTrue('(shaderPrecisionFormat.rangeMin == 0 && shaderPrecisionFormat.rangeMax == 0 && shaderPrecisionFormat.precision == 0) || (shaderPrecisionFormat.rangeMin >= 62 && shaderPrecisionFormat.rangeMax >= 62 && shaderPrecisionFormat.precision >= 16)');
+
+shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_INT);
+shouldBeTrue('(shaderPrecisionFormat.rangeMin == 0 && shaderPrecisionFormat.rangeMax == 0 && shaderPrecisionFormat.precision == 0) || (shaderPrecisionFormat.rangeMin >= 16 && shaderPrecisionFormat.rangeMax >= 16 && shaderPrecisionFormat.precision == 0)');
+
+debug("");
+debug("Test that getShaderPrecisionFormat returns the same thing every call.");
+debug("");
+
+shaderPrecisionFormat = gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_FLOAT);
+var shaderPrecisionFormat2 = gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.LOW_FLOAT);
+shouldBeTrue('shaderPrecisionFormat.rangeMin == shaderPrecisionFormat2.rangeMin');
+shouldBeTrue('shaderPrecisionFormat.rangeMax == shaderPrecisionFormat2.rangeMax');
+shouldBeTrue('shaderPrecisionFormat.precision == shaderPrecisionFormat2.precision');
+
+finishTest();
+</script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/type-conversion-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/type-conversion-test.html
new file mode 100644
index 000000000..4fc263a8c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/type-conversion-test.html
@@ -0,0 +1,174 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+description("Tests calling WebGL APIs with various types");
+
+var context = wtu.create3DContext();
+var program = wtu.loadStandardProgram(context);
+var shader = wtu.loadStandardVertexShader(context);
+
+assertMsg(program != null, "Program Compiled");
+assertMsg(shader != null, "Shader Compiled");
+
+var loc = context.getUniformLocation(program, "u_modelViewProjMatrix");
+assertMsg(loc != null, "getUniformLocation succeeded");
+
+var buffer = context.createBuffer();
+context.bindBuffer(context.ARRAY_BUFFER, buffer);
+var texture = context.createTexture();
+context.bindTexture(context.TEXTURE_2D, texture);
+context.useProgram(program);
+
+var args = [
+ { type: "number", value: 0 },
+ { type: "number", value: 2 },
+ { type: "string that is NaN", value: "foo", },
+ { type: "string that is number", value: "2", },
+ { type: "null", value: null },
+ { type: "Empty Array", value: [] },
+ { type: "Object", value: {} },
+ { type: "Array of Number", value: [2] },
+ { type: "Array of String", value: ["foo"] },
+ { type: "Array of String that is number", value: ["0"] },
+ { type: "Array of String that is number", value: ["2"] },
+ { type: "TypedArray", value: new Float32Array(1) }
+];
+
+var argument;
+
+for (var i = 0; i < args.length; ++i) {
+ argument = args[i].value;
+ var func1 = shouldBeUndefined;
+ var func2 = shouldBeNonNull;
+ if (argument == 2) {
+ func2 = shouldBeNull;
+ }
+ var func3 = shouldBeNull;
+ debug("");
+ debug("testing type of " + args[i].type + " : value = " + argument);
+ func1("context.bindAttribLocation(program, argument, 'foo')");
+ func1("context.blendColor(argument, argument, argument, argument)");
+ func1("context.bufferData(context.ARRAY_BUFFER, argument, context.STATIC_DRAW)");
+ func1("context.bufferData(context.ARRAY_BUFFER, new Float32Array(10), context.STATIC_DRAW)");
+ func1("context.bufferSubData(context.ARRAY_BUFFER, argument, new Float32Array(2))");
+ func1("context.clear(argument)")
+ func1("context.clearColor(argument, 0, 0, 0)");
+ func1("context.clearColor(0, argument, 0, 0)");
+ func1("context.clearColor(0, 0, argument, 0)");
+ func1("context.clearColor(0, 0, 0, argument)");
+ func1("context.clearDepth(argument)");
+ func1("context.clearStencil(argument)");
+ func1("context.copyTexImage2D(context.TEXTURE_2D, argument, context.RGBA, 0, 0, 1, 1, 0)");
+ func1("context.copyTexImage2D(context.TEXTURE_2D, 0, context.RGBA, argument, 0, 1, 1, 0)");
+ func1("context.copyTexImage2D(context.TEXTURE_2D, 0, context.RGBA, 0, argument, 1, 1, 0)");
+ func1("context.copyTexImage2D(context.TEXTURE_2D, 0, context.RGBA, 0, 0, argument, 1, 0)");
+ func1("context.copyTexImage2D(context.TEXTURE_2D, 0, context.RGBA, 0, 0, 0, argument, 0)");
+ func1("context.copyTexSubImage2D(context.TEXTURE_2D, argument, 0, 0, 0, 0, 0, 0)");
+ func1("context.copyTexSubImage2D(context.TEXTURE_2D, 0, argument, 0, 0, 0, 0, 0)");
+ func1("context.copyTexSubImage2D(context.TEXTURE_2D, 0, 0, argument, 0, 0, 0, 0)");
+ func1("context.copyTexSubImage2D(context.TEXTURE_2D, 0, 0, 0, argument, 0, 0, 0)");
+ func1("context.copyTexSubImage2D(context.TEXTURE_2D, 0, 0, 0, 0, argument, 0, 0)");
+ func1("context.copyTexSubImage2D(context.TEXTURE_2D, 0, 0, 0, 0, 0, argument, 0)");
+ func1("context.copyTexSubImage2D(context.TEXTURE_2D, 0, 0, 0, 0, 0, 0, argument)");
+ func1("context.depthMask(argument)");
+ func1("context.depthRange(argument, 1)");
+ func1("context.depthRange(0, argument)");
+ func1("context.drawArrays(context.POINTS, argument, 1)");
+ func1("context.drawArrays(context.POINTS, 0, argument)");
+ //func1("context.drawElements(...)");
+ func1("context.enableVertexAttribArray(argument)");
+ func1("context.disableVertexAttribArray(argument)");
+ func2("context.getActiveAttrib(program, argument)");
+ func2("context.getActiveUniform(program, argument)");
+ func3("context.getParameter(argument)");
+ func1("context.lineWidth(argument)");
+ func1("context.polygonOffset(argument, 0)");
+ func1("context.polygonOffset(0, argument)");
+ //func1("context.readPixels(...)");
+ //func1("context.renderbufferStorage(...)");
+ func1("context.sampleCoverage(argument, 0)");
+ func1("context.sampleCoverage(0, argument)");
+ func1("context.scissor(argument, 0, 10, 10)");
+ func1("context.scissor(0, argument, 10, 10)");
+ func1("context.scissor(0, 0, argument, 10)");
+ func1("context.scissor(0, 0, 10, argument)");
+ func1("context.shaderSource(shader, argument)");
+ func1("context.stencilFunc(context.NEVER, argument, 255)");
+ func1("context.stencilFunc(context.NEVER, 0, argument)");
+ //func1("context.stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)");
+ func1("context.stencilMask(argument)");
+ //func1("context.stencilMaskSeparate(context.FRONT, argument);
+ //func1("context.texImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, ArrayBufferView pixels)");
+ //func1("context.texParameterf(GLenum target, GLenum pname, GLfloat param)");
+ //func1("context.texParameteri(GLenum target, GLenum pname, GLint param)");
+ //func1("context.texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,GLsizei width, GLsizei height,GLenum format, GLenum type, ArrayBufferView pixels)");
+ func1("context.uniform1i(loc, argument)");
+ func1("context.uniform2i(loc, argument, 0)");
+ func1("context.uniform2i(loc, 0, argument)");
+ func1("context.uniform3i(loc, argument, 0, 0)");
+ func1("context.uniform3i(loc, 0, argument, 0)");
+ func1("context.uniform3i(loc, 0, 0, argument)");
+ func1("context.uniform4i(loc, argument, 0, 0, 0)");
+ func1("context.uniform4i(loc, 0, argument, 0, 0)");
+ func1("context.uniform4i(loc, 0, 0, argument, 0)");
+ func1("context.uniform4i(loc, 0, 0, 0, argument)");
+ func1("context.uniform1f(loc, argument)");
+ func1("context.uniform2f(loc, argument, 0)");
+ func1("context.uniform2f(loc, 0, argument)");
+ func1("context.uniform3f(loc, argument, 0, 0)");
+ func1("context.uniform3f(loc, 0, argument, 0)");
+ func1("context.uniform3f(loc, 0, 0, argument)");
+ func1("context.uniform4f(loc, argument, 0, 0, 0)");
+ func1("context.uniform4f(loc, 0, argument, 0, 0)");
+ func1("context.uniform4f(loc, 0, 0, argument, 0)");
+ func1("context.uniform4f(loc, 0, 0, 0, argument)");
+}
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/uninitialized-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/uninitialized-test.html
new file mode 100644
index 000000000..06d957458
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/uninitialized-test.html
@@ -0,0 +1,196 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Uninitialized GL Resources Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+"use strict";
+description("Tests to check user code cannot access uninitialized data from GL resources.");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl)
+ testFailed("Context created.");
+else
+ testPassed("Context created.");
+
+function setupTexture(texWidth, texHeight) {
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, texWidth, texHeight, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+ // this can be quite undeterministic so to improve odds of seeing uninitialized data write bits
+ // into tex then delete texture then re-create one with same characteristics (driver will likely reuse mem)
+ // with this trick on r59046 WebKit/OSX I get FAIL 100% of the time instead of ~15% of the time.
+
+ var badData = new Uint8Array(texWidth * texHeight * 4);
+ for (var i = 0; i < badData.length; ++i)
+ badData[i] = i % 255;
+
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, texWidth, texHeight, gl.RGBA, gl.UNSIGNED_BYTE, badData);
+ gl.finish(); // make sure it has been uploaded
+
+ gl.deleteTexture(texture);
+ gl.finish(); // make sure it has been deleted
+
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ return texture;
+}
+
+function checkNonZeroPixels(texture, texWidth, texHeight, skipX, skipY, skipWidth, skipHeight, skipR, skipG, skipB, skipA) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ var fb = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+
+ var data = new Uint8Array(texWidth * texHeight * 4);
+ gl.readPixels(0, 0, texWidth, texHeight, gl.RGBA, gl.UNSIGNED_BYTE, data);
+
+ var k = 0;
+ for (var y = 0; y < texHeight; ++y) {
+ for (var x = 0; x < texWidth; ++x) {
+ var index = (y * texWidth + x) * 4;
+ if (x >= skipX && x < skipX + skipWidth && y >= skipY && y < skipY + skipHeight) {
+ if (data[index] != skipR || data[index + 1] != skipG || data[index + 2] != skipB || data[index + 3] != skipA) {
+ testFailed("non-zero pixel values are wrong");
+ return;
+ }
+ } else {
+ for (var i = 0; i < 4; ++i) {
+ if (data[index + i] != 0)
+ k++;
+ }
+ }
+ }
+ }
+ if (k) {
+ testFailed("Found " + k + " non-zero bytes");
+ } else {
+ testPassed("All data initialized");
+ }
+}
+
+var width = 512;
+var height = 512;
+
+debug("");
+debug("Reading an uninitialized texture (texImage2D) should succeed with all bytes set to 0.");
+
+var tex = setupTexture(width, height);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+checkNonZeroPixels(tex, width, height, 0, 0, 0, 0, 0, 0, 0, 0);
+gl.deleteTexture(tex);
+gl.finish();
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+debug("");
+debug("Reading an uninitialized portion of a texture (copyTexImage2D) should succeed with all bytes set to 0.");
+
+var tex = setupTexture(width, height);
+var fbo = gl.createFramebuffer();
+gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+var rbo = gl.createRenderbuffer();
+gl.bindRenderbuffer(gl.RENDERBUFFER, rbo);
+var fboWidth = 16;
+var fboHeight = 16;
+gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, fboWidth, fboHeight);
+gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo);
+shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+gl.clearColor(1.0, 0.0, 0.0, 1.0);
+gl.clear(gl.COLOR_BUFFER_BIT);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, width, height, 0);
+checkNonZeroPixels(tex, width, height, 0, 0, fboWidth, fboHeight, 255, 0, 0, 255);
+gl.deleteTexture(tex);
+gl.finish();
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+debug("");
+debug("Reading an uninitialized portion of a texture (copyTexImage2D with negative x and y) should succeed with all bytes set to 0.");
+
+var tex = setupTexture(width, height);
+var fbo = gl.createFramebuffer();
+gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+var rbo = gl.createRenderbuffer();
+gl.bindRenderbuffer(gl.RENDERBUFFER, rbo);
+var fboWidth = 16;
+var fboHeight = 16;
+gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, fboWidth, fboHeight);
+gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rbo);
+shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+gl.clearColor(1.0, 0.0, 0.0, 1.0);
+gl.clear(gl.COLOR_BUFFER_BIT);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+var x = -8;
+var y = -8;
+gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, x, y, width, height, 0);
+checkNonZeroPixels(tex, width, height, -x, -y, fboWidth, fboHeight, 255, 0, 0, 255);
+gl.deleteTexture(tex);
+gl.finish();
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+debug("");
+debug("Reading an uninitialized portion of a texture (copyTexImage2D from WebGL internal fbo) should succeed with all bytes set to 0.");
+
+var tex = setupTexture(width, height);
+gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+gl.clearColor(0.0, 1.0, 0.0, 0.0);
+gl.clear(gl.COLOR_BUFFER_BIT);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, width, height, 0);
+checkNonZeroPixels(tex, width, height, 0, 0, gl.canvas.width, gl.canvas.height, 0, 255, 0, 0);
+gl.deleteTexture(tex);
+gl.finish();
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+//TODO: uninitialized vertex array buffer
+//TODO: uninitialized vertex elements buffer
+//TODO: uninitialized framebuffer? (implementations would need to do a GL clear at first binding?)
+//TODO: uninitialized renderbuffer? (implementations would need to do a GL clear at first binding?)
+//TODO: uninitialized uniform arrays?
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/webgl-specific.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/webgl-specific.html
new file mode 100644
index 000000000..511fbc2d6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/misc/webgl-specific.html
@@ -0,0 +1,133 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLES2 difference test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+description("Tests the few differences between WebGL and GLES2");
+
+var gl = wtu.create3DContext();
+var program = wtu.loadStandardProgram(gl);
+gl.useProgram(program);
+var vertexObject = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+gl.enableVertexAttribArray(0);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Setup should succeed");
+
+debug("");
+debug("Verify that constant color and constant alpha cannot be used together as source and destination factors in the blend function");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFunc(gl.CONSTANT_COLOR, gl.CONSTANT_ALPHA)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFunc(gl.ONE_MINUS_CONSTANT_COLOR, gl.CONSTANT_ALPHA)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFunc(gl.CONSTANT_COLOR, gl.ONE_MINUS_CONSTANT_ALPHA)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFunc(gl.ONE_MINUS_CONSTANT_COLOR, gl.ONE_MINUS_CONSTANT_ALPHA)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFunc(gl.CONSTANT_ALPHA, gl.CONSTANT_COLOR)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFunc(gl.CONSTANT_ALPHA, gl.ONE_MINUS_CONSTANT_COLOR)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFunc(gl.ONE_MINUS_CONSTANT_ALPHA, gl.CONSTANT_COLOR)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFunc(gl.ONE_MINUS_CONSTANT_ALPHA, gl.ONE_MINUS_CONSTANT_COLOR)");
+
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFuncSeparate(gl.CONSTANT_COLOR, gl.CONSTANT_ALPHA, gl.ONE, gl.ZERO)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFuncSeparate(gl.ONE_MINUS_CONSTANT_COLOR, gl.CONSTANT_ALPHA, gl.ONE, gl.ZERO)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFuncSeparate(gl.CONSTANT_COLOR, gl.ONE_MINUS_CONSTANT_ALPHA, gl.ONE, gl.ZERO)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFuncSeparate(gl.ONE_MINUS_CONSTANT_COLOR, gl.ONE_MINUS_CONSTANT_ALPHA, gl.ONE, gl.ZERO)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFuncSeparate(gl.CONSTANT_ALPHA, gl.CONSTANT_COLOR, gl.ONE, gl.ZERO)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFuncSeparate(gl.CONSTANT_ALPHA, gl.ONE_MINUS_CONSTANT_COLOR, gl.ONE, gl.ZERO)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFuncSeparate(gl.ONE_MINUS_CONSTANT_ALPHA, gl.CONSTANT_COLOR, gl.ONE, gl.ZERO)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.blendFuncSeparate(gl.ONE_MINUS_CONSTANT_ALPHA, gl.ONE_MINUS_CONSTANT_COLOR, gl.ONE, gl.ZERO)");
+
+debug("");
+debug("Verify that in depthRange zNear <= zFar");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.depthRange(20, 10)");
+
+debug("");
+debug("Verify that front/back settings should be the same for stenclMask and stencilFunc");
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.stencilMask(255)");
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawArrays(gl.TRIANGLES, 0, 0)");
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.stencilMaskSeparate(gl.FRONT, 1)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 0)");
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.stencilMaskSeparate(gl.BACK, 1)");
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawArrays(gl.TRIANGLES, 0, 0)");
+
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.stencilFunc(gl.ALWAYS, 0, 255)");
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawArrays(gl.TRIANGLES, 0, 0)");
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.stencilFuncSeparate(gl.BACK, gl.ALWAYS, 1, 255)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 0)");
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.stencilFuncSeparate(gl.FRONT, gl.ALWAYS, 1, 255)");
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawArrays(gl.TRIANGLES, 0, 0)");
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.stencilFuncSeparate(gl.BACK, gl.ALWAYS, 1, 1)");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.drawArrays(gl.TRIANGLES, 0, 0)");
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.stencilFuncSeparate(gl.FRONT, gl.ALWAYS, 1, 1)");
+wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.drawArrays(gl.TRIANGLES, 0, 0)");
+
+debug("");
+debug("Verify that *LENGTH are undefined");
+shouldBeUndefined(gl.INFO_LOG_LENGTH);
+shouldBeUndefined(gl.SHADER_SOURCE_LENGTH);
+shouldBeUndefined(gl.ACTIVE_UNIFORM_MAX_LENGTH);
+shouldBeUndefined(gl.ACTIVE_ATTRIB_MAX_LENGTH);
+shouldBeUndefined(gl.ACTIVE_ATTRIBUTE_MAX_LENGTH);
+
+debug("");
+debug("Verify that UNPACK_COLORSPACE_CONVERSION_WEBGL is supported");
+shouldBe("gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL)", "gl.BROWSER_DEFAULT_WEBGL");
+gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);
+shouldBe("gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL)", "gl.NONE");
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "set/get UNPACK_COLORSPACE_CONVERSION_WEBGL should generate no error");
+
+debug("");
+debug("Verify that drawingBufferWidth and drawingBufferHeights are implemented");
+shouldBeTrue("gl.drawingBufferWidth >= 0 && gl.drawingBufferHeight >= 0");
+
+debug("");
+debug("Verify that bindAttribLocation rejects names start with webgl_ or _webgl_");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.bindAttribLocation(program, 0, 'webgl_a')");
+wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, "gl.bindAttribLocation(program, 0, '_webgl_a')");
+
+debug("");
+debug("Verify that NaN line width is not accepted");
+wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, "gl.lineWidth(NaN)");
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/00_test_list.txt
new file mode 100644
index 000000000..1a09da036
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/00_test_list.txt
@@ -0,0 +1,58 @@
+conformance/constants.html
+conformance/getContext.html
+conformance/methods.html
+conformance/quickCheckAPI-A.html
+conformance/quickCheckAPI-B1.html
+conformance/quickCheckAPI-B2.html
+conformance/quickCheckAPI-B3.html
+conformance/quickCheckAPI-B4.html
+conformance/quickCheckAPI-C.html
+conformance/quickCheckAPI-D_G.html
+conformance/quickCheckAPI-G_I.html
+conformance/quickCheckAPI-L_S.html
+conformance/quickCheckAPI-S_V.html
+conformance/webGLArrays.html
+functions/bindBuffer.html
+functions/bindBufferBadArgs.html
+functions/bindFramebufferLeaveNonZero.html
+functions/bufferData.html
+functions/bufferDataBadArgs.html
+functions/bufferSubData.html
+functions/bufferSubDataBadArgs.html
+functions/copyTexImage2D.html
+functions/copyTexImage2DBadArgs.html
+functions/copyTexSubImage2D.html
+functions/copyTexSubImage2DBadArgs.html
+functions/deleteBufferBadArgs.html
+functions/drawArrays.html
+functions/drawArraysOutOfBounds.html
+functions/drawElements.html
+functions/drawElementsBadArgs.html
+functions/isTests.html
+--min-version 1.0.2 functions/isTestsBadArgs.html
+functions/readPixels.html
+functions/readPixelsBadArgs.html
+functions/texImage2D.html
+functions/texImage2DBadArgs.html
+functions/texImage2DHTML.html
+functions/texImage2DHTMLBadArgs.html
+functions/texSubImage2D.html
+functions/texSubImage2DBadArgs.html
+functions/texSubImage2DHTML.html
+functions/texSubImage2DHTMLBadArgs.html
+functions/uniformf.html
+functions/uniformfBadArgs.html
+functions/uniformfArrayLen1.html
+functions/uniformi.html
+functions/uniformiBadArgs.html
+functions/uniformMatrix.html
+functions/uniformMatrixBadArgs.html
+functions/vertexAttrib.html
+functions/vertexAttribBadArgs.html
+functions/vertexAttribPointer.html
+functions/vertexAttribPointerBadArgs.html
+glsl/arrayOutOfBounds.html
+#glsl/longLoops.html // No interactive tests.
+glsl/uniformOutOfBounds.html
+#glsl/unusedAttribsUniforms.html // No interactive tests.
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/README.md b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/README.md
new file mode 100644
index 000000000..1e1e2406c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/README.md
@@ -0,0 +1,53 @@
+Tests for the WebGL canvas context
+==================================
+
+These tests are intended to serve the following purposes:
+
+ * Assert spec conformance
+ * Check the safety of the GL binding (bounds checking, same origin policy)
+ * Provide performance numbers for developers
+
+
+Running the tests
+-----------------
+
+ 1. <a href="http://learningwebgl.com/blog/?p=11">Install a browser with WebGL support</a>
+ 2. Run <code>ruby gen_tests.rb</code> if you have modified the tests.
+ 3. Run <code>ruby test_server.rb</code> if you want to get test run output to test_server's stdout (especially useful for finding out which test crashed your browser.)
+ 4. Open all_tests.html in your browser.
+
+
+Want to contribute?
+-------------------
+
+ 1. Fork this repo
+ 2. Run <code>gen_tests.rb</code>
+ 3. Look into templates/ to see which functions lack tests (also see <a href="../raw/master/methods.txt">methods.txt</a> and <a href="http://dxr.mozilla.org/mozilla-central/source/dom/interfaces/canvas/nsICanvasRenderingContextWebGL.idl">nsICanvasRenderingContextWebGL.idl</a>):
+ 1. copy methodName.html to functions/methodName.html and write tests that test the results of valid inputs.
+ 2. copy methodNameBadArgs.html to functions/methodNameBadArgs.html and write tests to assert that invalid inputs throw exceptions.
+ 3. If your test causes a segfault, add the following to the top of the script tag: <code>Tests.autorun = false; Tests.message = "Caution: this may crash your browser";</code>
+ 4. For each performance test:
+ 1. Write a performance/myTestName.html and set <code>Tests.autorun = false;</code>
+ 5. If you have a test that you would like to run over the whole API or want to generate tests programmatically, add them to gen_tests.rb or write your own script.
+ 6. Create a commit for each file. (E.g. <code>for f in $(git status | grep -e "^#\\s*functions/\\S*$" | sed "s/^#\s*//"); do git add $f; git commit -m $f; done</code>)
+ 7. Send me a pull request.
+ 8. Congratulations, you're now a contributor!
+
+
+For more information on WebGL:
+
+ * <a href="http://planet-webgl.org">Planet WebGL</a>
+ * <a href="http://learningwebgl.com">Learning WebGL</a>
+ * <a href="http://www.khronos.org/message_boards/viewforum.php?f=34">WebGL on Khronos Message Boards</a>
+
+Developer links:
+
+ * <a href="https://bugzilla.mozilla.org/buglist.cgi?quicksearch=webgl">WebGL on Mozilla Bugzilla</a>
+ * <a href="https://bugzilla.webkit.org/buglist.cgi?quicksearch=webgl">WebGL on WebKit Bugzilla</a>
+ * <a href="http://code.google.com/p/chromium/issues/list?q=label:3D-WebGL">WebGL on Chromium Bugzilla</a>
+
+What's the stuff in apigen?
+
+ There are some Python scripts in the apigen/ directory that generate C++ based on the API definition files (gl2.h, api_modifications.txt, valid_args.txt.) The generated code is Mozilla XPCOM functions that check their args against the valid GLES 2.0 constants (as they were written on the man pages.) There's also some wackier stuff for checking copyTexImage2D and copyTexSubImage2D image dimensions against viewport dimensions.
+
+ If you can use it to generate code for your WebGL implementation, it might save you 1500 lines of typing and testing. The last time I used it was summer 2009 to generate a patch for Canvas 3D, so it's likely somewhat out of date.
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-A.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-A.js
new file mode 100644
index 000000000..31039b596
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-A.js
@@ -0,0 +1,86 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+// - setup -- set up state for testing the GL function, returns values
+// that need cleanup in teardown. Run once before entering a
+// test loop.
+// - teardown -- do cleanup on setup's return values after testing is complete
+// - generate -- generate a valid set of random arguments for the GL function
+// - returnValueCleanup -- do cleanup on value returned by the tested GL function
+// - cleanup -- do cleanup on generated arguments from generate
+// - checkArgValidity -- check if passed args are valid. Has a call signature
+// that matches generate's return value. Returns true
+// if args are valid, false if not.
+//
+// Example test loop that demonstrates how the function args and return
+// values flow together:
+//
+// var setupArgs = argGen.setup();
+// for (var i=0; i<numberOfTests; i++) {
+// var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+// var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+// var rv = call the GL function with generatedArgs;
+// argGen.returnValueCleanup(rv);
+// argGen.cleanup.apply(argGen, generatedArgs);
+// }
+// argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// A
+
+ activeTexture : {
+ generate : function() { return [textureUnit.random()]; },
+ checkArgValidity : function(t) { return textureUnit.has(t); },
+ teardown : function() { GL.activeTexture(GL.TEXTURE0); }
+ },
+ attachShader : {
+ generate : function() {
+ var p = GL.createProgram();
+ var sh = GL.createShader(shaderType.random());
+ return [p, sh];
+ },
+ checkArgValidity : function(p, sh) {
+ return GL.isProgram(p) && GL.isShader(sh) && !GL.getAttachedShaders(p).has(sh);
+ },
+ cleanup : function(p, sh) {
+ try {GL.detachShader(p,sh);} catch(e) {}
+ try {GL.deleteProgram(p);} catch(e) {}
+ try {GL.deleteShader(sh);} catch(e) {}
+ }
+ }
+
+};
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B1.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B1.js
new file mode 100644
index 000000000..e8abf394a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B1.js
@@ -0,0 +1,78 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+// - setup -- set up state for testing the GL function, returns values
+// that need cleanup in teardown. Run once before entering a
+// test loop.
+// - teardown -- do cleanup on setup's return values after testing is complete
+// - generate -- generate a valid set of random arguments for the GL function
+// - returnValueCleanup -- do cleanup on value returned by the tested GL function
+// - cleanup -- do cleanup on generated arguments from generate
+// - checkArgValidity -- check if passed args are valid. Has a call signature
+// that matches generate's return value. Returns true
+// if args are valid, false if not.
+//
+// Example test loop that demonstrates how the function args and return
+// values flow together:
+//
+// var setupArgs = argGen.setup();
+// for (var i=0; i<numberOfTests; i++) {
+// var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+// var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+// var rv = call the GL function with generatedArgs;
+// argGen.returnValueCleanup(rv);
+// argGen.cleanup.apply(argGen, generatedArgs);
+// }
+// argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// B-1
+
+ bindAttribLocation : {
+ generate : function() {
+ var program = GL.createProgram();
+ return [program, randomVertexAttribute(), randomName()];
+ },
+ checkArgValidity : function(program, index, name) {
+ return GL.isProgram(program) && isVertexAttribute(index) && isValidName(name);
+ },
+ cleanup : function(program, index, name) {
+ try { GL.deleteProgram(program); } catch(e) {}
+ }
+ }
+
+};
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B2.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B2.js
new file mode 100644
index 000000000..327f44266
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B2.js
@@ -0,0 +1,171 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+// - setup -- set up state for testing the GL function, returns values
+// that need cleanup in teardown. Run once before entering a
+// test loop.
+// - teardown -- do cleanup on setup's return values after testing is complete
+// - generate -- generate a valid set of random arguments for the GL function
+// - returnValueCleanup -- do cleanup on value returned by the tested GL function
+// - cleanup -- do cleanup on generated arguments from generate
+// - checkArgValidity -- check if passed args are valid. Has a call signature
+// that matches generate's return value. Returns true
+// if args are valid, false if not.
+//
+// Example test loop that demonstrates how the function args and return
+// values flow together:
+//
+// var setupArgs = argGen.setup();
+// for (var i=0; i<numberOfTests; i++) {
+// var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+// var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+// var rv = call the GL function with generatedArgs;
+// argGen.returnValueCleanup(rv);
+// argGen.cleanup.apply(argGen, generatedArgs);
+// }
+// argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// B-2
+
+ bindBuffer : {
+ generate : function(buf) {
+ return [bufferTarget.random(), GL.createBuffer()];
+ },
+ checkArgValidity : function(target, buf) {
+ if (!bufferTarget.has(target))
+ return false;
+ GL.bindBuffer(target, buf);
+ return GL.isBuffer(buf);
+ },
+ cleanup : function(t, buf, m) {
+ GL.deleteBuffer(buf);
+ }
+ },
+ bindFramebuffer : {
+ generate : function() {
+ return [GL.FRAMEBUFFER, Math.random() > 0.5 ? null : GL.createFramebuffer()];
+ },
+ checkArgValidity : function(target, fbo) {
+ if (target != GL.FRAMEBUFFER)
+ return false;
+ if (fbo != null)
+ GL.bindFramebuffer(target, fbo);
+ return (fbo == null || GL.isFramebuffer(fbo));
+ },
+ cleanup : function(target, fbo) {
+ GL.bindFramebuffer(target, null);
+ if (fbo)
+ GL.deleteFramebuffer(fbo);
+ }
+ },
+ bindRenderbuffer : {
+ generate : function() {
+ return [GL.RENDERBUFFER, Math.random() > 0.5 ? null : GL.createRenderbuffer()];
+ },
+ checkArgValidity : function(target, rbo) {
+ if (target != GL.RENDERBUFFER)
+ return false;
+ if (rbo != null)
+ GL.bindRenderbuffer(target, rbo);
+ return (rbo == null || GL.isRenderbuffer(rbo));
+ },
+ cleanup : function(target, rbo) {
+ GL.bindRenderbuffer(target, null);
+ if (rbo)
+ GL.deleteRenderbuffer(rbo);
+ }
+ },
+ bindTexture : {
+ generate : function() {
+ return [bindTextureTarget.random(), Math.random() > 0.5 ? null : GL.createTexture()];
+ },
+ checkArgValidity : function(target, o) {
+ if (!bindTextureTarget.has(target))
+ return false;
+ if (o != null)
+ GL.bindTexture(target, o);
+ return (o == null || GL.isTexture(o));
+ },
+ cleanup : function(target, o) {
+ GL.bindTexture(target, null);
+ if (o)
+ GL.deleteTexture(o);
+ }
+ },
+ blendColor : {
+ generate : function() { return randomColor(); },
+ teardown : function() { GL.blendColor(0,0,0,0); }
+ },
+ blendEquation : {
+ generate : function() { return [blendEquationMode.random()]; },
+ checkArgValidity : function(o) { return blendEquationMode.has(o); },
+ teardown : function() { GL.blendEquation(GL.FUNC_ADD); }
+ },
+ blendEquationSeparate : {
+ generate : function() {
+ return [blendEquationMode.random(), blendEquationMode.random()];
+ },
+ checkArgValidity : function(o,p) {
+ return blendEquationMode.has(o) && blendEquationMode.has(p);
+ },
+ teardown : function() { GL.blendEquationSeparate(GL.FUNC_ADD, GL.FUNC_ADD); }
+ },
+ blendFunc : {
+ generate : function() {
+ return [blendFuncSfactor.random(), blendFuncDfactor.random()];
+ },
+ checkArgValidity : function(s,d) {
+ return blendFuncSfactor.has(s) && blendFuncDfactor.has(d);
+ },
+ teardown : function() { GL.blendFunc(GL.ONE, GL.ZERO); }
+ },
+ blendFuncSeparate : {
+ generate : function() {
+ return [blendFuncSfactor.random(), blendFuncDfactor.random(),
+ blendFuncSfactor.random(), blendFuncDfactor.random()];
+ },
+ checkArgValidity : function(s,d,as,ad) {
+ return blendFuncSfactor.has(s) && blendFuncDfactor.has(d) &&
+ blendFuncSfactor.has(as) && blendFuncDfactor.has(ad) ;
+ },
+ teardown : function() {
+ GL.blendFuncSeparate(GL.ONE, GL.ZERO, GL.ONE, GL.ZERO);
+ }
+ }
+
+};
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B3.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B3.js
new file mode 100644
index 000000000..7b7f46c46
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B3.js
@@ -0,0 +1,85 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+// - setup -- set up state for testing the GL function, returns values
+// that need cleanup in teardown. Run once before entering a
+// test loop.
+// - teardown -- do cleanup on setup's return values after testing is complete
+// - generate -- generate a valid set of random arguments for the GL function
+// - returnValueCleanup -- do cleanup on value returned by the tested GL function
+// - cleanup -- do cleanup on generated arguments from generate
+// - checkArgValidity -- check if passed args are valid. Has a call signature
+// that matches generate's return value. Returns true
+// if args are valid, false if not.
+//
+// Example test loop that demonstrates how the function args and return
+// values flow together:
+//
+// var setupArgs = argGen.setup();
+// for (var i=0; i<numberOfTests; i++) {
+// var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+// var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+// var rv = call the GL function with generatedArgs;
+// argGen.returnValueCleanup(rv);
+// argGen.cleanup.apply(argGen, generatedArgs);
+// }
+// argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// B-3
+
+ bufferData : {
+ setup : function() {
+ var buf = GL.createBuffer();
+ var ebuf = GL.createBuffer();
+ GL.bindBuffer(GL.ARRAY_BUFFER, buf);
+ GL.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, ebuf);
+ return [buf, ebuf];
+ },
+ generate : function(buf, ebuf) {
+ return [bufferTarget.random(), randomBufferData(), bufferMode.random()];
+ },
+ checkArgValidity : function(target, bufData, mode) {
+ return bufferTarget.has(target) && isBufferData(bufData) && bufferMode.has(mode);
+ },
+ teardown : function(buf, ebuf) {
+ GL.deleteBuffer(buf);
+ GL.deleteBuffer(ebuf);
+ },
+ }
+
+};
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B4.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B4.js
new file mode 100644
index 000000000..6881c3214
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B4.js
@@ -0,0 +1,88 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+// - setup -- set up state for testing the GL function, returns values
+// that need cleanup in teardown. Run once before entering a
+// test loop.
+// - teardown -- do cleanup on setup's return values after testing is complete
+// - generate -- generate a valid set of random arguments for the GL function
+// - returnValueCleanup -- do cleanup on value returned by the tested GL function
+// - cleanup -- do cleanup on generated arguments from generate
+// - checkArgValidity -- check if passed args are valid. Has a call signature
+// that matches generate's return value. Returns true
+// if args are valid, false if not.
+//
+// Example test loop that demonstrates how the function args and return
+// values flow together:
+//
+// var setupArgs = argGen.setup();
+// for (var i=0; i<numberOfTests; i++) {
+// var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+// var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+// var rv = call the GL function with generatedArgs;
+// argGen.returnValueCleanup(rv);
+// argGen.cleanup.apply(argGen, generatedArgs);
+// }
+// argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// B-4
+
+ bufferSubData : {
+ setup : function() {
+ var buf = GL.createBuffer();
+ var ebuf = GL.createBuffer();
+ GL.bindBuffer(GL.ARRAY_BUFFER, buf);
+ GL.bufferData(GL.ARRAY_BUFFER, 256, GL.STATIC_DRAW);
+ GL.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, ebuf);
+ GL.bufferData(GL.ELEMENT_ARRAY_BUFFER, 256, GL.STATIC_DRAW);
+ return [buf, ebuf];
+ },
+ generate : function(buf, ebuf) {
+ var d = randomBufferSubData(256);
+ return [bufferTarget.random(), d.offset, d.data];
+ },
+ checkArgValidity : function(target, offset, data) {
+ return bufferTarget.has(target) && offset >= 0 && data.byteLength >= 0 && offset + data.byteLength <= 256;
+ },
+ teardown : function(buf, ebuf) {
+ GL.deleteBuffer(buf);
+ GL.deleteBuffer(ebuf);
+ },
+ }
+
+};
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-C.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-C.js
new file mode 100644
index 000000000..974ff7455
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-C.js
@@ -0,0 +1,136 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+// - setup -- set up state for testing the GL function, returns values
+// that need cleanup in teardown. Run once before entering a
+// test loop.
+// - teardown -- do cleanup on setup's return values after testing is complete
+// - generate -- generate a valid set of random arguments for the GL function
+// - returnValueCleanup -- do cleanup on value returned by the tested GL function
+// - cleanup -- do cleanup on generated arguments from generate
+// - checkArgValidity -- check if passed args are valid. Has a call signature
+// that matches generate's return value. Returns true
+// if args are valid, false if not.
+//
+// Example test loop that demonstrates how the function args and return
+// values flow together:
+//
+// var setupArgs = argGen.setup();
+// for (var i=0; i<numberOfTests; i++) {
+// var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+// var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+// var rv = call the GL function with generatedArgs;
+// argGen.returnValueCleanup(rv);
+// argGen.cleanup.apply(argGen, generatedArgs);
+// }
+// argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// C
+
+ checkFramebufferStatus : {
+ generate : function() {
+ return [Math.random() > 0.5 ? null : GL.createFramebuffer()];
+ },
+ checkArgValidity : function(fbo) {
+ if (fbo != null)
+ GL.bindFramebuffer(GL.FRAMEBUFFER, fbo);
+ return fbo == null || GL.isFramebuffer(fbo);
+ },
+ cleanup : function(fbo){
+ GL.bindFramebuffer(GL.FRAMEBUFFER, null);
+ if (fbo != null)
+ try{ GL.deleteFramebuffer(fbo); } catch(e) {}
+ }
+ },
+ clear : {
+ generate : function() { return [clearMask.random()]; },
+ checkArgValidity : function(mask) { return clearMask.has(mask); }
+ },
+ clearColor : {
+ generate : function() { return randomColor(); },
+ teardown : function() { GL.clearColor(0,0,0,0); }
+ },
+ clearDepth : {
+ generate : function() { return [Math.random()]; },
+ teardown : function() { GL.clearDepth(1); }
+ },
+ clearStencil : {
+ generate : function() { return [randomStencil()]; },
+ teardown : function() { GL.clearStencil(0); }
+ },
+ colorMask : {
+ generate : function() {
+ return [randomBool(), randomBool(), randomBool(), randomBool()];
+ },
+ teardown : function() { GL.colorMask(true, true, true, true); }
+ },
+ compileShader : {}, // FIXME
+ copyTexImage2D : {}, // FIXME
+ copyTexSubImage2D : {}, // FIXME
+ createBuffer : {
+ generate : function() { return []; },
+ returnValueCleanup : function(o) { GL.deleteBuffer(o); }
+ },
+ createFramebuffer : {
+ generate : function() { return []; },
+ returnValueCleanup : function(o) { GL.deleteFramebuffer(o); }
+ },
+ createProgram : {
+ generate : function() { return []; },
+ returnValueCleanup : function(o) { GL.deleteProgram(o); }
+ },
+ createRenderbuffer : {
+ generate : function() { return []; },
+ returnValueCleanup : function(o) { GL.deleteRenderbuffer(o); }
+ },
+ createShader : {
+ generate : function() { return [shaderType.random()]; },
+ checkArgValidity : function(t) { return shaderType.has(t); },
+ returnValueCleanup : function(o) { GL.deleteShader(o); }
+ },
+ createTexture : {
+ generate : function() { return []; },
+ returnValueCleanup : function(o) { GL.deleteTexture(o); }
+ },
+ cullFace : {
+ generate : function() { return [cullFace.random()]; },
+ checkArgValidity : function(f) { return cullFace.has(f); },
+ teardown : function() { GL.cullFace(GL.BACK); }
+ }
+
+};
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-D_G.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-D_G.js
new file mode 100644
index 000000000..7d218519d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-D_G.js
@@ -0,0 +1,252 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+// - setup -- set up state for testing the GL function, returns values
+// that need cleanup in teardown. Run once before entering a
+// test loop.
+// - teardown -- do cleanup on setup's return values after testing is complete
+// - generate -- generate a valid set of random arguments for the GL function
+// - returnValueCleanup -- do cleanup on value returned by the tested GL function
+// - cleanup -- do cleanup on generated arguments from generate
+// - checkArgValidity -- check if passed args are valid. Has a call signature
+// that matches generate's return value. Returns true
+// if args are valid, false if not.
+//
+// Example test loop that demonstrates how the function args and return
+// values flow together:
+//
+// var setupArgs = argGen.setup();
+// for (var i=0; i<numberOfTests; i++) {
+// var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+// var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+// var rv = call the GL function with generatedArgs;
+// argGen.returnValueCleanup(rv);
+// argGen.cleanup.apply(argGen, generatedArgs);
+// }
+// argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// D
+
+ deleteBuffer : {
+ generate : function() { return [GL.createBuffer()]; },
+ checkArgValidity : function(o) {
+ GL.bindBuffer(GL.ARRAY_BUFFER, o);
+ return GL.isBuffer(o);
+ },
+ cleanup : function(o) {
+ GL.bindBuffer(GL.ARRAY_BUFFER, null);
+ try { GL.deleteBuffer(o); } catch(e) {}
+ }
+ },
+ deleteFramebuffer : {
+ generate : function() { return [GL.createFramebuffer()]; },
+ checkArgValidity : function(o) {
+ GL.bindFramebuffer(GL.FRAMEBUFFER, o);
+ return GL.isFramebuffer(o);
+ },
+ cleanup : function(o) {
+ GL.bindFramebuffer(GL.FRAMEBUFFER, null);
+ try { GL.deleteFramebuffer(o); } catch(e) {}
+ }
+ },
+ deleteProgram : {
+ generate : function() { return [GL.createProgram()]; },
+ checkArgValidity : function(o) { return GL.isProgram(o); },
+ cleanup : function(o) { try { GL.deleteProgram(o); } catch(e) {} }
+ },
+ deleteRenderbuffer : {
+ generate : function() { return [GL.createRenderbuffer()]; },
+ checkArgValidity : function(o) {
+ GL.bindRenderbuffer(GL.RENDERBUFFER, o);
+ return GL.isRenderbuffer(o);
+ },
+ cleanup : function(o) {
+ GL.bindRenderbuffer(GL.RENDERBUFFER, null);
+ try { GL.deleteRenderbuffer(o); } catch(e) {}
+ }
+ },
+ deleteShader : {
+ generate : function() { return [GL.createShader(shaderType.random())]; },
+ checkArgValidity : function(o) { return GL.isShader(o); },
+ cleanup : function(o) { try { GL.deleteShader(o); } catch(e) {} }
+ },
+ deleteTexture : {
+ generate : function() { return [GL.createTexture()]; },
+ checkArgValidity : function(o) {
+ GL.bindTexture(GL.TEXTURE_2D, o);
+ return GL.isTexture(o);
+ },
+ cleanup : function(o) {
+ GL.bindTexture(GL.TEXTURE_2D, null);
+ try { GL.deleteTexture(o); } catch(e) {}
+ }
+ },
+ depthFunc : {
+ generate : function() { return [depthFuncFunc.random()]; },
+ checkArgValidity : function(f) { return depthFuncFunc.has(f); },
+ teardown : function() { GL.depthFunc(GL.LESS); }
+ },
+ depthMask : {
+ generate : function() { return [randomBool()]; },
+ teardown : function() { GL.depthFunc(GL.TRUE); }
+ },
+ depthRange : {
+ generate : function() { return [Math.random(), Math.random()]; },
+ teardown : function() { GL.depthRange(0, 1); }
+ },
+ detachShader : {
+ generate : function() {
+ var p = GL.createProgram();
+ var sh = GL.createShader(shaderType.random());
+ GL.attachShader(p, sh);
+ return [p, sh];
+ },
+ checkArgValidity : function(p, sh) {
+ return GL.isProgram(p) && GL.isShader(sh) && GL.getAttachedShaders(p).has(sh);
+ },
+ cleanup : function(p, sh) {
+ try {GL.deleteProgram(p);} catch(e) {}
+ try {GL.deleteShader(sh);} catch(e) {}
+ }
+ },
+ disable : {
+ generate : function() { return [enableCap.random()]; },
+ checkArgValidity : function(c) { return enableCap.has(c); },
+ cleanup : function(c) { if (c == GL.DITHER) GL.enable(c); }
+ },
+ disableVertexAttribArray : {
+ generate : function() { return [randomVertexAttribute()]; },
+ checkArgValidity : function(v) { return isVertexAttribute(v); }
+ },
+ drawArrays : {}, // FIXME
+ drawElements : {}, // FIXME
+
+// E
+
+ enable : {
+ generate : function() { return [enableCap.random()]; },
+ checkArgValidity : function(c) { return enableCap.has(c); },
+ cleanup : function(c) { if (c != GL.DITHER) GL.disable(c); }
+ },
+ enableVertexAttribArray : {
+ generate : function() { return [randomVertexAttribute()]; },
+ checkArgValidity : function(v) { return isVertexAttribute(castToInt(v)); },
+ cleanup : function(v) { GL.disableVertexAttribArray(v); }
+ },
+
+// F
+
+ finish : {
+ generate : function() { return []; }
+ },
+ flush : {
+ generate : function() { return []; }
+ },
+ framebufferRenderbuffer : {}, // FIXME
+ framebufferTexture2D : {}, // FIXME
+ frontFace : {
+ generate : function() { return [frontFaceMode.random()]; },
+ checkArgValidity : function(c) { return frontFaceMode.has(c); },
+ cleanup : function(c) { GL.frontFace(GL.CCW); }
+ },
+
+// G-1
+
+ generateMipmap : {
+ setup : function() {
+ var tex = GL.createTexture();
+ var tex2 = GL.createTexture();
+ GL.bindTexture(GL.TEXTURE_2D, tex);
+ GL.bindTexture(GL.TEXTURE_CUBE_MAP, tex2);
+ var pix = new Uint8Array(16*16*4);
+ GL.texImage2D(GL.TEXTURE_2D, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+ GL.texImage2D(GL.TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+ GL.texImage2D(GL.TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+ GL.texImage2D(GL.TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+ GL.texImage2D(GL.TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+ GL.texImage2D(GL.TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+ GL.texImage2D(GL.TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+ },
+ generate : function() { return [bindTextureTarget.random()]; },
+ checkArgValidity : function(t) { return bindTextureTarget.has(t); },
+ teardown : function(tex, tex2) {
+ GL.bindTexture(GL.TEXTURE_2D, null);
+ GL.bindTexture(GL.TEXTURE_CUBE_MAP, null);
+ GL.deleteTexture(tex);
+ GL.deleteTexture(tex2);
+ }
+ },
+ getActiveAttrib : {
+ /* FIXME the queried attrib needs to be an active one
+ generate : function() {
+ var program = GL.createProgram();
+ return [program, randomVertexAttribute()];
+ },
+ checkArgValidity : function(program, index) {
+ return GL.isProgram(program) && isVertexAttribute(index);
+ },
+ cleanup : function(program, index) {
+ GL.deleteProgram(program);
+ }
+ */
+ },
+ getActiveUniform : {}, // FIXME
+ getAttachedShaders : {
+ setup : function() {
+ var program = GL.createProgram();
+ var s1 = GL.createShader(GL.VERTEX_SHADER);
+ var s2 = GL.createShader(GL.FRAGMENT_SHADER);
+ GL.attachShader(program, s1);
+ GL.attachShader(program, s2);
+ return [program, s1, s2];
+ },
+ generate : function(program, s1, s2) {
+ return [program]
+ },
+ checkArgValidity : function(program) {
+ return GL.isProgram(program);
+ },
+ teardown : function(program, s1, s2) {
+ GL.deleteProgram(program);
+ GL.deleteShader(s1);
+ GL.deleteShader(s2);
+ }
+ }
+
+};
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-G_I.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-G_I.js
new file mode 100644
index 000000000..7af58b0bf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-G_I.js
@@ -0,0 +1,141 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+// - setup -- set up state for testing the GL function, returns values
+// that need cleanup in teardown. Run once before entering a
+// test loop.
+// - teardown -- do cleanup on setup's return values after testing is complete
+// - generate -- generate a valid set of random arguments for the GL function
+// - returnValueCleanup -- do cleanup on value returned by the tested GL function
+// - cleanup -- do cleanup on generated arguments from generate
+// - checkArgValidity -- check if passed args are valid. Has a call signature
+// that matches generate's return value. Returns true
+// if args are valid, false if not.
+//
+// Example test loop that demonstrates how the function args and return
+// values flow together:
+//
+// var setupArgs = argGen.setup();
+// for (var i=0; i<numberOfTests; i++) {
+// var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+// var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+// var rv = call the GL function with generatedArgs;
+// argGen.returnValueCleanup(rv);
+// argGen.cleanup.apply(argGen, generatedArgs);
+// }
+// argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// G-2
+
+ getAttribLocation : {
+ generate : function() {
+ var program = GL.createProgram();
+ var name = randomName();
+ GL.bindAttribLocation(program, randomVertexAttribute(), name);
+ return [program, name];
+ },
+ checkArgValidity : function(program, name) {
+ return GL.isProgram(program) && isValidName(name);
+ },
+ cleanup : function(program, name) {
+ try { GL.deleteProgram(program); } catch(e) {}
+ }
+ },/*
+ getParameter : {
+ generate : function() { return [getParameterPname.random()]; },
+ checkArgValidity : function(p) { return getParameterPname.has(p); }
+ },
+ getBufferParameter : {}, // FIXME
+ getError : {
+ generate : function() { return []; }
+ },
+ getFramebufferAttachmentParameter : {}, // FIXME
+ getProgramParameter : {}, // FIXME
+ getProgramInfoLog : {}, // FIXME
+ getRenderbufferParameter : {}, // FIXME
+ getShaderParameter : {}, // FIXME
+ getShaderInfoLog : {}, // FIXME
+ getShaderSource : {}, // FIXME
+ getTexParameter : {}, // FIXME
+ getUniform : {}, // FIXME
+ getUniformLocation : {}, // FIXME
+ getVertexAttrib : {}, // FIXME
+ getVertexAttribOffset : {}, // FIXME
+
+// H
+
+ hint : {
+ generate : function() { return [GL.GENERATE_MIPMAP_HINT, mipmapHint.random()]; },
+ checkValidArgs : function(h, m) {
+ return h == GL.GENERATE_MIPMAP_HINT && mipmapHint.has(m);
+ },
+ teardown : function(){ GL.hint(GL.GENERATE_MIPMAP_HINT, GL.DONT_CARE); }
+ },
+
+// I
+
+ isBuffer : {
+ generate : function() { return [GL.createBuffer()]; },
+ cleanup : function(o) { try { GL.deleteBuffer(o); } catch(e) {} }
+ },
+ isEnabled : {
+ generate : function() { return [enableCap.random()]; },
+ checkArgValidity : function(c) { return enableCap.has(c); }
+ },
+ isFramebuffer : {
+ generate : function() { return [GL.createFramebuffer()]; },
+ cleanup : function(o) { try { GL.deleteFramebuffer(o); } catch(e) {} }
+ },
+ isProgram : {
+ generate : function() { return [GL.createProgram()]; },
+ cleanup : function(o) { try { GL.deleteProgram(o); } catch(e) {} }
+ },
+ isRenderbuffer : {
+ generate : function() { return [GL.createRenderbuffer()]; },
+ cleanup : function(o) { try { GL.deleteRenderbuffer(o); } catch(e) {} }
+ },
+ isShader : {
+ generate : function() { return [GL.createShader(shaderType.random())]; },
+ cleanup : function(o) { try { GL.deleteShader(o); } catch(e) {} }
+ },
+ isTexture : {
+ generate : function() { return [GL.createTexture()]; },
+ cleanup : function(o) { try { GL.deleteTexture(o); } catch(e) {} }
+ }*/
+
+};
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-L_S.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-L_S.js
new file mode 100644
index 000000000..db7f38d61
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-L_S.js
@@ -0,0 +1,139 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+// - setup -- set up state for testing the GL function, returns values
+// that need cleanup in teardown. Run once before entering a
+// test loop.
+// - teardown -- do cleanup on setup's return values after testing is complete
+// - generate -- generate a valid set of random arguments for the GL function
+// - returnValueCleanup -- do cleanup on value returned by the tested GL function
+// - cleanup -- do cleanup on generated arguments from generate
+// - checkArgValidity -- check if passed args are valid. Has a call signature
+// that matches generate's return value. Returns true
+// if args are valid, false if not.
+//
+// Example test loop that demonstrates how the function args and return
+// values flow together:
+//
+// var setupArgs = argGen.setup();
+// for (var i=0; i<numberOfTests; i++) {
+// var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+// var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+// var rv = call the GL function with generatedArgs;
+// argGen.returnValueCleanup(rv);
+// argGen.cleanup.apply(argGen, generatedArgs);
+// }
+// argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// L
+
+ lineWidth : {
+ generate : function() { return [randomLineWidth()]; },
+ teardown : function() { GL.lineWidth(1); }
+ },
+ linkProgram : {}, // FIXME
+
+// P
+ pixelStorei : {
+ generate : function() {
+ return [pixelStoreiPname.random(), pixelStoreiParam.random()];
+ },
+ checkArgValidity : function(pname, param) {
+ return pixelStoreiPname.has(pname) && pixelStoreiParam.has(param);
+ },
+ teardown : function() {
+ GL.pixelStorei(GL.PACK_ALIGNMENT, 4);
+ GL.pixelStorei(GL.UNPACK_ALIGNMENT, 4);
+ }
+ },
+ polygonOffset : {
+ generate : function() { return [randomFloat(), randomFloat()]; },
+ teardown : function() { GL.polygonOffset(0,0); }
+ },
+
+// R
+
+ readPixels : {}, // FIXME
+ renderbufferStorage : {}, // FIXME
+
+// S-1
+
+ sampleCoverage : {
+ generate : function() { return [randomFloatFromRange(0,1), randomBool()] },
+ teardown : function() { GL.sampleCoverage(1, false); }
+ },
+ scissor : {
+ generate : function() {
+ return [randomInt(3000)-1500, randomInt(3000)-1500, randomIntFromRange(0,3000), randomIntFromRange(0,3000)];
+ },
+ checkArgValidity : function(x,y,w,h) {
+ return castToInt(w) >= 0 && castToInt(h) >= 0;
+ },
+ teardown : function() {
+ GL.scissor(0,0,GL.canvas.width, GL.canvas.height);
+ }
+ },
+ shaderSource : {}, // FIXME
+ stencilFunc : {
+ generate : function(){
+ return [stencilFuncFunc.random(), randomInt(MaxStencilValue), randomInt(0xffffffff)];
+ },
+ checkArgValidity : function(func, ref, mask) {
+ return stencilFuncFunc.has(func) && castToInt(ref) >= 0 && castToInt(ref) < MaxStencilValue;
+ },
+ teardown : function() {
+ GL.stencilFunc(GL.ALWAYS, 0, 0xffffffff);
+ }
+ },
+ stencilFuncSeparate : {
+ generate : function(){
+ return [cullFace.random(), stencilFuncFunc.random(), randomInt(MaxStencilValue), randomInt(0xffffffff)];
+ },
+ checkArgValidity : function(face, func, ref, mask) {
+ return cullFace.has(face) && stencilFuncFunc.has(func) && castToInt(ref) >= 0 && castToInt(ref) < MaxStencilValue;
+ },
+ teardown : function() {
+ GL.stencilFunc(GL.ALWAYS, 0, 0xffffffff);
+ }
+ },
+ stencilMask : {
+ generate : function() { return [randomInt(0xffffffff)]; },
+ teardown : function() { GL.stencilMask(0xffffffff); }
+ }
+
+};
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-S_V.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-S_V.js
new file mode 100644
index 000000000..726f6ef05
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-S_V.js
@@ -0,0 +1,229 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+// - setup -- set up state for testing the GL function, returns values
+// that need cleanup in teardown. Run once before entering a
+// test loop.
+// - teardown -- do cleanup on setup's return values after testing is complete
+// - generate -- generate a valid set of random arguments for the GL function
+// - returnValueCleanup -- do cleanup on value returned by the tested GL function
+// - cleanup -- do cleanup on generated arguments from generate
+// - checkArgValidity -- check if passed args are valid. Has a call signature
+// that matches generate's return value. Returns true
+// if args are valid, false if not.
+//
+// Example test loop that demonstrates how the function args and return
+// values flow together:
+//
+// var setupArgs = argGen.setup();
+// for (var i=0; i<numberOfTests; i++) {
+// var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+// var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+// var rv = call the GL function with generatedArgs;
+// argGen.returnValueCleanup(rv);
+// argGen.cleanup.apply(argGen, generatedArgs);
+// }
+// argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// S-2
+
+ stencilMaskSeparate : {
+ generate : function() { return [cullFace.random(), randomInt(0xffffffff)]; },
+ checkArgValidity : function(face, mask) {
+ return cullFace.has(face);
+ },
+ teardown : function() { GL.stencilMask(0xffffffff); }
+ },
+ stencilOp : {
+ generate : function() {
+ return [stencilOp.random(), stencilOp.random(), stencilOp.random()];
+ },
+ checkArgValidity : function(sfail, dpfail, dppass) {
+ return stencilOp.has(sfail) && stencilOp.has(dpfail) && stencilOp.has(dppass);
+ },
+ teardown : function() { GL.stencilOp(GL.KEEP, GL.KEEP, GL.KEEP); }
+ },
+ stencilOpSeparate : {
+ generate : function() {
+ return [cullFace.random(), stencilOp.random(), stencilOp.random(), stencilOp.random()];
+ },
+ checkArgValidity : function(face, sfail, dpfail, dppass) {
+ return cullFace.has(face) && stencilOp.has(sfail) &&
+ stencilOp.has(dpfail) && stencilOp.has(dppass);
+ },
+ teardown : function() { GL.stencilOp(GL.KEEP, GL.KEEP, GL.KEEP); }
+ },
+
+// T
+ texImage2D : {
+ noAlreadyTriedCheck : true, // Object.toSource is very slow here
+ setup : function() {
+ var tex = GL.createTexture();
+ var tex2 = GL.createTexture();
+ GL.bindTexture(GL.TEXTURE_2D, tex);
+ GL.bindTexture(GL.TEXTURE_CUBE_MAP, tex2);
+ return [tex, tex2];
+ },
+ generate : function() {
+ var format = texImageFormat.random();
+ if (Math.random() < 0.5) {
+ var img = randomImage(16,16);
+ var a = [ texImageTarget.random(), 0, format, format, GL.UNSIGNED_BYTE, img ];
+ return a;
+ } else {
+ var pix = null;
+ if (Math.random > 0.5) {
+ pix = new Uint8Array(16*16*4);
+ }
+ return [
+ texImageTarget.random(), 0,
+ format, 16, 16, 0,
+ format, GL.UNSIGNED_BYTE, pix
+ ];
+ }
+ },
+ checkArgValidity : function(target, level, internalformat, width, height, border, format, type, data) {
+ // or : function(target, level, internalformat, format, type, image)
+ if (!texImageTarget.has(target) || castToInt(level) < 0)
+ return false;
+ if (arguments.length <= 6) {
+ var xformat = width;
+ var xtype = height;
+ var ximage = border;
+ if ((ximage instanceof HTMLImageElement ||
+ ximage instanceof HTMLVideoElement ||
+ ximage instanceof HTMLCanvasElement ||
+ ximage instanceof ImageData) &&
+ texImageInternalFormat.has(internalformat) &&
+ texImageFormat.has(xformat) &&
+ texImageType.has(xtype) &&
+ internalformat == xformat)
+ return true;
+ return false;
+ }
+ var w = castToInt(width), h = castToInt(height), b = castToInt(border);
+ return texImageInternalFormat.has(internalformat) && w >= 0 && h >= 0 &&
+ b == 0 && (data == null || data.byteLength == w*h*4) &&
+ texImageFormat.has(format) && texImageType.has(type)
+ && internalformat == format;
+ },
+ teardown : function(tex, tex2) {
+ GL.bindTexture(GL.TEXTURE_2D, null);
+ GL.bindTexture(GL.TEXTURE_CUBE_MAP, null);
+ GL.deleteTexture(tex);
+ GL.deleteTexture(tex2);
+ }
+ },
+ texParameterf : {
+ generate : function() {
+ var pname = texParameterPname.random();
+ var param = texParameterParam[pname].random();
+ return [bindTextureTarget.random(), pname, param];
+ },
+ checkArgValidity : function(target, pname, param) {
+ if (!bindTextureTarget.has(target))
+ return false;
+ if (!texParameterPname.has(pname))
+ return false;
+ return texParameterParam[pname].has(param);
+ }
+ },
+ texParameteri : {
+ generate : function() {
+ var pname = texParameterPname.random();
+ var param = texParameterParam[pname].random();
+ return [bindTextureTarget.random(), pname, param];
+ },
+ checkArgValidity : function(target, pname, param) {
+ if (!bindTextureTarget.has(target))
+ return false;
+ if (!texParameterPname.has(pname))
+ return false;
+ return texParameterParam[pname].has(param);
+ }
+ },
+ texSubImage2D : {}, // FIXME
+
+// U
+
+ uniform1f : {}, // FIXME
+ uniform1fv : {}, // FIXME
+ uniform1i : {}, // FIXME
+ uniform1iv : {}, // FIXME
+ uniform2f : {}, // FIXME
+ uniform2fv : {}, // FIXME
+ uniform2i : {}, // FIXME
+ uniform2iv : {}, // FIXME
+ uniform3f : {}, // FIXME
+ uniform3fv : {}, // FIXME
+ uniform3i : {}, // FIXME
+ uniform3iv : {}, // FIXME
+ uniform4f : {}, // FIXME
+ uniform4fv : {}, // FIXME
+ uniform4i : {}, // FIXME
+ uniform4iv : {}, // FIXME
+ uniformMatrix2fv : {}, // FIXME
+ uniformMatrix3fv : {}, // FIXME
+ uniformMatrix4fv : {}, // FIXME
+ useProgram : {}, // FIXME
+
+// V
+
+ validateProgram : {}, // FIXME
+ vertexAttrib1f : {}, // FIXME
+ vertexAttrib1fv : {}, // FIXME
+ vertexAttrib2f : {}, // FIXME
+ vertexAttrib2fv : {}, // FIXME
+ vertexAttrib3f : {}, // FIXME
+ vertexAttrib3fv : {}, // FIXME
+ vertexAttrib4f : {}, // FIXME
+ vertexAttrib4fv : {}, // FIXME
+ vertexAttribPointer : {}, // FIXME
+ viewport : {
+ generate : function() {
+ return [randomInt(3000)-1500, randomInt(3000)-1500, randomIntFromRange(0,3000), randomIntFromRange(0,3000)];
+ },
+ checkArgValidity : function(x,y,w,h) {
+ return castToInt(w) >= 0 && castToInt(h) >= 0;
+ },
+ teardown : function() {
+ GL.viewport(0,0,GL.canvas.width, GL.canvas.height);
+ }
+ }
+
+};
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/constants.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/constants.html
new file mode 100644
index 000000000..3fc1e3c0d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/constants.html
@@ -0,0 +1,374 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+/*
+ The following tests are generated from
+ http://www.khronos.org/registry/gles/api/2.0/gl2.h
+ and api_modifications.txt
+*/
+var constants = {
+DEPTH_BUFFER_BIT : 0x00000100,
+STENCIL_BUFFER_BIT : 0x00000400,
+COLOR_BUFFER_BIT : 0x00004000,
+POINTS : 0x0000,
+LINES : 0x0001,
+LINE_LOOP : 0x0002,
+LINE_STRIP : 0x0003,
+TRIANGLES : 0x0004,
+TRIANGLE_STRIP : 0x0005,
+TRIANGLE_FAN : 0x0006,
+ZERO : 0,
+ONE : 1,
+SRC_COLOR : 0x0300,
+ONE_MINUS_SRC_COLOR : 0x0301,
+SRC_ALPHA : 0x0302,
+ONE_MINUS_SRC_ALPHA : 0x0303,
+DST_ALPHA : 0x0304,
+ONE_MINUS_DST_ALPHA : 0x0305,
+DST_COLOR : 0x0306,
+ONE_MINUS_DST_COLOR : 0x0307,
+SRC_ALPHA_SATURATE : 0x0308,
+FUNC_ADD : 0x8006,
+BLEND_EQUATION : 0x8009,
+BLEND_EQUATION_RGB : 0x8009,
+BLEND_EQUATION_ALPHA : 0x883D,
+FUNC_SUBTRACT : 0x800A,
+FUNC_REVERSE_SUBTRACT : 0x800B,
+BLEND_DST_RGB : 0x80C8,
+BLEND_SRC_RGB : 0x80C9,
+BLEND_DST_ALPHA : 0x80CA,
+BLEND_SRC_ALPHA : 0x80CB,
+CONSTANT_COLOR : 0x8001,
+ONE_MINUS_CONSTANT_COLOR : 0x8002,
+CONSTANT_ALPHA : 0x8003,
+ONE_MINUS_CONSTANT_ALPHA : 0x8004,
+BLEND_COLOR : 0x8005,
+ARRAY_BUFFER : 0x8892,
+ELEMENT_ARRAY_BUFFER : 0x8893,
+ARRAY_BUFFER_BINDING : 0x8894,
+ELEMENT_ARRAY_BUFFER_BINDING : 0x8895,
+STREAM_DRAW : 0x88E0,
+STATIC_DRAW : 0x88E4,
+DYNAMIC_DRAW : 0x88E8,
+BUFFER_SIZE : 0x8764,
+BUFFER_USAGE : 0x8765,
+CURRENT_VERTEX_ATTRIB : 0x8626,
+FRONT : 0x0404,
+BACK : 0x0405,
+FRONT_AND_BACK : 0x0408,
+TEXTURE_2D : 0x0DE1,
+CULL_FACE : 0x0B44,
+BLEND : 0x0BE2,
+DITHER : 0x0BD0,
+STENCIL_TEST : 0x0B90,
+DEPTH_TEST : 0x0B71,
+SCISSOR_TEST : 0x0C11,
+POLYGON_OFFSET_FILL : 0x8037,
+SAMPLE_ALPHA_TO_COVERAGE : 0x809E,
+SAMPLE_COVERAGE : 0x80A0,
+NO_ERROR : 0,
+INVALID_ENUM : 0x0500,
+INVALID_VALUE : 0x0501,
+INVALID_OPERATION : 0x0502,
+OUT_OF_MEMORY : 0x0505,
+CW : 0x0900,
+CCW : 0x0901,
+LINE_WIDTH : 0x0B21,
+ALIASED_POINT_SIZE_RANGE : 0x846D,
+ALIASED_LINE_WIDTH_RANGE : 0x846E,
+CULL_FACE_MODE : 0x0B45,
+FRONT_FACE : 0x0B46,
+DEPTH_RANGE : 0x0B70,
+DEPTH_WRITEMASK : 0x0B72,
+DEPTH_CLEAR_VALUE : 0x0B73,
+DEPTH_FUNC : 0x0B74,
+STENCIL_CLEAR_VALUE : 0x0B91,
+STENCIL_FUNC : 0x0B92,
+STENCIL_FAIL : 0x0B94,
+STENCIL_PASS_DEPTH_FAIL : 0x0B95,
+STENCIL_PASS_DEPTH_PASS : 0x0B96,
+STENCIL_REF : 0x0B97,
+STENCIL_VALUE_MASK : 0x0B93,
+STENCIL_WRITEMASK : 0x0B98,
+STENCIL_BACK_FUNC : 0x8800,
+STENCIL_BACK_FAIL : 0x8801,
+STENCIL_BACK_PASS_DEPTH_FAIL : 0x8802,
+STENCIL_BACK_PASS_DEPTH_PASS : 0x8803,
+STENCIL_BACK_REF : 0x8CA3,
+STENCIL_BACK_VALUE_MASK : 0x8CA4,
+STENCIL_BACK_WRITEMASK : 0x8CA5,
+VIEWPORT : 0x0BA2,
+SCISSOR_BOX : 0x0C10,
+COLOR_CLEAR_VALUE : 0x0C22,
+COLOR_WRITEMASK : 0x0C23,
+UNPACK_ALIGNMENT : 0x0CF5,
+PACK_ALIGNMENT : 0x0D05,
+MAX_TEXTURE_SIZE : 0x0D33,
+MAX_VIEWPORT_DIMS : 0x0D3A,
+SUBPIXEL_BITS : 0x0D50,
+RED_BITS : 0x0D52,
+GREEN_BITS : 0x0D53,
+BLUE_BITS : 0x0D54,
+ALPHA_BITS : 0x0D55,
+DEPTH_BITS : 0x0D56,
+STENCIL_BITS : 0x0D57,
+POLYGON_OFFSET_UNITS : 0x2A00,
+POLYGON_OFFSET_FACTOR : 0x8038,
+TEXTURE_BINDING_2D : 0x8069,
+SAMPLE_BUFFERS : 0x80A8,
+SAMPLES : 0x80A9,
+SAMPLE_COVERAGE_VALUE : 0x80AA,
+SAMPLE_COVERAGE_INVERT : 0x80AB,
+COMPRESSED_TEXTURE_FORMATS : 0x86A3,
+DONT_CARE : 0x1100,
+FASTEST : 0x1101,
+NICEST : 0x1102,
+GENERATE_MIPMAP_HINT : 0x8192,
+BYTE : 0x1400,
+UNSIGNED_BYTE : 0x1401,
+SHORT : 0x1402,
+UNSIGNED_SHORT : 0x1403,
+INT : 0x1404,
+UNSIGNED_INT : 0x1405,
+FLOAT : 0x1406,
+//FIXED : 0x140C,
+DEPTH_COMPONENT : 0x1902,
+ALPHA : 0x1906,
+RGB : 0x1907,
+RGBA : 0x1908,
+LUMINANCE : 0x1909,
+LUMINANCE_ALPHA : 0x190A,
+UNSIGNED_SHORT_4_4_4_4 : 0x8033,
+UNSIGNED_SHORT_5_5_5_1 : 0x8034,
+UNSIGNED_SHORT_5_6_5 : 0x8363,
+FRAGMENT_SHADER : 0x8B30,
+VERTEX_SHADER : 0x8B31,
+MAX_VERTEX_ATTRIBS : 0x8869,
+MAX_VERTEX_UNIFORM_VECTORS : 0x8DFB,
+MAX_VARYING_VECTORS : 0x8DFC,
+MAX_COMBINED_TEXTURE_IMAGE_UNITS : 0x8B4D,
+MAX_VERTEX_TEXTURE_IMAGE_UNITS : 0x8B4C,
+MAX_TEXTURE_IMAGE_UNITS : 0x8872,
+MAX_FRAGMENT_UNIFORM_VECTORS : 0x8DFD,
+SHADER_TYPE : 0x8B4F,
+DELETE_STATUS : 0x8B80,
+LINK_STATUS : 0x8B82,
+VALIDATE_STATUS : 0x8B83,
+ATTACHED_SHADERS : 0x8B85,
+ACTIVE_UNIFORMS : 0x8B86,
+ACTIVE_ATTRIBUTES : 0x8B89,
+SHADING_LANGUAGE_VERSION : 0x8B8C,
+CURRENT_PROGRAM : 0x8B8D,
+NEVER : 0x0200,
+LESS : 0x0201,
+EQUAL : 0x0202,
+LEQUAL : 0x0203,
+GREATER : 0x0204,
+NOTEQUAL : 0x0205,
+GEQUAL : 0x0206,
+ALWAYS : 0x0207,
+KEEP : 0x1E00,
+REPLACE : 0x1E01,
+INCR : 0x1E02,
+DECR : 0x1E03,
+INVERT : 0x150A,
+INCR_WRAP : 0x8507,
+DECR_WRAP : 0x8508,
+VENDOR : 0x1F00,
+RENDERER : 0x1F01,
+VERSION : 0x1F02,
+//EXTENSIONS : 0x1F03,
+NEAREST : 0x2600,
+LINEAR : 0x2601,
+NEAREST_MIPMAP_NEAREST : 0x2700,
+LINEAR_MIPMAP_NEAREST : 0x2701,
+NEAREST_MIPMAP_LINEAR : 0x2702,
+LINEAR_MIPMAP_LINEAR : 0x2703,
+TEXTURE_MAG_FILTER : 0x2800,
+TEXTURE_MIN_FILTER : 0x2801,
+TEXTURE_WRAP_S : 0x2802,
+TEXTURE_WRAP_T : 0x2803,
+TEXTURE : 0x1702,
+TEXTURE_CUBE_MAP : 0x8513,
+TEXTURE_BINDING_CUBE_MAP : 0x8514,
+TEXTURE_CUBE_MAP_POSITIVE_X : 0x8515,
+TEXTURE_CUBE_MAP_NEGATIVE_X : 0x8516,
+TEXTURE_CUBE_MAP_POSITIVE_Y : 0x8517,
+TEXTURE_CUBE_MAP_NEGATIVE_Y : 0x8518,
+TEXTURE_CUBE_MAP_POSITIVE_Z : 0x8519,
+TEXTURE_CUBE_MAP_NEGATIVE_Z : 0x851A,
+MAX_CUBE_MAP_TEXTURE_SIZE : 0x851C,
+TEXTURE0 : 0x84C0,
+TEXTURE1 : 0x84C1,
+TEXTURE2 : 0x84C2,
+TEXTURE3 : 0x84C3,
+TEXTURE4 : 0x84C4,
+TEXTURE5 : 0x84C5,
+TEXTURE6 : 0x84C6,
+TEXTURE7 : 0x84C7,
+TEXTURE8 : 0x84C8,
+TEXTURE9 : 0x84C9,
+TEXTURE10 : 0x84CA,
+TEXTURE11 : 0x84CB,
+TEXTURE12 : 0x84CC,
+TEXTURE13 : 0x84CD,
+TEXTURE14 : 0x84CE,
+TEXTURE15 : 0x84CF,
+TEXTURE16 : 0x84D0,
+TEXTURE17 : 0x84D1,
+TEXTURE18 : 0x84D2,
+TEXTURE19 : 0x84D3,
+TEXTURE20 : 0x84D4,
+TEXTURE21 : 0x84D5,
+TEXTURE22 : 0x84D6,
+TEXTURE23 : 0x84D7,
+TEXTURE24 : 0x84D8,
+TEXTURE25 : 0x84D9,
+TEXTURE26 : 0x84DA,
+TEXTURE27 : 0x84DB,
+TEXTURE28 : 0x84DC,
+TEXTURE29 : 0x84DD,
+TEXTURE30 : 0x84DE,
+TEXTURE31 : 0x84DF,
+ACTIVE_TEXTURE : 0x84E0,
+REPEAT : 0x2901,
+CLAMP_TO_EDGE : 0x812F,
+MIRRORED_REPEAT : 0x8370,
+FLOAT_VEC2 : 0x8B50,
+FLOAT_VEC3 : 0x8B51,
+FLOAT_VEC4 : 0x8B52,
+INT_VEC2 : 0x8B53,
+INT_VEC3 : 0x8B54,
+INT_VEC4 : 0x8B55,
+BOOL : 0x8B56,
+BOOL_VEC2 : 0x8B57,
+BOOL_VEC3 : 0x8B58,
+BOOL_VEC4 : 0x8B59,
+FLOAT_MAT2 : 0x8B5A,
+FLOAT_MAT3 : 0x8B5B,
+FLOAT_MAT4 : 0x8B5C,
+SAMPLER_2D : 0x8B5E,
+SAMPLER_CUBE : 0x8B60,
+VERTEX_ATTRIB_ARRAY_ENABLED : 0x8622,
+VERTEX_ATTRIB_ARRAY_SIZE : 0x8623,
+VERTEX_ATTRIB_ARRAY_STRIDE : 0x8624,
+VERTEX_ATTRIB_ARRAY_TYPE : 0x8625,
+VERTEX_ATTRIB_ARRAY_NORMALIZED : 0x886A,
+VERTEX_ATTRIB_ARRAY_POINTER : 0x8645,
+VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F,
+//IMPLEMENTATION_COLOR_READ_TYPE : 0x8B9A,
+//IMPLEMENTATION_COLOR_READ_FORMAT : 0x8B9B,
+COMPILE_STATUS : 0x8B81,
+//SHADER_COMPILER : 0x8DFA,
+LOW_FLOAT : 0x8DF0,
+MEDIUM_FLOAT : 0x8DF1,
+HIGH_FLOAT : 0x8DF2,
+LOW_INT : 0x8DF3,
+MEDIUM_INT : 0x8DF4,
+HIGH_INT : 0x8DF5,
+FRAMEBUFFER : 0x8D40,
+RENDERBUFFER : 0x8D41,
+RGBA4 : 0x8056,
+RGB5_A1 : 0x8057,
+RGB565 : 0x8D62,
+DEPTH_COMPONENT16 : 0x81A5,
+STENCIL_INDEX : 0x1901,
+STENCIL_INDEX8 : 0x8D48,
+DEPTH_STENCIL : 0x84F9,
+RENDERBUFFER_WIDTH : 0x8D42,
+RENDERBUFFER_HEIGHT : 0x8D43,
+RENDERBUFFER_INTERNAL_FORMAT : 0x8D44,
+RENDERBUFFER_RED_SIZE : 0x8D50,
+RENDERBUFFER_GREEN_SIZE : 0x8D51,
+RENDERBUFFER_BLUE_SIZE : 0x8D52,
+RENDERBUFFER_ALPHA_SIZE : 0x8D53,
+RENDERBUFFER_DEPTH_SIZE : 0x8D54,
+RENDERBUFFER_STENCIL_SIZE : 0x8D55,
+FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : 0x8CD0,
+FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : 0x8CD1,
+FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL : 0x8CD2,
+FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : 0x8CD3,
+COLOR_ATTACHMENT0 : 0x8CE0,
+DEPTH_ATTACHMENT : 0x8D00,
+STENCIL_ATTACHMENT : 0x8D20,
+DEPTH_STENCIL_ATTACHMENT : 0x821A,
+NONE : 0,
+FRAMEBUFFER_COMPLETE : 0x8CD5,
+FRAMEBUFFER_INCOMPLETE_ATTACHMENT : 0x8CD6,
+FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : 0x8CD7,
+FRAMEBUFFER_INCOMPLETE_DIMENSIONS : 0x8CD9,
+FRAMEBUFFER_UNSUPPORTED : 0x8CDD,
+FRAMEBUFFER_BINDING : 0x8CA6,
+RENDERBUFFER_BINDING : 0x8CA7,
+MAX_RENDERBUFFER_SIZE : 0x84E8,
+INVALID_FRAMEBUFFER_OPERATION : 0x0506,
+//FALSE : 0,
+//TRUE : 1,
+UNPACK_FLIP_Y_WEBGL : 0x9240,
+UNPACK_PREMULTIPLY_ALPHA_WEBGL : 0x9241
+}
+
+Tests.testOES20Constants = function(gl) {
+ for (var i in constants) {
+ assertProperty(gl, i) &&
+ assertEquals(i, gl[i], constants[i]);
+ }
+ var extended = false;
+ for (var i in gl) {
+ if (i.match(/^[A-Z_]+$/) && constants[i] == null) {
+ if (!extended) {
+ extended = true;
+ var h = document.createElement('h3');
+ h.textContent = "Also found the following extra constants";
+ __testLog__.appendChild(h);
+ }
+ log(i);
+ }
+ }
+}
+
+Tests.startUnit = function() {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/getContext.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/getContext.html
new file mode 100644
index 000000000..0807d7225
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/getContext.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+
+<script type="application/x-javascript">
+
+Tests.testGetWebGL = function() {
+ var canvas = document.getElementById('webgl');
+ var gl;
+ assertOk(function(){gl = getGLContext(canvas)});
+ assertEquals("ctx.canvas === canvas", gl.canvas, canvas);
+ assertOk(function(){g2d = canvas.getContext('2d')});
+ assert("Should get a null 2d context after getting webgl context", g2d === null);
+}
+
+Tests.testGet2D = function() {
+ var canvas = document.getElementById('2d');
+ var g2d;
+ var gl;
+ assertOk(function(){g2d = canvas.getContext('2d')});
+ assertOk(function(){gl = getGLContext(canvas)});
+ assert("Should get a null WebGL context after getting 2D context", gl === null);
+}
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+ <canvas id="2d" width="1" height="1"></canvas>
+ <canvas id="webgl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/methods.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/methods.html
new file mode 100644
index 000000000..1461ff742
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/methods.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+/*
+ The following tests are generated from
+ http://www.khronos.org/registry/gles/api/2.0/gl2.h
+ and api_modifications.txt
+*/
+var methods = ['canvas',
+"activeTexture",
+"attachShader",
+"bindAttribLocation",
+"bindBuffer",
+"bindFramebuffer",
+"bindRenderbuffer",
+"bindTexture",
+"blendColor",
+"blendEquation",
+"blendEquationSeparate",
+"blendFunc",
+"blendFuncSeparate",
+"bufferData",
+"bufferSubData",
+"checkFramebufferStatus",
+"clear",
+"clearColor",
+"clearDepth",
+"clearStencil",
+"colorMask",
+"compileShader",
+"copyTexImage2D",
+"copyTexSubImage2D",
+"createProgram",
+"createShader",
+"cullFace",
+"deleteBuffer",
+"deleteFramebuffer",
+"deleteProgram",
+"deleteRenderbuffer",
+"deleteShader",
+"deleteTexture",
+"depthFunc",
+"depthMask",
+"depthRange",
+"detachShader",
+"disable",
+"disableVertexAttribArray",
+"drawArrays",
+"drawElements",
+"enable",
+"enableVertexAttribArray",
+"finish",
+"flush",
+"framebufferRenderbuffer",
+"framebufferTexture2D",
+"frontFace",
+"createBuffer",
+"generateMipmap",
+"createFramebuffer",
+"createRenderbuffer",
+"createTexture",
+"getActiveAttrib",
+"getActiveUniform",
+"getAttachedShaders",
+"getAttribLocation",
+"getBufferParameter",
+"getError",
+"getExtension",
+"getSupportedExtensions",
+"getFramebufferAttachmentParameter",
+"getProgramInfoLog",
+"getRenderbufferParameter",
+"getShaderInfoLog",
+"getShaderSource",
+"getUniformLocation",
+"hint",
+"isBuffer",
+"isContextLost",
+"isEnabled",
+"isFramebuffer",
+"isProgram",
+"isRenderbuffer",
+"isShader",
+"isTexture",
+"lineWidth",
+"linkProgram",
+"polygonOffset",
+"readPixels",
+"renderbufferStorage",
+"sampleCoverage",
+"scissor",
+"shaderSource",
+"stencilFunc",
+"stencilFuncSeparate",
+"stencilMask",
+"stencilMaskSeparate",
+"stencilOp",
+"stencilOpSeparate",
+"texImage2D",
+"texParameteri",
+"texSubImage2D",
+"uniform1f",
+"uniform1fv",
+"uniform1i",
+"uniform1iv",
+"uniform2f",
+"uniform2fv",
+"uniform2i",
+"uniform2iv",
+"uniform3f",
+"uniform3fv",
+"uniform3i",
+"uniform3iv",
+"uniform4f",
+"uniform4fv",
+"uniform4i",
+"uniform4iv",
+"uniformMatrix2fv",
+"uniformMatrix3fv",
+"uniformMatrix4fv",
+"useProgram",
+"validateProgram",
+"vertexAttrib1f",
+"vertexAttrib1fv",
+"vertexAttrib2f",
+"vertexAttrib2fv",
+"vertexAttrib3f",
+"vertexAttrib3fv",
+"vertexAttrib4f",
+"vertexAttrib4fv",
+"vertexAttribPointer",
+"viewport",
+"getParameter",
+"getProgramParameter",
+"getShaderParameter",
+"getTexParameter",
+"getUniform",
+"getVertexAttrib"
+]
+
+Tests.testOES20Methods = function(gl) {
+ for (var i=0; i<methods.length; i++) {
+ assertProperty(gl, methods[i]);
+ }
+ var extended = false;
+ for (var i in gl) {
+ if (i.match(/^[a-z_]+$/) && methods.indexOf(i) == -1) {
+ if (!extended) {
+ extended = true;
+ var h = document.createElement('h3');
+ h.textContent = "Also found the following extra properties";
+ __testLog__.appendChild(h);
+ }
+ log(i);
+ }
+ }
+}
+
+Tests.startUnit = function() {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-A.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-A.html
new file mode 100644
index 000000000..b4f3262ab
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-A.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="quickCheckAPI.js"></script>
+<script type="application/x-javascript" src="argGenerators-A.js"></script>
+
+<script type="application/x-javascript">
+
+// Test that all GL functions specified in ArgGenerators work
+// when called with randomly generated valid arguments
+Tests.testValidArgs = function() {
+ var randomTestCount = 100;
+ for (var name in ArgGenerators) {
+ try {
+ if (!GL[name])
+ throw (new Error(name + " is missing from the WebGL context"));
+ var argGen = ArgGenerators[name];
+ var alreadyTriedArgs = {};
+ if (!argGen.generate) continue;
+ // test each GL function with randomTestCount randomly generated valid args
+ argGeneratorTestRunner(argGen, function(args, gen, setupVars) {
+ if (!gen.noAlreadyTriedCheck) {
+ var src = Object.toSource(args);
+ if (alreadyTriedArgs[src])
+ return true;
+
+ alreadyTriedArgs[src] = true;
+ }
+ var ok = false;
+ // if we have an validity checker, assert that the generated args are valid
+ if (gen.checkArgValidity)
+ assert("Valid args: "+name+"("+argsToString(args)+")",
+ gen.checkArgValidity.apply(gen, args));
+ var rv;
+ // assert that GL function works when called with valid args
+ assertOk("This should work: "+name+"("+argsToString(args)+")",
+ function(){rv = GL[name].apply(GL, args); ok = true;});
+ // if we need to cleanup the return value, do it here
+ // e.g. calling gl.deleteBuffer(rv) after testing gl.createBuffer() above
+ if (gen.returnValueCleanup)
+ assertOk("Cleaning up return value after "+name+"("+argsToString(args)+")",
+ function() { gen.returnValueCleanup(rv); });
+ return ok;
+ }, argGen.testCount || randomTestCount);
+ } catch(e) {
+ testFailed(name, e.name, formatError(e));
+ }
+ }
+}
+
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B1.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B1.html
new file mode 100644
index 000000000..3ae3bbfc2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B1.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="quickCheckAPI.js"></script>
+<script type="application/x-javascript" src="argGenerators-B1.js"></script>
+
+<script type="application/x-javascript">
+
+// Test that all GL functions specified in ArgGenerators work
+// when called with randomly generated valid arguments
+Tests.testValidArgs = function() {
+ var randomTestCount = 100;
+ for (var name in ArgGenerators) {
+ try {
+ if (!GL[name])
+ throw (new Error(name + " is missing from the WebGL context"));
+ var argGen = ArgGenerators[name];
+ var alreadyTriedArgs = {};
+ if (!argGen.generate) continue;
+ // test each GL function with randomTestCount randomly generated valid args
+ argGeneratorTestRunner(argGen, function(args, gen, setupVars) {
+ if (!gen.noAlreadyTriedCheck) {
+ var src = Object.toSource(args);
+ if (alreadyTriedArgs[src])
+ return true;
+
+ alreadyTriedArgs[src] = true;
+ }
+ var ok = false;
+ // if we have an validity checker, assert that the generated args are valid
+ if (gen.checkArgValidity)
+ assert("Valid args: "+name+"("+argsToString(args)+")",
+ gen.checkArgValidity.apply(gen, args));
+ var rv;
+ // assert that GL function works when called with valid args
+ assertOk("This should work: "+name+"("+argsToString(args)+")",
+ function(){rv = GL[name].apply(GL, args); ok = true;});
+ // if we need to cleanup the return value, do it here
+ // e.g. calling gl.deleteBuffer(rv) after testing gl.createBuffer() above
+ if (gen.returnValueCleanup)
+ assertOk("Cleaning up return value after "+name+"("+argsToString(args)+")",
+ function() { gen.returnValueCleanup(rv); });
+ return ok;
+ }, argGen.testCount || randomTestCount);
+ } catch(e) {
+ testFailed(name, e.name, formatError(e));
+ }
+ }
+}
+
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B2.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B2.html
new file mode 100644
index 000000000..d80a4427c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B2.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="quickCheckAPI.js"></script>
+<script type="application/x-javascript" src="argGenerators-B2.js"></script>
+
+<script type="application/x-javascript">
+
+// Test that all GL functions specified in ArgGenerators work
+// when called with randomly generated valid arguments
+Tests.testValidArgs = function() {
+ var randomTestCount = 100;
+ for (var name in ArgGenerators) {
+ try {
+ if (!GL[name])
+ throw (new Error(name + " is missing from the WebGL context"));
+ var argGen = ArgGenerators[name];
+ var alreadyTriedArgs = {};
+ if (!argGen.generate) continue;
+ // test each GL function with randomTestCount randomly generated valid args
+ argGeneratorTestRunner(argGen, function(args, gen, setupVars) {
+ if (!gen.noAlreadyTriedCheck) {
+ var src = Object.toSource(args);
+ if (alreadyTriedArgs[src])
+ return true;
+
+ alreadyTriedArgs[src] = true;
+ }
+ var ok = false;
+ // if we have an validity checker, assert that the generated args are valid
+ if (gen.checkArgValidity)
+ assert("Valid args: "+name+"("+argsToString(args)+")",
+ gen.checkArgValidity.apply(gen, args));
+ var rv;
+ // assert that GL function works when called with valid args
+ assertOk("This should work: "+name+"("+argsToString(args)+")",
+ function(){rv = GL[name].apply(GL, args); ok = true;});
+ // if we need to cleanup the return value, do it here
+ // e.g. calling gl.deleteBuffer(rv) after testing gl.createBuffer() above
+ if (gen.returnValueCleanup)
+ assertOk("Cleaning up return value after "+name+"("+argsToString(args)+")",
+ function() { gen.returnValueCleanup(rv); });
+ return ok;
+ }, argGen.testCount || randomTestCount);
+ } catch(e) {
+ testFailed(name, e.name, formatError(e));
+ }
+ }
+}
+
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B3.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B3.html
new file mode 100644
index 000000000..426f385b0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B3.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="quickCheckAPI.js"></script>
+<script type="application/x-javascript" src="argGenerators-B3.js"></script>
+
+<script type="application/x-javascript">
+
+// Test that all GL functions specified in ArgGenerators work
+// when called with randomly generated valid arguments
+Tests.testValidArgs = function() {
+ var randomTestCount = 100;
+ for (var name in ArgGenerators) {
+ try {
+ if (!GL[name])
+ throw (new Error(name + " is missing from the WebGL context"));
+ var argGen = ArgGenerators[name];
+ var alreadyTriedArgs = {};
+ if (!argGen.generate) continue;
+ // test each GL function with randomTestCount randomly generated valid args
+ argGeneratorTestRunner(argGen, function(args, gen, setupVars) {
+ if (!gen.noAlreadyTriedCheck) {
+ var src = Object.toSource(args);
+ if (alreadyTriedArgs[src])
+ return true;
+
+ alreadyTriedArgs[src] = true;
+ }
+ var ok = false;
+ // if we have an validity checker, assert that the generated args are valid
+ if (gen.checkArgValidity)
+ assert("Valid args: "+name+"("+argsToString(args)+")",
+ gen.checkArgValidity.apply(gen, args));
+ var rv;
+ // assert that GL function works when called with valid args
+ assertOk("This should work: "+name+"("+argsToString(args)+")",
+ function(){rv = GL[name].apply(GL, args); ok = true;});
+ // if we need to cleanup the return value, do it here
+ // e.g. calling gl.deleteBuffer(rv) after testing gl.createBuffer() above
+ if (gen.returnValueCleanup)
+ assertOk("Cleaning up return value after "+name+"("+argsToString(args)+")",
+ function() { gen.returnValueCleanup(rv); });
+ return ok;
+ }, argGen.testCount || randomTestCount);
+ } catch(e) {
+ testFailed(name, e.name, formatError(e));
+ }
+ }
+}
+
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B4.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B4.html
new file mode 100644
index 000000000..616c49fc9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B4.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="quickCheckAPI.js"></script>
+<script type="application/x-javascript" src="argGenerators-B4.js"></script>
+
+<script type="application/x-javascript">
+
+// Test that all GL functions specified in ArgGenerators work
+// when called with randomly generated valid arguments
+Tests.testValidArgs = function() {
+ var randomTestCount = 100;
+ for (var name in ArgGenerators) {
+ try {
+ if (!GL[name])
+ throw (new Error(name + " is missing from the WebGL context"));
+ var argGen = ArgGenerators[name];
+ var alreadyTriedArgs = {};
+ if (!argGen.generate) continue;
+ // test each GL function with randomTestCount randomly generated valid args
+ argGeneratorTestRunner(argGen, function(args, gen, setupVars) {
+ if (!gen.noAlreadyTriedCheck) {
+ var src = Object.toSource(args);
+ if (alreadyTriedArgs[src])
+ return true;
+
+ alreadyTriedArgs[src] = true;
+ }
+ var ok = false;
+ // if we have an validity checker, assert that the generated args are valid
+ if (gen.checkArgValidity)
+ assert("Valid args: "+name+"("+argsToString(args)+")",
+ gen.checkArgValidity.apply(gen, args));
+ var rv;
+ // assert that GL function works when called with valid args
+ assertOk("This should work: "+name+"("+argsToString(args)+")",
+ function(){rv = GL[name].apply(GL, args); ok = true;});
+ // if we need to cleanup the return value, do it here
+ // e.g. calling gl.deleteBuffer(rv) after testing gl.createBuffer() above
+ if (gen.returnValueCleanup)
+ assertOk("Cleaning up return value after "+name+"("+argsToString(args)+")",
+ function() { gen.returnValueCleanup(rv); });
+ return ok;
+ }, argGen.testCount || randomTestCount);
+ } catch(e) {
+ testFailed(name, e.name, formatError(e));
+ }
+ }
+}
+
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-C.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-C.html
new file mode 100644
index 000000000..9f122d2cf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-C.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="quickCheckAPI.js"></script>
+<script type="application/x-javascript" src="argGenerators-C.js"></script>
+
+<script type="application/x-javascript">
+
+// Test that all GL functions specified in ArgGenerators work
+// when called with randomly generated valid arguments
+Tests.testValidArgs = function() {
+ var randomTestCount = 100;
+ for (var name in ArgGenerators) {
+ try {
+ if (!GL[name])
+ throw (new Error(name + " is missing from the WebGL context"));
+ var argGen = ArgGenerators[name];
+ var alreadyTriedArgs = {};
+ if (!argGen.generate) continue;
+ // test each GL function with randomTestCount randomly generated valid args
+ argGeneratorTestRunner(argGen, function(args, gen, setupVars) {
+ if (!gen.noAlreadyTriedCheck) {
+ var src = Object.toSource(args);
+ if (alreadyTriedArgs[src])
+ return true;
+
+ alreadyTriedArgs[src] = true;
+ }
+ var ok = false;
+ // if we have an validity checker, assert that the generated args are valid
+ if (gen.checkArgValidity)
+ assert("Valid args: "+name+"("+argsToString(args)+")",
+ gen.checkArgValidity.apply(gen, args));
+ var rv;
+ // assert that GL function works when called with valid args
+ assertOk("This should work: "+name+"("+argsToString(args)+")",
+ function(){rv = GL[name].apply(GL, args); ok = true;});
+ // if we need to cleanup the return value, do it here
+ // e.g. calling gl.deleteBuffer(rv) after testing gl.createBuffer() above
+ if (gen.returnValueCleanup)
+ assertOk("Cleaning up return value after "+name+"("+argsToString(args)+")",
+ function() { gen.returnValueCleanup(rv); });
+ return ok;
+ }, argGen.testCount || randomTestCount);
+ } catch(e) {
+ testFailed(name, e.name, formatError(e));
+ }
+ }
+}
+
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-D_G.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-D_G.html
new file mode 100644
index 000000000..c6e3fe163
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-D_G.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="quickCheckAPI.js"></script>
+<script type="application/x-javascript" src="argGenerators-D_G.js"></script>
+
+<script type="application/x-javascript">
+
+// Test that all GL functions specified in ArgGenerators work
+// when called with randomly generated valid arguments
+Tests.testValidArgs = function() {
+ var randomTestCount = 100;
+ for (var name in ArgGenerators) {
+ try {
+ if (!GL[name])
+ throw (new Error(name + " is missing from the WebGL context"));
+ var argGen = ArgGenerators[name];
+ var alreadyTriedArgs = {};
+ if (!argGen.generate) continue;
+ // test each GL function with randomTestCount randomly generated valid args
+ argGeneratorTestRunner(argGen, function(args, gen, setupVars) {
+ if (!gen.noAlreadyTriedCheck) {
+ var src = Object.toSource(args);
+ if (alreadyTriedArgs[src])
+ return true;
+
+ alreadyTriedArgs[src] = true;
+ }
+ var ok = false;
+ // if we have an validity checker, assert that the generated args are valid
+ if (gen.checkArgValidity)
+ assert("Valid args: "+name+"("+argsToString(args)+")",
+ gen.checkArgValidity.apply(gen, args));
+ var rv;
+ // assert that GL function works when called with valid args
+ assertOk("This should work: "+name+"("+argsToString(args)+")",
+ function(){rv = GL[name].apply(GL, args); ok = true;});
+ // if we need to cleanup the return value, do it here
+ // e.g. calling gl.deleteBuffer(rv) after testing gl.createBuffer() above
+ if (gen.returnValueCleanup)
+ assertOk("Cleaning up return value after "+name+"("+argsToString(args)+")",
+ function() { gen.returnValueCleanup(rv); });
+ return ok;
+ }, argGen.testCount || randomTestCount);
+ } catch(e) {
+ testFailed(name, e.name, formatError(e));
+ }
+ }
+}
+
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-G_I.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-G_I.html
new file mode 100644
index 000000000..9bd5cf92a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-G_I.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="quickCheckAPI.js"></script>
+<script type="application/x-javascript" src="argGenerators-G_I.js"></script>
+
+<script type="application/x-javascript">
+
+// Test that all GL functions specified in ArgGenerators work
+// when called with randomly generated valid arguments
+Tests.testValidArgs = function() {
+ var randomTestCount = 100;
+ for (var name in ArgGenerators) {
+ try {
+ if (!GL[name])
+ throw (new Error(name + " is missing from the WebGL context"));
+ var argGen = ArgGenerators[name];
+ var alreadyTriedArgs = {};
+ if (!argGen.generate) continue;
+ // test each GL function with randomTestCount randomly generated valid args
+ argGeneratorTestRunner(argGen, function(args, gen, setupVars) {
+ if (!gen.noAlreadyTriedCheck) {
+ var src = Object.toSource(args);
+ if (alreadyTriedArgs[src])
+ return true;
+
+ alreadyTriedArgs[src] = true;
+ }
+ var ok = false;
+ // if we have an validity checker, assert that the generated args are valid
+ if (gen.checkArgValidity)
+ assert("Valid args: "+name+"("+argsToString(args)+")",
+ gen.checkArgValidity.apply(gen, args));
+ var rv;
+ // assert that GL function works when called with valid args
+ assertOk("This should work: "+name+"("+argsToString(args)+")",
+ function(){rv = GL[name].apply(GL, args); ok = true;});
+ // if we need to cleanup the return value, do it here
+ // e.g. calling gl.deleteBuffer(rv) after testing gl.createBuffer() above
+ if (gen.returnValueCleanup)
+ assertOk("Cleaning up return value after "+name+"("+argsToString(args)+")",
+ function() { gen.returnValueCleanup(rv); });
+ return ok;
+ }, argGen.testCount || randomTestCount);
+ } catch(e) {
+ testFailed(name, e.name, formatError(e));
+ }
+ }
+}
+
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-L_S.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-L_S.html
new file mode 100644
index 000000000..013f86f9f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-L_S.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="quickCheckAPI.js"></script>
+<script type="application/x-javascript" src="argGenerators-L_S.js"></script>
+
+<script type="application/x-javascript">
+
+// Test that all GL functions specified in ArgGenerators work
+// when called with randomly generated valid arguments
+Tests.testValidArgs = function() {
+ var randomTestCount = 100;
+ for (var name in ArgGenerators) {
+ try {
+ if (!GL[name])
+ throw (new Error(name + " is missing from the WebGL context"));
+ var argGen = ArgGenerators[name];
+ var alreadyTriedArgs = {};
+ if (!argGen.generate) continue;
+ // test each GL function with randomTestCount randomly generated valid args
+ argGeneratorTestRunner(argGen, function(args, gen, setupVars) {
+ if (!gen.noAlreadyTriedCheck) {
+ var src = Object.toSource(args);
+ if (alreadyTriedArgs[src])
+ return true;
+
+ alreadyTriedArgs[src] = true;
+ }
+ var ok = false;
+ // if we have an validity checker, assert that the generated args are valid
+ if (gen.checkArgValidity)
+ assert("Valid args: "+name+"("+argsToString(args)+")",
+ gen.checkArgValidity.apply(gen, args));
+ var rv;
+ // assert that GL function works when called with valid args
+ assertOk("This should work: "+name+"("+argsToString(args)+")",
+ function(){rv = GL[name].apply(GL, args); ok = true;});
+ // if we need to cleanup the return value, do it here
+ // e.g. calling gl.deleteBuffer(rv) after testing gl.createBuffer() above
+ if (gen.returnValueCleanup)
+ assertOk("Cleaning up return value after "+name+"("+argsToString(args)+")",
+ function() { gen.returnValueCleanup(rv); });
+ return ok;
+ }, argGen.testCount || randomTestCount);
+ } catch(e) {
+ testFailed(name, e.name, formatError(e));
+ }
+ }
+}
+
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-S_V.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-S_V.html
new file mode 100644
index 000000000..f405d9c8f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-S_V.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="quickCheckAPI.js"></script>
+<script type="application/x-javascript" src="argGenerators-S_V.js"></script>
+
+<script type="application/x-javascript">
+
+// Test that all GL functions specified in ArgGenerators work
+// when called with randomly generated valid arguments
+Tests.testValidArgs = function() {
+ var randomTestCount = 100;
+ for (var name in ArgGenerators) {
+ try {
+ if (!GL[name])
+ throw (new Error(name + " is missing from the WebGL context"));
+ var argGen = ArgGenerators[name];
+ var alreadyTriedArgs = {};
+ if (!argGen.generate) continue;
+ // test each GL function with randomTestCount randomly generated valid args
+ argGeneratorTestRunner(argGen, function(args, gen, setupVars) {
+ if (!gen.noAlreadyTriedCheck) {
+ var src = Object.toSource(args);
+ if (alreadyTriedArgs[src])
+ return true;
+
+ alreadyTriedArgs[src] = true;
+ }
+ var ok = false;
+ // if we have an validity checker, assert that the generated args are valid
+ if (gen.checkArgValidity)
+ assert("Valid args: "+name+"("+argsToString(args)+")",
+ gen.checkArgValidity.apply(gen, args));
+ var rv;
+ // assert that GL function works when called with valid args
+ assertOk("This should work: "+name+"("+argsToString(args)+")",
+ function(){rv = GL[name].apply(GL, args); ok = true;});
+ // if we need to cleanup the return value, do it here
+ // e.g. calling gl.deleteBuffer(rv) after testing gl.createBuffer() above
+ if (gen.returnValueCleanup)
+ assertOk("Cleaning up return value after "+name+"("+argsToString(args)+")",
+ function() { gen.returnValueCleanup(rv); });
+ return ok;
+ }, argGen.testCount || randomTestCount);
+ } catch(e) {
+ testFailed(name, e.name, formatError(e));
+ }
+ }
+}
+
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI.js
new file mode 100644
index 000000000..b39feca14
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI.js
@@ -0,0 +1,430 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/*
+ QuickCheck tests for WebGL:
+
+ 1. Write a valid arg generator for each function
+ 1.1. Write valid arg predicates to use with random generator:
+ if value passes generator, accept it as valid.
+ 1.2. Often needs initializing and cleanup:
+ setup - generate - cleanup
+ gl.createBuffer - test(bindBufferGenerator) - gl.deleteBuffer
+
+ 2. Write an invalid arg generator
+ 2.1. Take valid args, modify an arg until the args no longer pass
+ checkArgValidity.
+ 2.2. Repeat for all args.
+
+ 3. Test functions using the generators
+ 3.1. Args generated with the valid arg generator should pass
+ assertOk(f(args))
+ 3.2. Args generated with the invalid arg generator should pass
+ assertFail(f(args))
+*/
+var GLcanvas = document.createElement('canvas');
+var canvas2D = document.createElement('canvas');
+GLcanvas.width = GLcanvas.height = 256;
+GL = getGLContext(GLcanvas);
+Array.from = function(o) {
+ var a = [];
+ for (var i=0; i<o.length; i++)
+ a.push(o[i]);
+ return a;
+}
+Array.prototype.has = function(v) { return this.indexOf(v) != -1; }
+Array.prototype.random = function() { return this[randomInt(this.length)]; }
+
+castToInt = function(o) {
+ if (typeof o == 'number')
+ return isNaN(o) ? 0 : Math.floor(o);
+ if (o == true) return 1;
+ return 0;
+};
+
+// Creates a constant checker / generator from its arguments.
+//
+// E.g. if you want a constant checker for the constants 1, 2, and 3, you
+// would do the following:
+//
+// var cc = constCheck(1,2,3);
+// var randomConst = cc.random();
+// if (cc.has(randomConst))
+// console.log("randomConst is included in cc's constants");
+//
+constCheck = function() {
+ var a = Array.from(arguments);
+ a.has = function(v) { return this.indexOf(castToInt(v)) != -1; };
+ return a;
+}
+
+bindTextureTarget = constCheck(GL.TEXTURE_2D, GL.TEXTURE_CUBE_MAP);
+blendEquationMode = constCheck(GL.FUNC_ADD, GL.FUNC_SUBTRACT, GL.FUNC_REVERSE_SUBTRACT);
+blendFuncSfactor = constCheck(
+ GL.ZERO, GL.ONE, GL.SRC_COLOR, GL.ONE_MINUS_SRC_COLOR, GL.DST_COLOR,
+ GL.ONE_MINUS_DST_COLOR, GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA, GL.DST_ALPHA,
+ GL.ONE_MINUS_DST_ALPHA, GL.CONSTANT_COLOR, GL.ONE_MINUS_CONSTANT_COLOR,
+ GL.CONSTANT_ALPHA, GL.ONE_MINUS_CONSTANT_ALPHA, GL.SRC_ALPHA_SATURATE
+);
+blendFuncDfactor = constCheck(
+ GL.ZERO, GL.ONE, GL.SRC_COLOR, GL.ONE_MINUS_SRC_COLOR, GL.DST_COLOR,
+ GL.ONE_MINUS_DST_COLOR, GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA, GL.DST_ALPHA,
+ GL.ONE_MINUS_DST_ALPHA, GL.CONSTANT_COLOR, GL.ONE_MINUS_CONSTANT_COLOR,
+ GL.CONSTANT_ALPHA, GL.ONE_MINUS_CONSTANT_ALPHA
+);
+bufferTarget = constCheck(GL.ARRAY_BUFFER, GL.ELEMENT_ARRAY_BUFFER);
+bufferMode = constCheck(GL.STREAM_DRAW, GL.STATIC_DRAW, GL.DYNAMIC_DRAW);
+clearMask = constCheck(
+ GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT | GL.STENCIL_BUFFER_BIT,
+ GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT,
+ GL.COLOR_BUFFER_BIT | GL.STENCIL_BUFFER_BIT,
+ GL.DEPTH_BUFFER_BIT | GL.STENCIL_BUFFER_BIT,
+ GL.COLOR_BUFFER_BIT, GL.DEPTH_BUFFER_BIT, GL.STENCIL_BUFFER_BIT, 0
+);
+cullFace = constCheck(GL.FRONT, GL.BACK, GL.FRONT_AND_BACK);
+depthFuncFunc = constCheck(
+ GL.NEVER, GL.LESS, GL.EQUAL, GL.LEQUAL, GL.GREATER, GL.NOTEQUAL,
+ GL.GEQUAL, GL.ALWAYS
+);
+stencilFuncFunc = depthFuncFunc;
+enableCap = constCheck(
+ GL.BLEND, GL.CULL_FACE, GL.DEPTH_TEST, GL.DITHER, GL.POLYGON_OFFSET_FILL,
+ GL.SAMPLE_ALPHA_TO_COVERAGE, GL.SAMPLE_COVERAGE, GL.SCISSOR_TEST,
+ GL.STENCIL_TEST
+);
+frontFaceMode = constCheck(GL.CCW, GL.CW);
+getParameterPname = constCheck(
+ GL.ACTIVE_TEXTURE || "GL.ACTIVE_TEXTURE",
+ GL.ALIASED_LINE_WIDTH_RANGE || "GL.ALIASED_LINE_WIDTH_RANGE",
+ GL.ALIASED_POINT_SIZE_RANGE || "GL.ALIASED_POINT_SIZE_RANGE",
+ GL.ALPHA_BITS || "GL.ALPHA_BITS",
+ GL.ARRAY_BUFFER_BINDING || "GL.ARRAY_BUFFER_BINDING",
+ GL.BLEND || "GL.BLEND",
+ GL.BLEND_COLOR || "GL.BLEND_COLOR",
+ GL.BLEND_DST_ALPHA || "GL.BLEND_DST_ALPHA",
+ GL.BLEND_DST_RGB || "GL.BLEND_DST_RGB",
+ GL.BLEND_EQUATION_ALPHA || "GL.BLEND_EQUATION_ALPHA",
+ GL.BLEND_EQUATION_RGB || "GL.BLEND_EQUATION_RGB",
+ GL.BLEND_SRC_ALPHA || "GL.BLEND_SRC_ALPHA",
+ GL.BLEND_SRC_RGB || "GL.BLEND_SRC_RGB",
+ GL.BLUE_BITS || "GL.BLUE_BITS",
+ GL.COLOR_CLEAR_VALUE || "GL.COLOR_CLEAR_VALUE",
+ GL.COLOR_WRITEMASK || "GL.COLOR_WRITEMASK",
+ GL.COMPRESSED_TEXTURE_FORMATS || "GL.COMPRESSED_TEXTURE_FORMATS",
+ GL.CULL_FACE || "GL.CULL_FACE",
+ GL.CULL_FACE_MODE || "GL.CULL_FACE_MODE",
+ GL.CURRENT_PROGRAM || "GL.CURRENT_PROGRAM",
+ GL.DEPTH_BITS || "GL.DEPTH_BITS",
+ GL.DEPTH_CLEAR_VALUE || "GL.DEPTH_CLEAR_VALUE",
+ GL.DEPTH_FUNC || "GL.DEPTH_FUNC",
+ GL.DEPTH_RANGE || "GL.DEPTH_RANGE",
+ GL.DEPTH_TEST || "GL.DEPTH_TEST",
+ GL.DEPTH_WRITEMASK || "GL.DEPTH_WRITEMASK",
+ GL.DITHER || "GL.DITHER",
+ GL.ELEMENT_ARRAY_BUFFER_BINDING || "GL.ELEMENT_ARRAY_BUFFER_BINDING",
+ GL.FRAMEBUFFER_BINDING || "GL.FRAMEBUFFER_BINDING",
+ GL.FRONT_FACE || "GL.FRONT_FACE",
+ GL.GENERATE_MIPMAP_HINT || "GL.GENERATE_MIPMAP_HINT",
+ GL.GREEN_BITS || "GL.GREEN_BITS",
+ GL.LINE_WIDTH || "GL.LINE_WIDTH",
+ GL.MAX_COMBINED_TEXTURE_IMAGE_UNITS || "GL.MAX_COMBINED_TEXTURE_IMAGE_UNITS",
+ GL.MAX_CUBE_MAP_TEXTURE_SIZE || "GL.MAX_CUBE_MAP_TEXTURE_SIZE",
+ GL.MAX_FRAGMENT_UNIFORM_VECTORS || "GL.MAX_FRAGMENT_UNIFORM_VECTORS",
+ GL.MAX_RENDERBUFFER_SIZE || "GL.MAX_RENDERBUFFER_SIZE",
+ GL.MAX_TEXTURE_IMAGE_UNITS || "GL.MAX_TEXTURE_IMAGE_UNITS",
+ GL.MAX_TEXTURE_SIZE || "GL.MAX_TEXTURE_SIZE",
+ GL.MAX_VARYING_VECTORS || "GL.MAX_VARYING_VECTORS",
+ GL.MAX_VERTEX_ATTRIBS || "GL.MAX_VERTEX_ATTRIBS",
+ GL.MAX_VERTEX_TEXTURE_IMAGE_UNITS || "GL.MAX_VERTEX_TEXTURE_IMAGE_UNITS",
+ GL.MAX_VERTEX_UNIFORM_VECTORS || "GL.MAX_VERTEX_UNIFORM_VECTORS",
+ GL.MAX_VIEWPORT_DIMS || "GL.MAX_VIEWPORT_DIMS",
+ GL.PACK_ALIGNMENT || "GL.PACK_ALIGNMENT",
+ GL.POLYGON_OFFSET_FACTOR || "GL.POLYGON_OFFSET_FACTOR",
+ GL.POLYGON_OFFSET_FILL || "GL.POLYGON_OFFSET_FILL",
+ GL.POLYGON_OFFSET_UNITS || "GL.POLYGON_OFFSET_UNITS",
+ GL.RED_BITS || "GL.RED_BITS",
+ GL.RENDERBUFFER_BINDING || "GL.RENDERBUFFER_BINDING",
+ GL.SAMPLE_BUFFERS || "GL.SAMPLE_BUFFERS",
+ GL.SAMPLE_COVERAGE_INVERT || "GL.SAMPLE_COVERAGE_INVERT",
+ GL.SAMPLE_COVERAGE_VALUE || "GL.SAMPLE_COVERAGE_VALUE",
+ GL.SAMPLES || "GL.SAMPLES",
+ GL.SCISSOR_BOX || "GL.SCISSOR_BOX",
+ GL.SCISSOR_TEST || "GL.SCISSOR_TEST",
+ GL.STENCIL_BACK_FAIL || "GL.STENCIL_BACK_FAIL",
+ GL.STENCIL_BACK_FUNC || "GL.STENCIL_BACK_FUNC",
+ GL.STENCIL_BACK_PASS_DEPTH_FAIL || "GL.STENCIL_BACK_PASS_DEPTH_FAIL",
+ GL.STENCIL_BACK_PASS_DEPTH_PASS || "GL.STENCIL_BACK_PASS_DEPTH_PASS",
+ GL.STENCIL_BACK_REF || "GL.STENCIL_BACK_REF",
+ GL.STENCIL_BACK_VALUE_MASK || "GL.STENCIL_BACK_VALUE_MASK",
+ GL.STENCIL_BACK_WRITEMASK || "GL.STENCIL_BACK_WRITEMASK",
+ GL.STENCIL_BITS || "GL.STENCIL_BITS",
+ GL.STENCIL_CLEAR_VALUE || "GL.STENCIL_CLEAR_VALUE",
+ GL.STENCIL_FAIL || "GL.STENCIL_FAIL",
+ GL.STENCIL_FUNC || "GL.STENCIL_FUNC",
+ GL.STENCIL_PASS_DEPTH_FAIL || "GL.STENCIL_PASS_DEPTH_FAIL",
+ GL.STENCIL_PASS_DEPTH_PASS || "GL.STENCIL_PASS_DEPTH_PASS",
+ GL.STENCIL_REF || "GL.STENCIL_REF",
+ GL.STENCIL_TEST || "GL.STENCIL_TEST",
+ GL.STENCIL_VALUE_MASK || "GL.STENCIL_VALUE_MASK",
+ GL.STENCIL_WRITEMASK || "GL.STENCIL_WRITEMASK",
+ GL.SUBPIXEL_BITS || "GL.SUBPIXEL_BITS",
+ GL.TEXTURE_BINDING_2D || "GL.TEXTURE_BINDING_2D",
+ GL.TEXTURE_BINDING_CUBE_MAP || "GL.TEXTURE_BINDING_CUBE_MAP",
+ GL.UNPACK_ALIGNMENT || "GL.UNPACK_ALIGNMENT",
+ GL.VIEWPORT || "GL.VIEWPORT"
+);
+mipmapHint = constCheck(GL.FASTEST, GL.NICEST, GL.DONT_CARE);
+pixelStoreiPname = constCheck(GL.PACK_ALIGNMENT, GL.UNPACK_ALIGNMENT);
+pixelStoreiParam = constCheck(1,2,4,8);
+shaderType = constCheck(GL.VERTEX_SHADER, GL.FRAGMENT_SHADER);
+stencilOp = constCheck(GL.KEEP, GL.ZERO, GL.REPLACE, GL.INCR, GL.INCR_WRAP,
+ GL.DECR, GL.DECR_WRAP, GL.INVERT);
+texImageTarget = constCheck(
+ GL.TEXTURE_2D,
+ GL.TEXTURE_CUBE_MAP_POSITIVE_X,
+ GL.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ GL.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ GL.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ GL.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ GL.TEXTURE_CUBE_MAP_NEGATIVE_Z
+);
+texImageInternalFormat = constCheck(
+ GL.ALPHA,
+ GL.LUMINANCE,
+ GL.LUMINANCE_ALPHA,
+ GL.RGB,
+ GL.RGBA
+);
+texImageFormat = constCheck(
+ GL.ALPHA,
+ GL.LUMINANCE,
+ GL.LUMINANCE_ALPHA,
+ GL.RGB,
+ GL.RGBA
+);
+texImageType = constCheck(GL.UNSIGNED_BYTE);
+texParameterPname = constCheck(
+ GL.TEXTURE_MIN_FILTER, GL.TEXTURE_MAG_FILTER,
+ GL.TEXTURE_WRAP_S, GL.TEXTURE_WRAP_T);
+texParameterParam = {};
+texParameterParam[GL.TEXTURE_MIN_FILTER] = constCheck(
+ GL.NEAREST, GL.LINEAR, GL.NEAREST_MIPMAP_NEAREST, GL.LINEAR_MIPMAP_NEAREST,
+ GL.NEAREST_MIPMAP_LINEAR, GL.LINEAR_MIPMAP_LINEAR);
+texParameterParam[GL.TEXTURE_MAG_FILTER] = constCheck(GL.NEAREST, GL.LINEAR);
+texParameterParam[GL.TEXTURE_WRAP_S] = constCheck(
+ GL.CLAMP_TO_EDGE, GL.MIRRORED_REPEAT, GL.REPEAT);
+texParameterParam[GL.TEXTURE_WRAP_T] = texParameterParam[GL.TEXTURE_WRAP_S];
+textureUnit = constCheck.apply(this, (function(){
+ var textureUnits = [];
+ var texUnits = GL.getParameter(GL.MAX_TEXTURE_IMAGE_UNITS);
+ for (var i=0; i<texUnits; i++) textureUnits.push(GL['TEXTURE'+i]);
+ return textureUnits;
+})());
+
+var StencilBits = GL.getParameter(GL.STENCIL_BITS);
+var MaxStencilValue = 1 << StencilBits;
+
+var MaxVertexAttribs = GL.getParameter(GL.MAX_VERTEX_ATTRIBS);
+var LineWidthRange = GL.getParameter(GL.ALIASED_LINE_WIDTH_RANGE);
+
+// Returns true if bufData can be passed to GL.bufferData
+isBufferData = function(bufData) {
+ if (typeof bufData == 'number')
+ return bufData >= 0;
+ if (bufData instanceof ArrayBuffer)
+ return true;
+ return WebGLArrayTypes.some(function(t) {
+ return bufData instanceof t;
+ });
+};
+
+isVertexAttribute = function(idx) {
+ if (typeof idx != 'number') return false;
+ return idx >= 0 && idx < MaxVertexAttribs;
+};
+
+isValidName = function(name) {
+ if (typeof name != 'string') return false;
+ for (var i=0; i<name.length; i++) {
+ var c = name.charCodeAt(i);
+ if (c & 0x00FF == 0 || c & 0xFF00 == 0) {
+ return false;
+ }
+ }
+ return true;
+};
+
+WebGLArrayTypes = [
+ Float32Array,
+ Int32Array,
+ Int16Array,
+ Int8Array,
+ Uint32Array,
+ Uint16Array,
+ Uint8Array
+];
+webGLArrayContentGenerators = [randomLength, randomSmallIntArray];
+randomWebGLArray = function() {
+ var t = WebGLArrayTypes.random();
+ return new t(webGLArrayContentGenerators.random()());
+};
+
+randomArrayBuffer = function(buflen) {
+ if (buflen == null) buflen = 256;
+ var len = randomInt(buflen)+1;
+ var rv;
+ try {
+ rv = new ArrayBuffer(len);
+ } catch(e) {
+ log("Error creating ArrayBuffer with length " + len);
+ throw(e);
+ }
+ return rv;
+};
+
+bufferDataGenerators = [randomLength, randomWebGLArray, randomArrayBuffer];
+randomBufferData = function() {
+ return bufferDataGenerators.random()();
+};
+
+randomSmallWebGLArray = function(buflen) {
+ var t = WebGLArrayTypes.random();
+ return new t(randomInt(buflen/4)+1);
+};
+
+bufferSubDataGenerators = [randomSmallWebGLArray, randomArrayBuffer];
+randomBufferSubData = function(buflen) {
+ var data = bufferSubDataGenerators.random()(buflen);
+ var offset = randomInt(buflen - data.byteLength);
+ return {data:data, offset:offset};
+};
+
+randomColor = function() {
+ return [Math.random(), Math.random(), Math.random(), Math.random()];
+};
+
+randomName = function() {
+ var arr = [];
+ var len = randomLength()+1;
+ for (var i=0; i<len; i++) {
+ var l = randomInt(255)+1;
+ var h = randomInt(255)+1;
+ var c = (h << 8) | l;
+ arr.push(String.fromCharCode(c));
+ }
+ return arr.join('');
+};
+randomVertexAttribute = function() {
+ return randomInt(MaxVertexAttribs);
+};
+
+randomBool = function() { return Math.random() > 0.5; };
+
+randomStencil = function() {
+ return randomInt(MaxStencilValue);
+};
+
+randomLineWidth = function() {
+ var lo = LineWidthRange[0],
+ hi = LineWidthRange[1];
+ return randomFloatFromRange(lo, hi);
+};
+
+randomImage = function(w,h) {
+ var img;
+ var r = Math.random();
+ if (r < 0.25) {
+ img = document.createElement('canvas');
+ img.width = w; img.height = h;
+ img.getContext('2d').fillRect(0,0,w,h);
+ } else if (r < 0.5) {
+ img = document.createElement('video');
+ img.width = w; img.height = h;
+ } else if (r < 0.75) {
+ img = document.createElement('img');
+ img.width = w; img.height = h;
+ } else {
+ img = canvas2D.getContext('2d').createImageData(w,h);
+ }
+ return img
+};
+
+mutateArgs = function(args) {
+ var mutateCount = randomIntFromRange(1, args.length);
+ var newArgs = Array.from(args);
+ for (var i=0; i<mutateCount; i++) {
+ var idx = randomInt(args.length);
+ newArgs[idx] = generateRandomArg(idx, args.length);
+ }
+ return newArgs;
+};
+
+// Calls testFunction numberOfTests times with arguments generated by
+// argGen.generate() (or empty arguments if no generate present).
+//
+// The arguments testFunction is called with are the generated args,
+// the argGen, and what argGen.setup() returned or [] if argGen has not setup
+// method. I.e. testFunction(generatedArgs, argGen, setupVars).
+//
+argGeneratorTestRunner = function(argGen, testFunction, numberOfTests) {
+ // do argument generator setup if needed
+ var setupVars = argGen.setup ? argGen.setup() : [];
+ var error;
+ for (var i=0; i<numberOfTests; i++) {
+ var failed = false;
+ // generate arguments if argGen has a generate method
+ var generatedArgs = argGen.generate ? argGen.generate.apply(argGen, setupVars) : [];
+ try {
+ // call testFunction with the generated args
+ testFunction.call(this, generatedArgs, argGen, setupVars);
+ } catch (e) {
+ failed = true;
+ error = e;
+ }
+ // if argGen needs cleanup for generated args, do it here
+ if (argGen.cleanup)
+ argGen.cleanup.apply(argGen, generatedArgs);
+ if (failed) break;
+ }
+ // if argGen needs to do a final cleanup for setupVars, do it here
+ if (argGen.teardown)
+ argGen.teardown.apply(argGen, setupVars);
+ if (error) throw(error);
+};
+
+// TODO: Remove this
+// WebKit or at least Chrome is really slow at laying out strings with
+// unprintable characters. Without this tests can take 30-90 seconds.
+// With this they're instant.
+sanitize = function(str) {
+ var newStr = [];
+ for (var ii = 0; ii < str.length; ++ii) {
+ var c = str.charCodeAt(ii);
+ newStr.push((c > 31 && c < 128) ? str[ii] : "?");
+ }
+ return newStr.join('');
+};
+
+argsToString = function(args) {
+ return sanitize(args.map(function(a){return Object.toSource(a)}).join(","));
+};
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/webGLArrays.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/webGLArrays.html
new file mode 100644
index 000000000..4b7ff947d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/conformance/webGLArrays.html
@@ -0,0 +1,188 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+
+<script type="application/x-javascript">
+
+function assertIdxs(name, arr, length) {
+// assertOk(name+": Read with negative idx should work", function(){ return arr[-1] });
+// assertOk(name+": Read with too large idx should work", function(){ return arr[length] });
+// assertOk(name+": Write with negative idx should work", function(){ arr[-1] = 0 });
+// assertOk(name+": Write with too large idx should work", function(){ arr[length] = 0 });
+// arr[0] = 2;
+// assertEquals(name+": Test that write worked", 2, arr[0]);
+// assertOk(name+": Write with bad value should work", function(){ arr[0] = {x:"foo"} });
+// assertEquals(name+": Test that bad write didn't work", 2, arr[0]);
+ assertOk(name+": Read and writes with OK idxs should work", function(){
+ for (var i=0; i<length; i++) arr[i] = i + 1;
+ for (var i=0; i<length; i++) arr[i] = arr[i] + 1;
+ for (var i=0; i<length; i++) assertEquals(name+": Test that reads and writes work", i+2, arr[i]);
+ });
+}
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ prog = new Shader(gl, 'vert', 'frag');
+ prog.use();
+ prog.uniform4f('c', 255, 0, 0, 255);
+ va = prog.attrib('Vertex');
+ buffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
+ return [gl];
+}
+
+Tests.endUnit = function() {
+ prog.destroy();
+}
+
+Tests.testCreateFromArray = function() {
+ var a = new Float32Array([1,2,3,4,5,6]);
+ assertIdxs('Float', a, 6);
+ var a = new Int32Array([1,2,3,4,5,6]);
+ assertIdxs('Int', a, 6);
+ var a = new Int16Array([1,2,3,4,5,6]);
+ assertIdxs('Short', a, 6);
+ var a = new Int8Array([1,2,3,4,5,6]);
+ assertIdxs('Byte', a, 6);
+ var a = new Uint32Array([1,2,3,4,5,6]);
+ assertIdxs('UInt', a, 6);
+ var a = new Uint16Array([1,2,3,4,5,6]);
+ assertIdxs('UShort', a, 6);
+ var a = new Uint8Array([1,2,3,4,5,6]);
+ assertIdxs('UByte', a, 6);
+}
+Tests.testCreateFromCount = function() {
+ var a = new Float32Array(6);
+ assertIdxs('Float', a, 6);
+ var a = new Int32Array(6);
+ assertIdxs('Int', a, 6);
+ var a = new Int16Array(6);
+ assertIdxs('Short', a, 6);
+ var a = new Int8Array(6);
+ assertIdxs('Byte', a, 6);
+ var a = new Uint32Array(6);
+ assertIdxs('UInt', a, 6);
+ var a = new Uint16Array(6);
+ assertIdxs('UShort', a, 6);
+ var a = new Uint8Array(6);
+ assertIdxs('UByte', a, 6);
+}
+Tests.testCreateFromBuffer = function() {
+ var sz = 24;
+ var b = new ArrayBuffer(sz);
+ var a = new Float32Array(b);
+ assertIdxs('Float', a, sz/4);
+ var a = new Int32Array(b);
+ assertIdxs('Int', a, sz/4);
+ var a = new Int16Array(b);
+ assertIdxs('Short', a, sz/2);
+ var a = new Int8Array(b);
+ assertIdxs('Byte', a, sz/1);
+ var a = new Uint32Array(b);
+ assertIdxs('UInt', a, sz/4);
+ var a = new Uint16Array(b);
+ assertIdxs('UShort', a, sz/2);
+ var a = new Uint8Array(b);
+ assertIdxs('UByte', a, sz/1);
+}
+
+Tests.testThatWritesChangeDrawing = function(gl) {
+ var verts = [
+ 0,0,
+ 1,0,
+ 1,1,
+
+ 0,0,
+ 1,1,
+ 0,1
+ ];
+ var a = new Float32Array(verts);
+ var arr = [];
+ for (var i=0; i<12; i++)
+ arr[i] = a[i];
+ assertEquals("Test that reads work from an array-initialized Float32Array", arr, verts);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.bufferData(gl.ARRAY_BUFFER, a, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(va, 2, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(va);
+
+ var id = new Uint8Array(4);
+ gl.readPixels(8,8,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+ assertEquals([0, 0, 0, 0], [id[0], id[1], id[2], id[3]]);
+
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+ gl.readPixels(8,8,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+ assertEquals([255, 0, 0, 255], [id[0], id[1], id[2], id[3]]);
+ gl.readPixels(0,8,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+ assertEquals([0, 0, 0, 0], [id[0], id[1], id[2], id[3]]);
+
+ a[0] = a[6] = a[10] = -1;
+ gl.bufferData(gl.ARRAY_BUFFER, a, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(va, 2, gl.FLOAT, false, 0, 0);
+
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+ gl.readPixels(8,8,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+ assertEquals([255, 0, 0, 255], [id[0], id[1], id[2], id[3]]);
+ gl.readPixels(0,8,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+ assertEquals("Test that Float32Array#[]= worked and drawArrays drew a full-width rectangle",
+ [255, 0, 0, 255], [id[0], id[1], id[2], id[3]]);
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+ assertEquals([0, 0, 0, 0], [id[0], id[1], id[2], id[3]]);
+}
+
+</script>
+<script id="vert" type="x-shader/x-vertex">
+ attribute vec2 Vertex;
+ void main()
+ {
+ gl_Position = vec4(Vertex, 0.0, 1.0);
+ }
+</script>
+<script id="frag" type="x-shader/x-fragment">
+ precision mediump float;
+
+ uniform vec4 c;
+ void main()
+ {
+ gl_FragColor = c;
+ }
+</script>
+<style>canvas{border: 1px solid black}</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bindBuffer.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bindBuffer.html
new file mode 100644
index 000000000..dcc2ab144
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bindBuffer.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.testBindBufferARRAY_BUFFER = function(gl) {
+ var b = gl.createBuffer();
+ assert(gl.NO_ERROR == checkError(gl, "genBuffers"));
+ gl.bindBuffer(gl.ARRAY_BUFFER, b);
+ assert(gl.NO_ERROR == checkError(gl, "bindBuffer"));
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ assert(gl.NO_ERROR == checkError(gl, "bindBuffer 0"));
+ gl.deleteBuffer(b);
+ assert(gl.NO_ERROR == checkError(gl, "deleteBuffers"));
+}
+
+Tests.testBindBufferELEMENT_ARRAY_BUFFER = function(gl) {
+ var b = gl.createBuffer();
+ assert(gl.NO_ERROR == checkError(gl, "genBuffers"));
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, b);
+ assert(gl.NO_ERROR == checkError(gl, "bindBuffer"));
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+ assert(gl.NO_ERROR == checkError(gl, "bindBuffer 0"));
+ gl.deleteBuffer(b);
+ assert(gl.NO_ERROR == checkError(gl, "deleteBuffers"));
+}
+
+</script>
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html
new file mode 100644
index 000000000..e27f2b364
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.testBindBufferARRAY_BUFFER = function(gl) {
+ var b = gl.createBuffer();
+ assertOk("bind buffer", function(){gl.bindBuffer(gl.ARRAY_BUFFER, b)});
+ assertFail("bufferData to null buffer", function() {
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([10]), gl.STATIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([10]));
+ });
+ assertFail("bind to number", function(){
+ gl.bindBuffer(gl.ARRAY_BUFFER, 1000000000);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([10]), gl.STATIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([10]));
+ });
+ assertOk("bind to null", function(){gl.bindBuffer(gl.ARRAY_BUFFER, null)});
+ gl.deleteBuffer(b);
+}
+
+Tests.testBindBufferELEMENT_ARRAY_BUFFER = function(gl) {
+ var b = gl.createBuffer();
+ assertOk("bind buffer", function(){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, b)});
+ assertFail("bufferData to null buffer", function() {
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Float32Array([10]), gl.STATIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([10]));
+ });
+ assertFail("bind to number", function(){
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, 1000000000);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Float32Array([10]), gl.STATIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([10]));
+ });
+ assertOk("bind to null",
+ function(){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null)});
+ gl.deleteBuffer(b);
+}
+Tests.testBindBuffer = function(gl) {
+ assertFail("bind ARRAY_BUFFER to number",
+ function(){gl.bindBuffer(gl.ARRAY_BUFFER, 1);});
+ assertFail("bind ELEMENT_ARRAY_BUFFER to number",
+ function(){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, 1);});
+ assertFail("bind bad target",
+ function(){gl.bindBuffer(gl.FLOAT, 0);});
+ assertFail("bind ARRAY_BUFFER to string",
+ function(){gl.bindBuffer(gl.ARRAY_BUFFER, "foo");});
+ assertFail("bind ELEMENT_ARRAY_BUFFER to string",
+ function(){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, "foo");});
+}
+
+</script>
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bindFramebufferLeaveNonZero.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bindFramebufferLeaveNonZero.html
new file mode 100644
index 000000000..917b6eb41
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bindFramebufferLeaveNonZero.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<title>OpenGL for the web</title>
+
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+
+ <script type="application/x-javascript">
+Tests.message = "This was segfaulting when the GL context got GC'd (in glXDestroyContext)";
+Tests.testSeg = function () {
+ var canvas = document.getElementById('canvas');
+ var gl = getGLContext(canvas);
+
+ var fbo = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+}
+</script>
+
+</head><body>
+ <canvas id="canvas" width="400" height="400"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferData.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferData.html
new file mode 100644
index 000000000..4df4146ba
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferData.html
@@ -0,0 +1,89 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var buf = gl.createBuffer();
+ var ebuf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ebuf);
+ return [gl, buf, ebuf];
+}
+
+Tests.testBufferData = function(gl, buf, ebuf) {
+ var data = [0,0,0,0, 1,0,0,0, 0,1,0,0];
+ gl.bufferData(gl.ARRAY_BUFFER, 12, gl.STATIC_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([]), gl.STATIC_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STATIC_DRAW);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STATIC_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STREAM_DRAW);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STREAM_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.DYNAMIC_DRAW);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.DYNAMIC_DRAW);
+
+ gl.bufferData(gl.ARRAY_BUFFER, new Uint16Array(data), gl.STATIC_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, new Uint16Array(data), gl.STREAM_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, new Uint16Array(data), gl.DYNAMIC_DRAW);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*2);
+ throwError(gl, "array bufferSubData");
+}
+Tests.testBufferDataElement = function(gl, buf, ebuf) {
+ var data = [0,0,0,0, 1,0,0,0, 0,1,0,0];
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.STATIC_DRAW);
+ assertEquals(gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STATIC_DRAW);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.STREAM_DRAW);
+ assertEquals(gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STREAM_DRAW);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.DYNAMIC_DRAW);
+ assertEquals(gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_USAGE), gl.DYNAMIC_DRAW);
+ assertEquals(gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE), 12*2);
+ throwError(gl, "element array bufferSubData");
+}
+
+Tests.endUnit = function(gl, buf, ebuf) {
+ gl.deleteBuffer(buf);
+ gl.deleteBuffer(ebuf);
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferDataBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferDataBadArgs.html
new file mode 100644
index 000000000..aab63b790
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferDataBadArgs.html
@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var buf = gl.createBuffer();
+ var ebuf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ebuf);
+ return [gl, buf, ebuf];
+}
+
+Tests.testBufferData = function(gl) {
+ assertOk("zero size data",
+ function(){gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(0), gl.STATIC_DRAW);});
+ assertFail("bad target",
+ function(){gl.bufferData(gl.TEXTURE_2D, new Float32Array([1,2,3]), gl.STATIC_DRAW);});
+// assertFail("array for data",
+// function(){gl.bufferData(gl.ARRAY_BUFFER, [1,2,3], gl.STATIC_DRAW);});
+ assertFail("bad usage",
+ function(){gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1,2,3]), gl.TEXTURE_2D);});
+ assertFail("null data",
+ function(){gl.bufferData(gl.ARRAY_BUFFER, null, gl.STATIC_DRAW);});
+ assertFail("undefined data",
+ function(){gl.bufferData(gl.ARRAY_BUFFER, undefined, gl.STATIC_DRAW);});
+ assertOk(function(){gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Float32Array([1,2,3]), gl.STATIC_DRAW);});
+ throwError(gl, 'bufferData');
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ assertFail(function(){gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1,2,3]), gl.STATIC_DRAW);});
+ throwError(gl, 'bufferData');
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+ assertFail(function(){gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array([1,2,3]), gl.STATIC_DRAW);});
+ throwError(gl, 'bufferData');
+}
+
+Tests.endUnit = function(gl, buf, ebuf) {
+ gl.deleteBuffer(buf);
+ gl.deleteBuffer(ebuf);
+}
+
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubData.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubData.html
new file mode 100644
index 000000000..22cfd4cad
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubData.html
@@ -0,0 +1,140 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = getGLContext(canvas);
+ var buf = gl.createBuffer();
+ var ebuf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ebuf);
+ return [gl, buf, ebuf];
+}
+
+Tests.testBufferSubData = function(gl, buf, ebuf) {
+ var data = [0,0,0,0, 1,0,0,0, 0,1,0,0];
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STATIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3,4]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Float32Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 32, new Float32Array([1,1,1,1]));
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STATIC_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STREAM_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Float32Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3,4]));
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STREAM_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.DYNAMIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Float32Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3,4]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint32Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Int32Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Int16Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Int8Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint8Array([1,1,1,1]));
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.DYNAMIC_DRAW);
+
+ gl.bufferData(gl.ARRAY_BUFFER, 12, gl.STATIC_DRAW);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STATIC_DRAW);
+
+ gl.bufferData(gl.ARRAY_BUFFER, 12*4, gl.STATIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3,4]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Float32Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 32, new Float32Array([1,1,1,1]));
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STATIC_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, 12*4, gl.STREAM_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Float32Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3,4]));
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STREAM_DRAW);
+ gl.bufferData(gl.ARRAY_BUFFER, 12*4, gl.DYNAMIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Float32Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3,4]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint32Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Int32Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Int16Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Int8Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint8Array([1,1,1,1]));
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.DYNAMIC_DRAW);
+
+ gl.bufferData(gl.ARRAY_BUFFER, new Uint16Array(data), gl.STATIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Uint16Array([1,2,3,4]));
+ gl.bufferData(gl.ARRAY_BUFFER, new Uint16Array(data), gl.STREAM_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Uint16Array([1,2,3,4]));
+ gl.bufferData(gl.ARRAY_BUFFER, new Uint16Array(data), gl.DYNAMIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Uint16Array([1,2,3,4]));
+ assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*2);
+ throwError(gl, "array bufferSubData");
+}
+Tests.testBufferSubDataElement = function(gl, buf, ebuf) {
+ var data = [0,0,0,0, 1,0,0,0, 0,1,0,0];
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.STATIC_DRAW);
+ gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+ gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint16Array([1,2,3,4]));
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.STREAM_DRAW);
+ gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+ gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint16Array([1,2,3,4]));
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.DYNAMIC_DRAW);
+ gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+ gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint16Array([1,2,3,4]));
+ assertEquals(gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE), 12*2);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint8Array(data), gl.DYNAMIC_DRAW);
+ gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 4, new Uint8Array([1,1,1,1]));
+ gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint8Array([1,2,3,4]));
+ assertEquals(gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE), 12);
+ throwError(gl, "element array bufferSubData");
+}
+
+Tests.endUnit = function(gl, buf, ebuf) {
+ gl.deleteBuffer(buf);
+ gl.deleteBuffer(ebuf);
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html
new file mode 100644
index 000000000..f7a3b7455
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var buf = gl.createBuffer();
+ var ebuf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ebuf);
+ return [gl, buf, ebuf];
+}
+
+Tests.testBufferData = function(gl) {
+ var data = [0,0,0,0, 1,0,0,0, 0,1,0,0];
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STREAM_DRAW);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.STREAM_DRAW);
+ assertOk("zero length data",
+ function(){gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array(0));});
+ assertFail("number for data",
+ function(){gl.bufferSubData(gl.ARRAY_BUFFER, 0, 12);});
+ assertFail("bad target",
+ function(){gl.bufferSubData(gl.TEXTURE_2D, 0, new Float32Array([1,2,3]));});
+ assertFail("array for data",
+ function(){gl.bufferSubData(gl.ARRAY_BUFFER, 0, [1,2,3]);});
+ assertOk("floats in element buffer",
+ function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Float32Array([1,2,3]));});
+ assertFail("negative offset",
+ function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, -1, new Uint16Array([1,2,3]));});
+ assertFail("offset out of range",
+ function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 24, new Uint16Array([1,2,3]));});
+ assertFail("offset out of range",
+ function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 2400000, new Uint16Array([1,2,3]));});
+ assertFail("offset out of range",
+ function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 19, new Uint16Array([1,2,3]));});
+ assertFail("data too large",
+ function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint16Array(data.concat([1])));});
+ assertOk("offset + data too large",
+ function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 18, new Uint16Array([1,2,3]));});
+ assertOk("good args",
+ function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint16Array([1,2,3]));});
+ throwError(gl, 'bufferData0');
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ assertFail("setting buffer 0",
+ function(){gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3]));});
+ throwError(gl, 'bufferData1');
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+ assertFail("setting buffer 0",
+ function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint16Array([1,2,3]));});
+ throwError(gl, 'bufferData2');
+}
+
+Tests.endUnit = function(gl, buf, ebuf) {
+ gl.deleteBuffer(buf);
+ gl.deleteBuffer(ebuf);
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2D.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2D.html
new file mode 100644
index 000000000..dea4dbd6b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2D.html
@@ -0,0 +1,132 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.setup = function(gl) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ var texCubeMap = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCubeMap);
+ return [gl]
+}
+
+Tests.teardown = function(gl,tex, texCubeMap) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);
+ gl.deleteTexture(tex);
+ gl.deleteTexture(texCubeMap);
+}
+
+Tests.testTexImage2D = function(gl) {
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0,1,1,0);
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0,2,1,0);
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0,1,2,0);
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0,16,16,0);
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 15,15,1,1,0);
+ var valid_targets = [
+ gl.TEXTURE_2D,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+ ];
+ valid_targets.forEach(function(t) {
+ assertOk(function(){gl.copyTexImage2D(t, 0, gl.RGBA, 0,0,1,1,0);});
+ });
+}
+Tests.testRoundtrip = function(gl) {
+ var sh = new Filter(gl, 'identity-flip-vert', 'identity-frag');
+ gl.clearColor(1.0, 0.0, 0.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ var buf = new Uint8Array(4);
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ assertEquals([255,0,0,255], [buf[0], buf[1], buf[2], buf[3]]);
+ // red texture
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0,16,16,0);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.clearColor(0.0, 0.0, 1.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ // blue framebuffer
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ assertEquals([0,0,255,255], [buf[0], buf[1], buf[2], buf[3]]);
+ sh.apply(); // paint it with texture
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ assertEquals([255,0,0,255], [buf[0], buf[1], buf[2], buf[3]]);
+ sh.destroy();
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<script id="identity-flip-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(Tex.s, 1.0-Tex.t, 0.0, 0.0);
+ gl_Position = vec4(Vertex, 1.0);
+}
+</script>
+<script id="identity-frag" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform sampler2D Texture;
+
+varying vec4 texCoord0;
+void main()
+{
+ vec4 c = texture2D(Texture, texCoord0.st);
+ gl_FragColor = c;
+}
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2DBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2DBadArgs.html
new file mode 100644
index 000000000..d50d9612d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2DBadArgs.html
@@ -0,0 +1,111 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.setup = function(gl) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ return [gl]
+}
+
+Tests.teardown = function(gl,tex) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.deleteTexture(tex);
+}
+
+Tests.testTexImage2D = function(gl) {
+ assertOk("height > backHeight", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0, 17,1,0);
+ });
+ assertOk("width > backWidth", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0, 1,17,0);
+ });
+ assertOk("x + width > backWidth", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 16,0, 1,1,0);
+ });
+ assertOk("y + height > backHeight", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,16, 1,1,0);
+ });
+ assertOk("Negative X", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, -1,0, 1,1,0);
+ });
+ assertOk("Negative Y", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,-1, 1,1,0);
+ });
+ assertFail("Negative height", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0, -1,1,0);
+ });
+ assertFail("Negative width", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0, 1,-1,0);
+ });
+ assertFail("Non 0 border", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0, 1,1,1);
+ });
+ assertFail("Negative border",function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0, 1,1,-1);
+ });
+ assertOk("Good Args", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0, 16,16,0);
+ });
+ assertFail("NPOT texture to > level 0", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 1, gl.RGBA, 0,0, 15,16,0);
+ });
+ assertFail("Bad target", function(){
+ gl.copyTexImage2D(gl.FLOAT, 0, gl.RGBA, 0,0, 16,16,0);
+ });
+ assertFail("Bad internal format", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.FLOAT, 0,0, 16,16,0);
+ });
+ assertFail("Negative level", function(){
+ gl.copyTexImage2D(gl.TEXTURE_2D, -1, gl.RGBA, 0,0, 16,16,0);
+ });
+}
+
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2D.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2D.html
new file mode 100644
index 000000000..4a53fce00
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2D.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.setup = function(gl) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ var texCubeMap = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCubeMap);
+ return [gl]
+}
+
+Tests.teardown = function(gl,tex,texCubeMap) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);
+ gl.deleteTexture(tex);
+ gl.deleteTexture(texCubeMap);
+}
+
+
+Tests.testTexImage2D = function(gl) {
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0,16,16,0);
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 0,0,1,1);
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 0,0,2,1);
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 0,0,1,2);
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 0,0,16,16);
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 15,15,1,1);
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 1,1, 0,0,15,15);
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 15,15, 0,0,1,1);
+ var valid_targets = [
+ gl.TEXTURE_2D,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+ ];
+ valid_targets.forEach(function(t) {
+ assertOk(function(){
+ gl.copyTexImage2D(t, 0, gl.RGBA, 0,0,1,1,0);
+ gl.copyTexSubImage2D(t, 0, 0,0,0,0,1,1);
+ });
+ });
+}
+Tests.testRoundtrip = function(gl) {
+ var sh = new Filter(gl, 'identity-flip-vert', 'identity-frag');
+ gl.clearColor(1.0, 0.0, 0.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ var buf = new Uint8Array(4);
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ assertEquals([255,0,0,255], [buf[0], buf[1], buf[2], buf[3]]);
+ // red texture
+ gl.clearColor(0.0, 0.0, 0.0, 0.0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, document.getElementById('gl'));
+ gl.clearColor(1.0, 0.0, 0.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0,0,0,16,16);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.clearColor(0.0, 0.0, 1.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ // blue framebuffer
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ assertEquals([0,0,255,255], [buf[0], buf[1], buf[2], buf[3]]);
+ sh.apply(); // paint with texture
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ assertEquals([255,0,0,255], [buf[0], buf[1], buf[2], buf[3]]);
+ sh.destroy();
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<script id="identity-flip-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(Tex.s, 1.0-Tex.t, 0.0, 0.0);
+ gl_Position = vec4(Vertex, 1.0);
+}
+</script>
+<script id="identity-frag" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform sampler2D Texture;
+
+varying vec4 texCoord0;
+void main()
+{
+ vec4 c = texture2D(Texture, texCoord0.st);
+ gl_FragColor = c;
+}
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2DBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2DBadArgs.html
new file mode 100644
index 000000000..a0aa24488
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2DBadArgs.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.setup = function(gl) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ return [gl]
+}
+
+Tests.teardown = function(gl,tex) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.deleteTexture(tex);
+}
+
+Tests.testTexImage2D = function(gl) {
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0, 16,16, 0);
+ assertGLError(gl, gl.INVALID_VALUE, "width > dst tex width", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 0,0, 17,1);
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "height > dst tex height", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 0,0, 1,17);
+ });
+ // The spec says the source image dimensions can be out of range.
+ assertOk("x > dst tex width", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 16,0, 1,1);
+ });
+ assertOk("y > dst tex height", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 0,16, 1,1);
+ });
+ assertOk("x < 0", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, -1,0, 1,1);
+ });
+ assertOk("y < 0", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 0,-1, 1,1);
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "width < 0", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 0,0, -1,1);
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "height < 0", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 0,0, 1,-1);
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "xoffset < 0", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, -1,0, 0,0, 16,16);
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "yoffset < 0", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,-1, 0,0, 16,16);
+ });
+ assertOk("x < 0 full width", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, -1,0, 16,16);
+ });
+ assertOk("y < 0 full height", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 0,-1, 16,16);
+ });
+ assertOk(function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0,0, 0,0, 16,16);
+ });
+ assertGLError(gl, gl.INVALID_ENUM, "bad target", function(){
+ gl.copyTexSubImage2D(gl.FLOAT, 0, 0,0, 0,0, 16,16);
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "", function(){
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, -1, 0,0, 0,0, 16,16);
+ });
+}
+
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/deleteBufferBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/deleteBufferBadArgs.html
new file mode 100644
index 000000000..a984ffd1a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/deleteBufferBadArgs.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = getGLContext(canvas);
+ return [gl];
+}
+
+Tests.testDeleteBuffer = function(gl) {
+ assertThrowNoGLError(gl, "number ", function(){ gl.deleteBuffer(1); });
+ assertGLError(gl, gl.NO_ERROR, "null", function(){ gl.deleteBuffer(null); });
+ assertThrowNoGLError(gl, "0", function(){ gl.deleteBuffer(0); });
+ assertThrowNoGLError(gl, "false", function(){ gl.deleteBuffer(false); });
+ assertThrowNoGLError(gl, "true", function(){ gl.deleteBuffer(true); });
+ assertThrowNoGLError(gl, "{}", function(){ gl.deleteBuffer({}); });
+ var tex = gl.createTexture();
+ assertThrowNoGLError(gl, "tex as buf", function(){ gl.deleteBuffer(tex); });
+ var buf = gl.createBuffer();
+ assertOk(function(){ gl.deleteBuffer(buf); });
+ assertOk(function(){ gl.deleteBuffer(buf); });
+ assertOk(function(){ gl.deleteBuffer(buf); });
+ assertOk(function(){ gl.deleteTexture(tex); });
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html
new file mode 100644
index 000000000..fc4f1e182
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html
@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+var verts = [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0];
+var normals = [0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0];
+var texcoords = [0.0,0.0, 1.0,0.0, 0.0,1.0];
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var prog = new Shader(gl, 'vert', 'frag');
+ prog.use();
+ var sh = prog.shader.program;
+// log(gl.getShaderInfoLog(prog.shaders[1]));
+ var v = gl.getAttribLocation(sh, 'Vertex');
+ var n = gl.getAttribLocation(sh, 'Normal');
+ var t = gl.getAttribLocation(sh, 'Tex');
+ return [gl,prog,v,n,t];
+}
+
+Tests.setup = function(gl, prog, v,n,t) {
+ assert(0 == gl.getError());
+ return [gl, prog, v,n,t];
+}
+Tests.teardown = function(gl, prog, v,n,t) {
+ gl.disableVertexAttribArray(v);
+ gl.disableVertexAttribArray(n);
+ gl.disableVertexAttribArray(t);
+}
+
+Tests.endUnit = function(gl, prog, v,n,t) {
+ prog.destroy();
+}
+
+Tests.testDrawArraysVBO = function(gl, prog, v,n,t) {
+ var vbo = new VBO(gl, {size:3, data:Quad.vertices});
+ vbo.draw(v);
+ assert(0 == checkError(gl, "vbo.draw"));
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 5, 1);});
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 0, 2);});
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 0, 6);});
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 1, 5);});
+ vbo.destroy();
+ assert(0 == checkError(gl, "vbo.destroy"));
+}
+
+Tests.testDrawArraysVBOMulti = function(gl, prog, v,n,t) {
+ // creates VBOs for the quad arrays, binds them with
+ // vertexAttribPointer and calls drawArrays
+ var vbo = new VBO(gl,
+ {size:3, data:Quad.vertices},
+ {size:3, data:Quad.normals},
+ {size:2, data:Quad.texcoords});
+ vbo.draw(v, n, t);
+ assert(0 == checkError(gl, "vbo.draw"));
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 5, 1);});
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 0, 2);});
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 0, 6);});
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 1, 5);});
+ assertFail(function(){gl.drawArrays(gl.TRIANGLES, 1, 6);});
+ assertFail(function(){gl.drawArrays(gl.TRIANGLES, 6, 1);});
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo.vbos[1]);
+ gl.vertexAttribPointer(n, 3, gl.FLOAT, false, 0, 0);
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 5, 1);});
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 0, 2);});
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 0, 6);});
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 1, 5);});
+ assertFail(function(){gl.drawArrays(gl.TRIANGLES, 1, 6);});
+ assertFail(function(){gl.drawArrays(gl.TRIANGLES, 6, 1);});
+ vbo.destroy();
+ assert(0 == checkError(gl, "vbo.destroy"));
+}
+
+
+</script>
+<script id="vert" type="x-shader/x-vertex">
+ attribute vec3 Vertex;
+ attribute vec3 Normal;
+ attribute vec2 Tex;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ gl_Position = vec4(Vertex * Normal, 1.0);
+ texCoord0 = vec4(Tex,0.0,0.0) + gl_Position;
+ }
+</script>
+<script id="frag" type="x-shader/x-fragment">
+ precision mediump float;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ vec4 c = texCoord0;
+ gl_FragColor = c;
+ }
+</script>
+
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html
new file mode 100644
index 000000000..168dfa0a7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html
@@ -0,0 +1,307 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+var verts = [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0];
+var normals = [0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0];
+var texcoords = [0.0,0.0, 1.0,0.0, 0.0,1.0];
+
+var vertsA = new Float32Array(verts);
+var normalsA = new Float32Array(normals);
+var texcoordsA = new Float32Array(texcoords);
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var prog = new Shader(gl, 'vert', 'frag');
+ prog.use();
+ var v = prog.attrib('Vertex');
+ var n = prog.attrib('Normal');
+ var t = prog.attrib('Tex');
+ return [gl,prog,v,n,t];
+}
+
+Tests.setup = function(gl, prog, v,n,t) {
+ return [gl, prog, v,n,t];
+}
+Tests.teardown = function(gl, prog, v,n,t) {
+ gl.disableVertexAttribArray(v);
+ gl.disableVertexAttribArray(n);
+ gl.disableVertexAttribArray(t);
+}
+
+Tests.endUnit = function(gl, prog, v,n,t) {
+ prog.destroy();
+}
+
+Tests.testDrawArraysEmpty = function(gl, prog, v,n,t) {
+ var b = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, b);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([]), gl.STATIC_DRAW);
+ assertOk(function(){gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);})
+ gl.enableVertexAttribArray(v);
+ assertGLError(gl, gl.INVALID_OPERATION, "zero size array",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 1);});
+ gl.deleteBuffer(b);
+}
+
+Tests.testDrawArraysOutOfBounds = function(gl, prog, v,n,t) {
+ var b = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, b);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([]), gl.STATIC_DRAW);
+ assertOk(function(){gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);});
+ gl.enableVertexAttribArray(v);
+ assertGLError(gl, gl.INVALID_OPERATION, "zero size array",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 1);});
+ assertGLError(gl, gl.INVALID_OPERATION, "zero size array 10000",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 10000);});
+ assertGLError(gl, gl.INVALID_OPERATION, "zero size array 10000000000000",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 10000000000000);});
+ assertGLError(gl, gl.INVALID_OPERATION, "zero size array fraction",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 1.6);});
+ assertGLError(gl, gl.INVALID_VALUE, "negative offset",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, -1);});
+ assertGLError(gl, gl.INVALID_OPERATION, "count out of range",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 1);});
+ assertGLError(gl, gl.INVALID_VALUE, "negative count",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, -1);});
+ assertGLError(gl, gl.INVALID_VALUE, "positive count, negative offset",
+ function(){gl.drawArrays(gl.TRIANGLES, -1, 1);});
+ assertGLError(gl, gl.INVALID_VALUE, "negative count, positive offset",
+ function(){gl.drawArrays(gl.TRIANGLES, 1, -1);});
+ gl.deleteBuffer(b);
+}
+
+
+Tests.testDrawArraysWithDataOutOfBounds = function(gl, prog, v,n,t) {
+ var b = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, b);
+ gl.bufferData(gl.ARRAY_BUFFER, vertsA, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(v);
+ assertGLError(gl, gl.INVALID_OPERATION, "3 element array",
+ function(){gl.drawArrays(gl.TRIANGLES, 3, 2);});
+ assertGLError(gl, gl.INVALID_OPERATION, "3 element array 10000",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 10000);});
+ assertGLError(gl, gl.INVALID_OPERATION, "3 element array 10000000000000",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 10000000000000);});
+ assertGLError(gl, gl.INVALID_OPERATION, "fractional count",
+ function(){gl.drawArrays(gl.TRIANGLES, 3, 1.6);});
+ assertGLError(gl, gl.INVALID_VALUE, "negative offset",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, -1);});
+ assertGLError(gl, gl.INVALID_OPERATION, "count out of range",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 4);});
+ assertGLError(gl, gl.INVALID_VALUE, "negative count",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, -1);});
+ assertGLError(gl, gl.INVALID_VALUE, "positive count, negative offset",
+ function(){gl.drawArrays(gl.TRIANGLES, -1, 2);});
+ assertGLError(gl, gl.INVALID_VALUE, "negative count, positive offset",
+ function(){gl.drawArrays(gl.TRIANGLES, 1, -1);});
+ gl.deleteBuffer(b);
+}
+
+Tests.testDrawArraysMultiOutOfBounds = function(gl, prog, v,n,t) {
+ var bs = [];
+ bs.push(gl.createBuffer());
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[bs.length-1]);
+ gl.bufferData(gl.ARRAY_BUFFER, vertsA, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ bs.push(gl.createBuffer());
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[bs.length-1]);
+ gl.bufferData(gl.ARRAY_BUFFER, normalsA, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(n, 3, gl.FLOAT, false, 0, 0);
+ bs.push(gl.createBuffer());
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[bs.length-1]);
+ gl.bufferData(gl.ARRAY_BUFFER, texcoordsA, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(t, 2, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(v);
+ gl.enableVertexAttribArray(n);
+ gl.enableVertexAttribArray(t);
+ assertGLError(gl, gl.INVALID_OPERATION, "multi array 1",
+ function(){gl.drawArrays(gl.TRIANGLES, 3, 2);});
+ bs.push(gl.createBuffer());
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[bs.length-1]);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(verts.concat(verts)), gl.STATIC_DRAW);
+ bs.push(gl.createBuffer());
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[bs.length-1]);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(texcoords.concat(texcoords)), gl.STATIC_DRAW);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[1]);
+ gl.vertexAttribPointer(n, 3, gl.FLOAT, false, 0, 0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[2]);
+ gl.vertexAttribPointer(t, 2, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(v);
+ gl.enableVertexAttribArray(n);
+ gl.enableVertexAttribArray(t);
+ assertGLError(gl, gl.INVALID_OPERATION, "multi array 2",
+ function(){gl.drawArrays(gl.TRIANGLES, 3, 2);});
+ assertGLError(gl, gl.INVALID_OPERATION, "multi array 3",
+ function(){gl.drawArrays(gl.TRIANGLES, 4, 2);});
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[0]);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[3]);
+ gl.vertexAttribPointer(n, 3, gl.FLOAT, false, 0, 0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[2]);
+ gl.vertexAttribPointer(t, 2, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(v);
+ gl.enableVertexAttribArray(n);
+ gl.enableVertexAttribArray(t);
+ assertGLError(gl, gl.INVALID_OPERATION, "multi array 4",
+ function(){gl.drawArrays(gl.TRIANGLES, 3, 2);});
+ assertGLError(gl, gl.INVALID_OPERATION, "multi array 5",
+ function(){gl.drawArrays(gl.TRIANGLES, 4, 2);});
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[0]);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[1]);
+ gl.vertexAttribPointer(n, 3, gl.FLOAT, false, 0, 0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[4]);
+ gl.vertexAttribPointer(t, 2, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(v);
+ gl.enableVertexAttribArray(n);
+ gl.enableVertexAttribArray(t);
+ assertGLError(gl, gl.INVALID_OPERATION, "multi array 6",
+ function(){gl.drawArrays(gl.TRIANGLES, 3, 2);});
+ assertGLError(gl, gl.INVALID_OPERATION, "multi array 7",
+ function(){gl.drawArrays(gl.TRIANGLES, 3, 2);});
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[3]);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[3]);
+ gl.vertexAttribPointer(n, 3, gl.FLOAT, false, 0, 0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, bs[2]);
+ gl.vertexAttribPointer(t, 2, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(v);
+ gl.enableVertexAttribArray(n);
+ gl.enableVertexAttribArray(t);
+ assertGLError(gl, gl.INVALID_OPERATION, "multi array 8",
+ function(){gl.drawArrays(gl.TRIANGLES, 4, 1);});
+ assertGLError(gl, gl.INVALID_VALUE, "negative count",
+ function(){gl.drawArrays(gl.TRIANGLES, -1, 2);});
+ assertGLError(gl, gl.INVALID_OPERATION, "zero count???",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 4);});
+ assertGLError(gl, gl.INVALID_OPERATION, "multi array 9",
+ function(){gl.drawArrays(gl.TRIANGLES, 1, 4);});
+ bs.forEach(function(b){ gl.deleteBuffer(b) });
+}
+
+
+Tests.testDrawArraysVBOOutOfBounds = function(gl, prog, v,n,t) {
+ var vbo = new VBO(gl, {size:3, data:Quad.vertices});
+ vbo.use(v);
+ assertGLError(gl, gl.INVALID_OPERATION, "1",
+ function(){gl.drawArrays(gl.TRIANGLES, 6, 1);});
+ assertGLError(gl, gl.INVALID_VALUE, "negative count",
+ function(){gl.drawArrays(gl.TRIANGLES, 2, -1);});
+ assertGLError(gl, gl.INVALID_OPERATION, "3",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 7);});
+ assertGLError(gl, gl.INVALID_OPERATION, "4",
+ function(){gl.drawArrays(gl.TRIANGLES, 1, 6);});
+ vbo.destroy();
+}
+
+Tests.testDrawArraysVBOMultiOutOfBounds = function(gl, prog, v,n,t) {
+ // creates VBOs for the quad arrays, binds them with
+ // vertexAttribPointer and calls drawArrays
+ var vbo = new VBO(gl,
+ {size:3, data:Quad.vertices},
+ {size:3, data:Quad.normals},
+ {size:2, data:Quad.texcoords});
+ vbo.use(v, n, t);
+ assertGLError(gl, gl.INVALID_OPERATION, "1",
+ function(){gl.drawArrays(gl.TRIANGLES, 6, 1);});
+ assertGLError(gl, gl.INVALID_VALUE, "negative count",
+ function(){gl.drawArrays(gl.TRIANGLES, 2, -1);});
+ assertGLError(gl, gl.INVALID_OPERATION, "2",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 7);});
+ assertGLError(gl, gl.INVALID_OPERATION, "3",
+ function(){gl.drawArrays(gl.TRIANGLES, 1, 6);});
+ vbo.destroy();
+}
+
+Tests.testDrawArraysOOBShaderJuggle = function(gl, prog, v,n,t) {
+ var vbo = new VBO(gl,
+ {size:3, data:[0,0,0]},
+ {size:3, data:[0,0,0,0,0,0]});
+ vbo.init();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo.vbos[0]);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(v);
+ assertGLError(gl, gl.INVALID_OPERATION, "offset too big",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 2);});
+ var sh2 = new Shader(gl, 'vert', 'frag');
+ sh2.use();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo.vbos[1]);
+ gl.vertexAttribPointer(sh2.attrib('Vertex'), 3, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(sh2.attrib('Vertex'));
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 0, 2);});
+ assertGLError(gl, gl.INVALID_OPERATION, "offset too big 2",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 3);});
+ prog.use();
+ gl.vertexAttribPointer(prog.attrib('Vertex'), 3, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(prog.attrib('Vertex'));
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 0, 2);});
+ assertGLError(gl, gl.INVALID_OPERATION, "offset too big 3",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 3);});
+ sh2.destroy();
+}
+
+</script>
+<script id="vert" type="x-shader/x-vertex">
+ attribute vec3 Vertex;
+ attribute vec3 Normal;
+ attribute vec2 Tex;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ gl_Position = vec4(Vertex * Normal, 1.0);
+ texCoord0 = vec4(Tex,0.0,0.0) + gl_Position;
+ }
+</script>
+<script id="frag" type="x-shader/x-fragment">
+ precision mediump float;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ gl_FragColor = texCoord0;
+ }
+</script>
+
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawElements.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawElements.html
new file mode 100644
index 000000000..8a24db399
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawElements.html
@@ -0,0 +1,145 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+var verts = [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0];
+var normals = [0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0];
+var texcoords = [0.0,0.0, 1.0,0.0, 0.0,1.0];
+var indices = [0,1,2]
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var prog = new Shader(gl, 'vert', 'frag');
+ prog.use();
+ var sh = prog.shader.program;
+ var v = gl.getAttribLocation(sh, 'Vertex');
+ var n = gl.getAttribLocation(sh, 'Normal');
+ var t = gl.getAttribLocation(sh, 'Tex');
+ return [gl,prog,v,n,t];
+}
+
+Tests.setup = function(gl, prog, v,n,t) {
+ assert(0 == gl.getError());
+ return [gl, prog, v,n,t];
+}
+Tests.teardown = function(gl, prog, v,n,t) {
+ gl.disableVertexAttribArray(v);
+ gl.disableVertexAttribArray(n);
+ gl.disableVertexAttribArray(t);
+}
+
+Tests.endUnit = function(gl, prog, v,n,t) {
+ prog.destroy();
+}
+
+Tests.testDrawElementsVBO = function(gl, prog, v,n,t) {
+ var vbo = new VBO(gl,
+ {size:3, data:Quad.vertices},
+ {elements:true, data:Quad.indices});
+ vbo.draw(v);
+ assert(gl.NO_ERROR == checkError(gl, "vbo.draw"));
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 5, gl.UNSIGNED_SHORT, 1*2);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0*2);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 0, gl.UNSIGNED_SHORT, 2*1);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_SHORT, 5*2);});
+ vbo.destroy();
+ assert(gl.NO_ERROR == checkError(gl, "vbo.destroy"));
+}
+
+Tests.testDrawElementsVBOMulti = function(gl, prog, v,n,t) {
+ // creates VBOs for the quad arrays, binds them with
+ // vertexAttribPointer and calls drawElements
+ var vbo = new VBO(gl,
+ {size:3, data:Quad.vertices},
+ {size:3, data:Quad.normals},
+ {size:2, data:Quad.texcoords},
+ {elements:true, data:Quad.indices});
+ vbo.draw(v, n, t);
+ assert(gl.NO_ERROR == checkError(gl, "vbo.draw"));
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 5, gl.UNSIGNED_SHORT, 1*2);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 0, gl.UNSIGNED_SHORT, 2*2);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0*2);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_SHORT, 5*2);});
+ assertGLError(gl, gl.INVALID_OPERATION, "count + offset out of range",
+ function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_SHORT, 6*2);});
+ assertGLError(gl, gl.INVALID_OPERATION, "count + offset out of range 2",
+ function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 1*2);});
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo.vbos[1]);
+ gl.vertexAttribPointer(n, 3, gl.FLOAT, false, 0, 0);
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 5, gl.UNSIGNED_SHORT, 1*2);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 0, gl.UNSIGNED_SHORT, 2*2);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0*2);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_SHORT, 5*2);});
+ assertGLError(gl, gl.INVALID_OPERATION, "count + offset out of range 3",
+ function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_SHORT, 6*2);});
+ assertGLError(gl, gl.INVALID_OPERATION, "count + offset out of range 4",
+ function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 1*2);});
+ vbo.destroy();
+ assert(gl.NO_ERROR == checkError(gl, "vbo.destroy"));
+}
+
+
+</script>
+<script id="vert" type="x-shader/x-vertex">
+ attribute vec3 Vertex;
+ attribute vec3 Normal;
+ attribute vec2 Tex;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ gl_Position = vec4(Vertex * Normal, 1.0);
+ texCoord0 = vec4(Tex,0.0,0.0) + gl_Position;
+ }
+</script>
+<script id="frag" type="x-shader/x-fragment">
+ precision mediump float;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ vec4 c = texCoord0;
+ gl_FragColor = c;
+ }
+</script>
+
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html
new file mode 100644
index 000000000..1a4256e94
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html
@@ -0,0 +1,211 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+// Tests.autorun = false;
+// Tests.message = "Caution: May crash your browser";
+
+var verts = [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0];
+var normals = [0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0];
+var texcoords = [0.0,0.0, 1.0,0.0, 0.0,1.0];
+var indices = [60000000,1,2]
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var prog = new Shader(gl, 'vert', 'frag');
+ prog.use();
+ var sh = prog.shader.program;
+ var v = gl.getAttribLocation(sh, 'Vertex');
+ var n = gl.getAttribLocation(sh, 'Normal');
+ var t = gl.getAttribLocation(sh, 'Tex');
+ return [gl,prog,v,n,t];
+}
+
+Tests.setup = function(gl, prog, v,n,t) {
+ assert(0 == gl.getError());
+ return [gl, prog, v,n,t];
+}
+Tests.teardown = function(gl, prog, v,n,t) {
+ gl.disableVertexAttribArray(v);
+ gl.disableVertexAttribArray(n);
+ gl.disableVertexAttribArray(t);
+}
+
+Tests.endUnit = function(gl, prog, v,n,t) {
+ prog.destroy();
+}
+
+
+Tests.testDrawElementsVBO = function(gl, prog, v,n,t) {
+ var vbo = new VBO(gl,
+ {size:3, data:Quad.vertices},
+ {elements:true, data:[0,1,2,2000, 40802, 5887992]});
+ assertFail(function(){vbo.draw(v);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_SHORT, 5*2);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 5, gl.UNSIGNED_SHORT, 1);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 5, gl.UNSIGNED_SHORT, 1*2);});
+ vbo.destroy();
+ assert(gl.NO_ERROR == checkError(gl, "vbo.destroy"));
+}
+
+Tests.testDrawElementsVBOByte = function(gl, prog, v,n,t) {
+ var vbo = new VBO(gl,
+ {size:3, data:Quad.vertices},
+ {elements:true, type:gl.UNSIGNED_BYTE, data:[0,1,2,2000, 40802, 5887992]});
+ assertFail(function(){vbo.draw(v);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_BYTE, 5);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_BYTE, 0);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_BYTE, 0);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 5, gl.UNSIGNED_BYTE, 1);});
+ vbo.destroy();
+ assert(gl.NO_ERROR == checkError(gl, "vbo.destroy"));
+}
+
+Tests.testDrawElementsVBOMulti = function(gl, prog, v,n,t) {
+ // creates VBOs for the quad arrays, binds them with
+ // vertexAttribPointer and calls drawElements
+ // The quad has 6 vertices
+ var vbo = new VBO(gl,
+ {size:3, data:Quad.vertices},
+ {size:3, data:Quad.normals},
+ {size:2, data:Quad.texcoords},
+ {elements:true, data:[0,1,2,6,2000, 256]});
+ assertFail(function(){vbo.draw(v, n, t);});
+ gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0);
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_SHORT, 5*2);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 2, gl.UNSIGNED_SHORT, 0);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 4, gl.UNSIGNED_SHORT, 0);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 1*2);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 2, gl.UNSIGNED_SHORT, 2*2);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_SHORT, 3*2);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 5, gl.UNSIGNED_SHORT, 1*2);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 1*2);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 1);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_SHORT, 6*2);});
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo.vbos[1]);
+ gl.vertexAttribPointer(n, 3, gl.FLOAT, false, 0, 0);
+ gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0);
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_SHORT, 5*2);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 5, gl.UNSIGNED_SHORT, 1*2);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 1*2);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 1);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_SHORT, 6*2);});
+ vbo.destroy();
+ assert(gl.NO_ERROR == checkError(gl, "vbo.destroy"));
+}
+
+Tests.testDrawElementsVBOMultiByte = function(gl, prog, v,n,t) {
+ // creates VBOs for the quad arrays, binds them with
+ // vertexAttribPointer and calls drawElements
+ // The quad has 6 vertices
+ var vbo = new VBO(gl,
+ {size:3, data:Quad.vertices},
+ {size:3, data:Quad.normals},
+ {size:2, data:Quad.texcoords},
+ {elements:true, type:gl.UNSIGNED_BYTE, data:[0,1,2,6,2000, 256]});
+ assertFail(function(){vbo.draw(v, n, t);});
+ gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_BYTE, 0);
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 4, gl.UNSIGNED_BYTE, -1);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, -1, gl.UNSIGNED_BYTE, 0);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_BYTE, 5);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_BYTE, 0);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 2, gl.UNSIGNED_BYTE, 0);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_BYTE, 0);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 4, gl.UNSIGNED_BYTE, 0);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_BYTE, 1);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 2, gl.UNSIGNED_BYTE, 2);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_BYTE, 3);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 5, gl.UNSIGNED_BYTE, 1);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_BYTE, 1);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_BYTE, 6);});
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo.vbos[1]);
+ gl.vertexAttribPointer(n, 3, gl.FLOAT, false, 0, 0);
+ gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_BYTE, 0);
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_BYTE, 5);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_BYTE, 0);});
+ assertOk(function(){gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_BYTE, 0);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 5, gl.UNSIGNED_BYTE, 1);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_BYTE, 1);});
+ assertFail(function(){gl.drawElements(gl.TRIANGLES, 1, gl.UNSIGNED_BYTE, 6);});
+ vbo.destroy();
+ assert(gl.NO_ERROR == checkError(gl, "vbo.destroy"));
+}
+
+Tests.testSharedBuffers = function(gl, prog, v,n,t) {
+ var vbo = gl.createBuffer();
+ var vertsArr = new Uint16Array([0,1,3,3,4,5,6,7,8]);
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ gl.bufferData(gl.ARRAY_BUFFER, vertsArr, gl.STATIC_DRAW);
+ assertFail(function(){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, vbo)});
+ gl.deleteBuffer(vbo);
+}
+
+</script>
+<script id="vert" type="x-shader/x-vertex">
+ attribute vec3 Vertex;
+ attribute vec3 Normal;
+ attribute vec2 Tex;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ gl_Position = vec4(Vertex * Normal, 1.0);
+ texCoord0 = vec4(Tex,0.0,0.0) + gl_Position;
+ }
+</script>
+<script id="frag" type="x-shader/x-fragment">
+ precision mediump float;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ vec4 c = texCoord0;
+ gl_FragColor = c;
+ }
+</script>
+
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/isTests.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/isTests.html
new file mode 100644
index 000000000..74d46542c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/isTests.html
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.testIs = function(gl) {
+ var tex = loadTexture(gl, document.getElementById('2d'));
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ var fbo = new FBO(gl, 1, 1);
+ fbo.use();
+ var prog = gl.createProgram();
+ var sh1 = gl.createShader(gl.VERTEX_SHADER);
+ var sh2 = gl.createShader(gl.FRAGMENT_SHADER);
+ var buf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ assert("tex", gl.isTexture(tex));
+ assert("fbo", gl.isFramebuffer(fbo.fbo));
+ assert("rbo", gl.isRenderbuffer(fbo.rbo));
+ assert("prog", gl.isProgram(prog));
+ assert("sh1", gl.isShader(sh1));
+ assert("sh2", gl.isShader(sh2));
+ assert("buf", gl.isBuffer(buf));
+ gl.deleteTexture(tex);
+ gl.deleteFramebuffer(fbo.fbo);
+ gl.deleteRenderbuffer(fbo.rbo);
+ gl.deleteProgram(prog);
+ gl.deleteShader(sh1);
+ gl.deleteShader(sh2);
+ gl.deleteBuffer(buf);
+ // NOTE: we purposely do not unbind things.
+ assert("tex", !gl.isTexture(tex));
+ assert("fbo", !gl.isFramebuffer(fbo.fbo));
+ assert("rbo", !gl.isRenderbuffer(fbo.rbo));
+ assert("prog", !gl.isProgram(prog));
+ assert("sh1", !gl.isShader(sh1));
+ assert("sh2", !gl.isShader(sh2));
+ assert("buf", !gl.isBuffer(buf));
+}
+
+</script>
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+ <canvas id="2d" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/isTestsBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/isTestsBadArgs.html
new file mode 100644
index 000000000..f06da4caa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/isTestsBadArgs.html
@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../../conformance/resources/webgl-test-utils.js"></script>
+
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas_element" width="1" height="1"></canvas>
+<script type="application/x-javascript">
+
+function runTest()
+{
+ shouldThrow("gl.isBuffer(gl.createFramebuffer())");
+ shouldThrow("gl.isBuffer(gl.createProgram())");
+ shouldThrow("gl.isBuffer(gl.createRenderbuffer())");
+ shouldThrow("gl.isBuffer(gl.createShader(gl.VERTEX_SHADER))");
+ shouldThrow("gl.isBuffer(gl.createTexture())");
+
+ shouldThrow("gl.isFramebuffer(gl.createBuffer())");
+ shouldThrow("gl.isFramebuffer(gl.createProgram())");
+ shouldThrow("gl.isFramebuffer(gl.createRenderbuffer())");
+ shouldThrow("gl.isFramebuffer(gl.createShader(gl.VERTEX_SHADER))");
+ shouldThrow("gl.isFramebuffer(gl.createTexture())");
+
+ shouldThrow("gl.isProgram(gl.createBuffer())");
+ shouldThrow("gl.isProgram(gl.createFramebuffer())");
+ shouldThrow("gl.isProgram(gl.createRenderbuffer())");
+ shouldThrow("gl.isProgram(gl.createShader(gl.VERTEX_SHADER))");
+ shouldThrow("gl.isProgram(gl.createTexture())");
+
+ shouldThrow("gl.isRenderbuffer(gl.createBuffer())");
+ shouldThrow("gl.isRenderbuffer(gl.createFramebuffer())");
+ shouldThrow("gl.isRenderbuffer(gl.createProgram())");
+ shouldThrow("gl.isRenderbuffer(gl.createShader(gl.VERTEX_SHADER))");
+ shouldThrow("gl.isRenderbuffer(gl.createTexture())");
+
+ shouldThrow("gl.isShader(gl.createBuffer())");
+ shouldThrow("gl.isShader(gl.createFramebuffer())");
+ shouldThrow("gl.isShader(gl.createProgram())");
+ shouldThrow("gl.isShader(gl.createRenderbuffer())");
+ shouldThrow("gl.isShader(gl.createTexture())");
+
+ shouldThrow("gl.isTexture(gl.createBuffer())");
+ shouldThrow("gl.isTexture(gl.createFramebuffer())");
+ shouldThrow("gl.isTexture(gl.createProgram())");
+ shouldThrow("gl.isTexture(gl.createRenderbuffer())");
+ shouldThrow("gl.isTexture(gl.createShader(gl.VERTEX_SHADER))");
+
+ shouldBe("gl.isBuffer(null)", "false");
+ shouldBe("gl.isBuffer(undefined)", "false");
+
+ shouldBe("gl.isFramebuffer(null)", "false");
+ shouldBe("gl.isFramebuffer(undefined)", "false");
+
+ shouldBe("gl.isProgram(null)", "false");
+ shouldBe("gl.isProgram(undefined)", "false");
+
+ shouldBe("gl.isRenderbuffer(null)", "false");
+ shouldBe("gl.isRenderbuffer(undefined)", "false");
+
+ shouldBe("gl.isShader(null)", "false");
+ shouldBe("gl.isShader(undefined)", "false");
+
+ shouldBe("gl.isTexture(null)", "false");
+ shouldBe("gl.isTexture(undefined)", "false");
+}
+
+description("Tests type checking for isX() functions");
+var gl = WebGLTestUtils.create3DContext(document.getElementById("canvas_element"));
+runTest();
+var successfullyParsed = true;
+</script>
+
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/readPixels.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/readPixels.html
new file mode 100644
index 000000000..a215be5bf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/readPixels.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.testReadPixels = function(gl) {
+ var id = new Uint8Array(16 * 16 * 4);
+ assertOk(function(){gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);});
+ assertOk(function(){gl.readPixels(0,0,16,16,gl.RGBA, gl.UNSIGNED_BYTE, id);});
+ assertOk(function(){gl.readPixels(15,15,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);});
+}
+Tests.testReadPixelsRGBA = function(gl) {
+ gl.clearColor(1, 0, 1, 0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ var id = new Uint8Array(4);
+ gl.readPixels(1,2,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+ assertArrayEquals([255, 0, 255, 0], id);
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/readPixelsBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/readPixelsBadArgs.html
new file mode 100644
index 000000000..6dc5c2bfd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/readPixelsBadArgs.html
@@ -0,0 +1,126 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="../../resources/webgl-test-utils.js"></script>
+<script type="application/x-javascript">
+var wtu = WebGLTestUtils;
+var defaultImgUrl = "http://www.opengl.org/img/opengl_logo.jpg";
+var localImgUrl = "../../resources/opengl_logo.jpg";
+
+Tests.autoinit = false; // Prevents the test from running until the image is loaded
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.testReadPixels = function(gl) {
+ // we can't know if this is going to fail because of negative width
+ // or because the buffer size doesn't match the dimensions.
+ assertSomeGLError(gl, "negative width",
+ function(){gl.readPixels(0,0,-1,1, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array(4));});
+ assertSomeGLError(gl, "negative height",
+ function(){gl.readPixels(0,0,1,-1, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array(4));});
+ assertOk("negative x",
+ function(){gl.readPixels(-1,0,1,1, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array(4));});
+ assertOk("negative y",
+ function(){gl.readPixels(0,-1,1,1, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array(4));});
+ assertOk("height > backbuffer height",
+ function(){gl.readPixels(0,0,16,17, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array(16*17*4));});
+ assertOk("width > backbuffer width",
+ function(){gl.readPixels(0,0,17,16, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array(17*16*4));});
+ assertOk("width, height = 0",
+ function(){gl.readPixels(0,0,0,0, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array(0));});
+ // we can't know if this is going to fail because of negative width
+ // or because the buffer size doesn't match the dimensions.
+ assertSomeGLError(gl, "bad format",
+ function(){gl.readPixels(0,0,1,1, gl.FLOAT, gl.UNSIGNED_BYTE,
+ new Uint8Array(4*4));});
+ // we can't know if this is going to fail because of negative width
+ // or because the buffer size doesn't match the dimensions.
+ assertSomeGLError(gl, "bad type",
+ function(){gl.readPixels(0,0,1,1, gl.ALPHA, gl.FLOAT,
+ new Uint8Array(1*4));});
+}
+
+Tests.testReadPixelsSOPIMG = function(gl) {
+ var img = document.getElementById("i");
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ // SOP failure
+ assertThrowNoGLError(gl, "throw because img is from another domain",
+ function(){gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, img);});
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ assertOk("canvas still origin-clean",
+ function(){gl.readPixels(0,0,1,1, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array(4));});
+ gl.deleteTexture(tex);
+}
+Tests.testReadPixelsSOPCanvas = function(gl) {
+ var img = document.getElementById("i");
+ var c = document.getElementById("c");
+ c.getContext("2d").drawImage(img, 0, 0);
+ assertFail("canvas throws because not origin clean",
+ function(){c.getContext("2d").getImageData(0,0,1,1);});
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ // SOP failure
+ assertThrowNoGLError(gl, "throw because canvas is not origin clean",
+ function(){gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);});
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ assertOk("canvas still origin-clean",
+ function(){gl.readPixels(0,0,1,1, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array(4));});
+ gl.deleteTexture(tex);
+}
+
+Tests.endUnit = function(gl) {
+}
+
+wtu.setupImageForCrossOriginTest("#i", defaultImgUrl, localImgUrl, initTests);
+</script>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+<canvas id="c" width="128" height="128"></canvas>
+<img id="i">
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2D.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2D.html
new file mode 100644
index 000000000..3e85be29c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2D.html
@@ -0,0 +1,88 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.setup = function(gl) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ var texCubeMap = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCubeMap);
+ return [gl]
+}
+
+Tests.teardown = function(gl,tex,texCubeMap) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);
+ gl.deleteTexture(tex);
+ gl.deleteTexture(texCubeMap);
+}
+
+Tests.testTexImage2D = function(gl) {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2,1,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0]));
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,2,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0]));
+ var valid_targets = [
+ gl.TEXTURE_2D,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+ ];
+ valid_targets.forEach(function(t) {
+ assertOk(function(){gl.texImage2D(t, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));});
+ });
+}
+
+Tests.testTexImage2DNull = function(gl) {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, null);
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DBadArgs.html
new file mode 100644
index 000000000..bf5b71279
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DBadArgs.html
@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.setup = function(gl) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ return [gl]
+}
+
+Tests.teardown = function(gl,tex) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.deleteTexture(tex);
+}
+
+Tests.testTexImage2D = function(gl) {
+ var data = new Uint8Array(4);
+ assertGLError(gl, gl.INVALID_OPERATION, "not enough data", function(){
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2,1,0,gl.RGBA,gl.UNSIGNED_BYTE, data);
+ });
+ assertGLError(gl, gl.INVALID_OPERATION, "not enough data", function(){
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,2,0,gl.RGBA,gl.UNSIGNED_BYTE, data);
+ });
+ assertGLError(gl, gl.INVALID_ENUM, "bad target", function(){
+ gl.texImage2D(gl.FLOAT, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, null);
+ });
+ assertGLErrorIn(gl, [gl.INVALID_ENUM, gl.INVALID_VALUE], "bad internal format/format", function(){
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.FLOAT, 1,1,0,gl.FLOAT,gl.UNSIGNED_BYTE, null);
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "border > 0", function(){
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,1,48,gl.RGBA,gl.UNSIGNED_BYTE, null);
+ });
+ // The spec says zero size is OK. If you disagree please list the section
+ // in the spec that details this issue.
+ assertOk("zero size", function(){
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0,0,0,gl.RGBA,gl.UNSIGNED_BYTE, null);
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "negative width", function(){
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, -1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, null);
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "negative height", function(){
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,-1,0,gl.RGBA,gl.UNSIGNED_BYTE, null);
+ });
+ assertGLError(gl, gl.INVALID_ENUM, "bad format", function(){
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,1,0,gl.FLOAT,gl.UNSIGNED_BYTE, null);
+ });
+ assertGLError(gl, gl.INVALID_ENUM, "bad type", function(){
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.TEXTURE_2D, null);
+ });
+ assertGLError(gl, gl.INVALID_OPERATION, "not enough data", function(){
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array(3));
+ });
+ assertGLError(gl, gl.INVALID_OPERATION, "format and type incompatible",function(){
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_SHORT_5_6_5, null);
+ });
+ assertGLError(gl, gl.INVALID_OPERATION, "format and type incompatible",function(){
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, 1,1,0,gl.RGB,gl.UNSIGNED_SHORT_4_4_4_4, null);
+ });
+}
+
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTML.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTML.html
new file mode 100644
index 000000000..22ddbed52
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTML.html
@@ -0,0 +1,161 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="../../resources/webgl-test-utils.js"></script>
+<script type="application/x-javascript">
+var wtu = WebGLTestUtils;
+var defaultImgUrl = "http://mashable.com/wp-content/uploads/2008/08/thunderbird-logo-64x64.png";
+var localImgUrl = "../../resources/thunderbird-logo-64x64.png";
+
+Tests.autoinit = false; // Prevents the test from running until the image is loaded
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ gl.viewport(0,0,canvas.width,canvas.height);
+ gl.clearColor(0,0,1,1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.disable(gl.DEPTH_TEST);
+ return [gl];
+}
+
+Tests.setup = function(gl) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ var texCubeMap = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCubeMap);
+ return [gl]
+}
+
+Tests.teardown = function(gl, tex, texCubeMap) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.deleteTexture(tex);
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);
+ gl.deleteTexture(texCubeMap);
+}
+
+Tests.testTexImage2D = function(gl) {
+ gl.enable(gl.BLEND);
+ var img = document.getElementById('i');
+ var c = document.getElementById('c');
+ var ctx = c.getContext('2d');
+ ctx.drawImage(img,0,0);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, img);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ var f = new Filter(gl, 'identity-flip-vert', 'identity-frag');
+ gl.blendFunc(gl.ONE, gl.ZERO);
+ f.apply();
+ f.destroy();
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);
+ f = new Filter(gl, 'identity-hflip-vert', 'identity-frag');
+ gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
+ f.apply();
+ f.destroy();
+ var valid_targets = [
+ gl.TEXTURE_2D,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+ ];
+ valid_targets.forEach(function(t) {
+ assertOk(function(){gl.texImage2D(t, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);});
+ assertOk(function(){gl.texImage2D(t, 1, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);});
+ });
+}
+
+Tests.testTexImage2DNonSOP = function(gl) {
+ var img = document.getElementById('i2');
+ while (!img.complete) {}
+ var c = document.getElementById('c');
+ var ctx = c.getContext('2d');
+ ctx.drawImage(img,0,0);
+ assertThrowNoGLError(gl, "texImage2D with cross-origin image should throw exception.",
+ function(){gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, img);});
+ assertThrowNoGLError(gl, "texImage2D with dirty origin canvas should throw exception.",
+ function(){gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);});
+}
+
+Tests.endUnit = function(gl) {
+}
+
+wtu.setupImageForCrossOriginTest("#i2", defaultImgUrl, localImgUrl, initTests);
+</script>
+<script id="identity-flip-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(Tex.s, 1.0-Tex.t, 0.0, 0.0);
+ gl_Position = vec4(Vertex, 1.0);
+}
+</script>
+<script id="identity-hflip-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(1.0-Tex.s, Tex.t, 0.0, 0.0);
+ gl_Position = vec4(Vertex, 1.0);
+}
+</script>
+<script id="identity-frag" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform sampler2D Texture;
+
+varying vec4 texCoord0;
+void main()
+{
+ vec4 c = texture2D(Texture, texCoord0.st);
+ gl_FragColor = c;
+}
+</script>
+</head><body>
+<canvas id="gl" width="256" height="256"></canvas>
+<canvas id="c" width="256" height="256"></canvas>
+<img id="i" width="256" height="256" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAATVElEQVR4nO3d+VPUd57Hcf2b9k9Y+z44+qK7OZoGFVA5VfBGzah9cxpNzGEOoRua5lBEue/DK4fZ7MapmSm3Mlshu8xOdCpDJt3v/aEBAUHAOMG4z0fV53fqU/V6fd7fT/e32bEDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwOvBkar7l+3+GwBsk8xUrT0rTb8vx2Q45janlu7YsWPnsgXgTeYwak85U3Xv5ZiM3+XbUh/l2dICBc6080WZ1ur92baSHRQB8GayGdUWu1HzoSNFO+ZM1f2cbTLM51lT5woc5rkDObbZ/Vm2SEm23VvsyjhV5nJQBsCbxGZQVtmN6p4Mo/YPdqNGHKlayUrXJ9zWlESh0xIvzsmYL3HZ54pzMm6VuRyRMpfTW+pyUAbAm8BmVNVnGNTTdqP6vzOMGrGnaMSZqpNsk17ybKlS6DTL/ixbotRlj5flOubL3I65MpfjVrnbEalYKINSl335vQGA3wKbUW2xGdWRDKP66wyjWhYLwJGiFWeaTrJNBnFbU2SP3ST7s6xSmmuXcrczUe52xstzHfPlbsdcudt5qyzX3lKWlxkszXGeK8mxnyzJySjeQRkArzebQVllM6p7bUb149UF4EjVSmaaTrLS9eKypMgee7ocyLZJmdshFXmZUpHnXFEGB/OzJsrdjqEyt/NmWa49XJbt9Ja6Mk4Vu7hEBF5LNr2q3mZQz9gM6u9XFEBqsgCcaTrJXJgEci0pstdhkv3ZNinNTZbAofwsOZSfJQfzMqU8z5kodzsSZbmOeIXb+XW52zFa5nLcKnPZI2ULl4jFfKIAvB7MOrXFZlBHbAb11zaj+kmGUbNuAWSm65dKYHdGmhRlWqQ8zyFHCnLk+L5cOV6UK0cKXVK5J1sO5mdKhdspZavKoDTX0VPiciTLIHtFGVAIwK/NYlBW2fTqXptB/dhmSJ7+LyqArHS95JiTJVDgNEllQZZ4KgulrrpU6qtLJXBsv5wt3yMn9rvlaIFLDi8vg1xH4mB+5p+Wl0Fpjr2lJMcRLM6ynyvOzjhxIIt7A+BXY9Gr6q0L4/9SAaRoxL7w/L9WAWSbDJJrTZFid4Z4jxZJU/1xufHhOem+ek6il0/LB74qaTxTJoGj++Vs2R45vj9XjhTkyOHdC48JC2VwaHfmnyrczn+vcDsmynLtQyU5GTeLczLCpTk2T3GW7VhxVsae7d4f4I1l1qktVoM6YjOovrYa1D8sFoB9WQE415kA8u1pcvRAjnwUOiLDLQG5190o9242ylRHnQyG/XLz6nmJXqqWD3yV0nC6VPxH98nZst1yfF+uHC10SdXebDmUnyyDqoLs7w7lZ35b7nb8scxt/7dSl32kJCejqyQn40pJTkbZDiYC4NWzaJVVVr2q12ZQPbYa1H9fuwB0SwWQla6XLFOyAAoyTfLW4T3SfuWM3L3RIA/7L8vD/svyZe8l+ezW23Kvu1EmO2ploNkn3VfPSevb1fK+t1Iaz5RJ7cli8R0pktOl+XKsKFkGBxfKoHJv1l8P5mf+uSLP8fvyXMdMmdsRKXc5qotdGQXbvV/AG8WiV9Vb9aoZq141azOoxWbcXAHkWlOkJC9Dak8Xy61PL8iDnotLBbBUBH2X5Yvbl+RBz0W5e6NBJtprpL/ZJzc/Oi/XP3hLWi6ekvc8h6WuukS8Vc/KYPEC8WhhzpOqguzvKvdmfXV4d2b3wfzM9w/lZTENAK+CWaewWHWqiE2v+tqqV/2w2QLINhkkP2Nh/K89ImNtIfmi99Kz8Pcl15dL65J80XtJPr/1tty/2Sh3uxvkzvV6GY+FpO+aV65/8DuJXDwpVzyHpO7UQhmU5MvRIpdU7c2RQ7uz5MR+9x+OFbnuHi3MiVQVuKoP784u2u79A37TLFpllVWn6rXqVY+tetWPGxbAsgvAvU6TvHVot8SunJY7N+rly761g/9lb3J9sWx9fvuSfH77bXnQc1HudTfITFedjLWFpPeaR7o+eEvCjSflyoVDUlddKsHjB+TC4UI5VZwnVQU5ibcq9nx1ujS/58QB99XqYnf5DqYB4OVYdM/Gf6te9Y/k8//GBeCyGKXEnSE11Qek55Pzcv9m48rQrxP8L25fki9uvy2fr1qf3bqYnAxuNMh0Z52MRINy+1OPXP/wd9J+5Yw015+Qd84flJqTxXLhcIGcLM77+UhBzt8uVBa2nqvce/ZsxZ6y7d5L4Ddlcfy36FVfW/SqH6wGlawugMWvATvTlhWAySB5GalydH+OfFRzREajQfn81tvrh/6FwV9cF+WzWxflwa2Lcr/notzrbpSZ6/Uy1VUnkx21MtwSkJ5PLkjHe2elqf64XD53UEInDiQuHC6Yry7Omz1W5HrY+FbF4R1MA8DmWLTKKsuy8d9qUL+wAJZ/C3CPM13OHtwtbe+elunr9fLFusF/PvSf31o7+A96nq37PRflfk+j3L+Z/Fjx7o0Gme6qk4n2Ghlq8UvPx+el/coZuVZ3XC6fq/i57lTx32pOHngUOlUc/jR4lEtCYCMWnareolfNWPSqWatB9dOaBbDGl4BcFqMUu20SOnVAbn58Tu52N27qtP98g9A/WAz9QvAX173FEuhukLvdDcnJoLNWxmM1Mhjxy82Pzknn+2cSsXdPz4cbT8x+GKh8+FHwSO0OSgBYm1mnsJh1qohFr1wY/5XxZwWw/teAs9KTvwtwZH+2XA1VyXBrUB70XFz/tF9nzN9K8O91N8i9hfAvrjs3GuTOjXqZXnhEGG+vkdFoUAbD/p97Pj7/t56r57/pu+b5pOXd6qPbvdfAa8ei3VVl0al6LXrlY4tO+aNFr0pstgD2ONLlzMHdEn2nWqY66+SzlxzzHywb858L/TrBv3vjWfgX18z15JruqpOpzlqZaA8lxmKhv49Gg3/oD/s+3u69Bl47Fp2i3qJVzVh0ylmrTvmTVZ+8AFz5HsDzBZBjNkpxrk2Cpw5I90fn5M6Nhhee9lsOfvfmg3/n+rPwz1yvk5muOpleWJMdtfHJjprvJjtqKABgueT4r4iYdcqvzbpdP1j0yvjqArCv9SJQul7ctlSp2pctHwYrZaglIPdvNq5/2r/gYm9Twb+x9eBPd9XJVHISmJ/qrP1murOGRwBgOZN2V5VFp+y1aBfGf50ysVQAa3wHYLEAstL1stuRLqcr8qX18imZ7KiVBz0XXxj6jZ/vNxn86xsHP/kIUCdTnXXx6c7av0x11PRs914Drx2TTlFv0ipmzDrlrEWn/MmiV8lmCiDbbJADuTYJntwvN67+Tmau1ydDvmbot36x9yz49S8Z/NrFNT/dVfv7qc66k9u918BrxaxePf4r4hsVgHPh9wBzrSlSVZQtHwQqZTDil7vdjVs77bcY/JmtB1+mOmsTkx21T6a6ake2e6+B145Ju6vKpFP2mrTKx2bts/F/8VuALyqA3fY0OV2eLy2XTspEe43cf8Gz/TYEXyY7amWyoyY+1VHz/VRnXfN27zXw2lka/7XKWYtW+ZNFp5TNFEC2ySD7XVYJnNgnXR++JdNddZs+7X+d4NfKZEeNTHbUzE921Dya5PIPWClNrbCYtcnx36Td9YNZp4hbdKqNC2Bh/K8szJL3/YdlIOyTOzcatvwx3sY3+r8o+DLZEUpMtNc8mehg/AeeY1LvqjJplb0mjeKxWav40axVJlYXwFpvAmam6STfnibVZXkSefukjMVCcrd7EyP+eqf9loJfu2HwJzpqZKK9RsbbQ/HJ9tD3k501jP/AaiaNot6kSY7/Zq3iJ7NOKYsXgC8qgCyTQfblWMV/fJ90fnBWJjtrV4z3Wzntn7vRv/586Lca/GcrND/RHno02c74D6yQplZYTFpFxKRVLI3/Kwvg+ReB7CnJ3wFwWVLkcGGWvOc/LP3NXpm5Xv/LT/tNBn9yE8EfT4Y/MR4LPRlvDzH+A6uZNYpKk3ZXb/rC+G/SKhKbLYC8jDQ5VZYn4YsnZLQtKHdubC70mx3zf0nwx9tDMh4LyVgsFB+PBb8fb2f8B56TrlHUp2sV0yaNYmn830wBZKXrZV+2RXzH90nH+2dloqMmWQCv4LR/+eCHloK/EH4ZjwXnx2PBR2PtQcZ/YDmTRpmarlY0mTS7vkrTKP5q0ip+NuuUYtmgABypWnFZjHKoIFOueA9JX5NHprvqNh36zZ72vyT4C+FPjLYFn4zHgoz/wGomza7d6ZpdMZNG8Y1Jo3hi1i48/2+iAPIyUuVkqVuaGk/ISDQoM9df3Wm/Mvg1Ww7+WCwkY21BGW0Lxkfbgt+PxUKM/8BqaZpdu9PUiiaTRvGVSav4y9InABsUQGa6XoqyLeI9ViTt752R8fbQqsC/4tN+i8EfawvKaDQoI9HA/Ghb8JuxKOM/8ByT5l9T09SKQLpGMWTSKv7TrFU8NeuUieUFYFv1YyCOVK3kmJPj/7veg9J7zSNTnbWv6LR/BcFfWCPRQHwkGvjLSDTAm3/AetLVyjyTRvmOSauYNOsU35p1yn9sVABuW6qcLM2Vaw3HZbg1INNdr+a0X/sz/K0FfzQalNFoIHn6RwO/H2kL8uYf8CImza5Ck27Xe2atcsqiU8bXLYAUjWSm66QwyyzeY4USu3JaxmKhtUP/i0/7mhWhXxH8tvWCH5SRaEBGo4HESKv/yWhrgMs/YDPSdcois1bxvkWnfGrRK+NrFYA9RSvZZoMc3OuUdzwH5fa1CzLRUfNPPe3H1zjt1wv+4hpuDcRHooHvR6IBLv+AzTLrlEVmnfKhRad8al3z58C04ralyImSXLnWcEyGWv0y2VkrU13Ph/6lTvsNgj+6QfBHWgMy3BqQ4Vb//HBr4NFI1M/lH7AVFr0qYNGrHlr1qqc2gyq+/E1AZ5pOCrNM4jlaIG1XTstoW/Cfd9q/VPADMtzqTwy3+J8MM/4DL2XnihIwquI2o1rsKRrJNhmkYq9DLl+okFufnJfx9ppnoV/vc/utnvaxNcb8TQU/IMOtfhlq8ceHW/zfD0cDF7Z7I4Hfqp02vSpg06se2gzqpxlGTdyeopFca4ocL3HJp/VHZTDik4mOzY34L33ab+7EXwz+wvLND7cEbo20BjK3exOB37KdNqM6YDOoH2YY1U+dabp4QaZJLhzZK9F3q2UkGpCJDU/70Ks77TcMvl+GWnyJwYjvyVBL4J3t3jzgTbDTZlQHMoyah9lm/dOKPc74pfPl0vPxORmLhX6d035TwV9YEV98sMU/NRDm8g94VXbaU7UBl8X48ESJ6+kn9Ud+Hgh7EuPtoVdz2rdtJvQvDv5gxLewvH8ciHg7hloClu3eNOBNstNtSw34jxc9bH2nenaoxTc33h6aH4uF4uPtwcR48n/u/RNO+80G3ydDEd//DIR99wbCvsbt3izgTbTzaqgy0PPxufBINBAbbw89Go+FZsdjobnx9tDcaCw4P9oWjI/FgomxWCAx+gpO++G1xvxVwR+M+GQw7P1xMOx7PBj29fZHvFXbvVHAm2rn4prsrKkd6wiFR9tDsfH2mthILPRorC04O9YWmhuNheZG2wLzI9FgfLQtkBiNBhLPhf4XnPaLayDik4GwTwbC3v8daPY+HIj4Pupv9jL+A7+CncvXeHtN7WgsGB6NhWKjsVBsJBp8NBoNzo5EA3MLa364NRAfafUnhpPr5U77lcGXgbD37wNhz5/7m70jA2HPmW3eE+D/rZWF0BasHW4LhkeigdhILBQbbg08Gm4NzA63+OeGW/xzQ63++aEWf3yoxZdIrmWhb3k+9INLoV8KvvQ3e+MDzd4f+ps9/9Ef9rYNRHyObd4DAAtWFMJoW7B2uDUYHooGYkPRQGyoxf9oqMU3OxTxzQ1FfHNDLb75oYgvPhjxJpZWeO3gJ8PvSfQ3eX8aCHtn+5u9M33NXP4Br7MVhTDcGqgdbvWHB1v9scFWf2ww4n80GPHNDoa9c4MR39xg2Ds3EPbOD4S98YGwJzEQ9iT6m73S3+yVvmbPfH+zZ76vyfO0v9n7p75mb29/M5d/wG/Jc4Uw1OIP90f8scGIP9Yf8ccGwr5HA2Hv7ECzd26g2TvXlwx9vK/Z821/s+e/+po83/Y3eT7ra/Y0cfkH/LbtXL2GWny1A2FfuC/sjfWHvbH+Zs+jvrD3Zm+TZ6i3yTPW1+yZ7GvyXO9r9vi3908H8M+wohB6m7xlt695Tw6EfecGw15ff5Pnnb5mT6D32oUD2/x3AvgV7dyxY8fOgSavu7/Jk9V3zave7j8IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAICV/g9tPJEQu1XvmQAAAABJRU5ErkJggg==">
+<img id="i2">
+
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTMLBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTMLBadArgs.html
new file mode 100644
index 000000000..064bc3117
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTMLBadArgs.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<html>
+<head>
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<meta charset="utf-8">
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ return [gl, tex];
+}
+
+Tests.testTexImage2D = function(gl) {
+ var b = document.createElement('b');
+ var div = document.createElement('div');
+ var c = document.getElementById('c');
+ assertFail("bad element b",
+ function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, b); });
+ assertFail("bad element div",
+ function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, div); });
+ assertFail("no element",
+ function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, 0); });
+ assertFail("string as data",
+ function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, "foo"); });
+ assertOk("canvas as data",
+ function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+ assertFail("bad target",
+ function() {gl.texImage2D(gl.FLOAT, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+}
+
+Tests.endUnit = function(gl, tex) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.deleteTexture(tex);
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+<canvas id="c" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2D.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2D.html
new file mode 100644
index 000000000..4b3b507a8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2D.html
@@ -0,0 +1,93 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.setup = function(gl) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ var texCubeMap = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCubeMap);
+ return [gl]
+}
+
+Tests.teardown = function(gl,tex,texCubeMap) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.deleteTexture(tex);
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);
+ gl.deleteTexture(texCubeMap);
+}
+
+Tests.testTexSubImage2D = function(gl) {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2,2,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]));
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 2,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0]));
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,2,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0]));
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 1,0, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,1, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 1,1, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ gl.texImage2D(gl.TEXTURE_2D, 1,gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ gl.texSubImage2D(gl.TEXTURE_2D, 1, 0,0, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ var valid_targets = [
+ gl.TEXTURE_2D,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+ ];
+ valid_targets.forEach(function(t) {
+ assertOk(function(){
+ gl.texImage2D(t, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ gl.texSubImage2D(t, 0, 0,0, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ });
+ });
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html
new file mode 100644
index 000000000..b435e15e9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.setup = function(gl) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ return [gl]
+}
+
+Tests.teardown = function(gl,tex) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.deleteTexture(tex);
+}
+
+Tests.testTexImage2D = function(gl) {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2,2,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]));
+ assertGLError(gl, gl.INVALID_OPERATION, "not enough data", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0,0, 0, 2,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ });
+ assertGLError(gl, gl.INVALID_OPERATION, "not enough data", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0,0, 0, 1,2,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ });
+ assertGLError(gl, gl.INVALID_ENUM, "bad target", function(){
+ gl.texSubImage2D(gl.FLOAT, 0, 0,0, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "width out of range", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0,0, 0, 3,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]));
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "height out of range", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0,0, 0, 1,3,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]));
+ });
+ assertOk("zero size", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0,0, 0, 0,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ });
+ assertSomeGLError(gl, "negative width", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0,0, 0, -1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ });
+ assertSomeGLError(gl, "negative height", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0,0, 0, 1,-1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "negative x", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0,-1,1,1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ });
+ assertGLError(gl, gl.INVALID_VALUE, "negative y", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0,1,-1,1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ });
+ assertGLError(gl, gl.INVALID_ENUM, "bad format", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,1,gl.FLOAT,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+ });
+ assertGLError(gl, gl.INVALID_ENUM, "bad type", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,1,gl.RGBA,gl.TEXTURE_2D, new Uint8Array([0,0,0,0]));
+ });
+ assertGLError(gl, gl.INVALID_OPERATION, "not enough data", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0]));
+ });
+ assertGLError(gl, gl.INVALID_OPERATION, "format does not match internal format", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,1,gl.RGB,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0]));
+ });
+ assertGLError(gl, gl.INVALID_OPERATION, "type does not match original", function(){
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,1,gl.RGBA,gl.UNSIGNED_SHORT_4_4_4_4, new Uint16Array([0]));
+ });
+}
+
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html
new file mode 100644
index 000000000..30bfbfe5c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html
@@ -0,0 +1,174 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="../../resources/webgl-test-utils.js"></script>
+<script type="application/x-javascript">
+var wtu = WebGLTestUtils;
+var defaultImgUrl = "http://mashable.com/wp-content/uploads/2008/08/thunderbird-logo-64x64.png";
+var localImgUrl = "../../resources/thunderbird-logo-64x64.png";
+
+Tests.autoinit = false; // Prevents the test from running until the image is loaded
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+
+ gl.viewport(0,0,canvas.width,canvas.height);
+ gl.clearColor(0,0,1,1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.disable(gl.DEPTH_TEST);
+ return [gl];
+}
+
+Tests.setup = function(gl) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ var texCubeMap = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCubeMap);
+ return [gl]
+}
+
+Tests.teardown = function(gl, tex, texCubeMap) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.deleteTexture(tex);
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);
+ gl.deleteTexture(texCubeMap);
+}
+
+Tests.testTexImage2D = function(gl) {
+ gl.enable(gl.BLEND);
+ var img = document.getElementById('i');
+ var c = document.getElementById('c');
+ var ctx = c.getContext('2d');
+ ctx.drawImage(img,0,0);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, img);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, img);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ var f = new Filter(gl, 'identity-flip-vert', 'identity-frag');
+ gl.blendFunc(gl.ONE, gl.ZERO);
+ f.apply();
+ f.destroy();
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, c);
+ f = new Filter(gl, 'identity-hflip-vert', 'identity-frag');
+ gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
+ f.apply();
+ f.destroy();
+ var valid_targets = [
+ gl.TEXTURE_2D,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+ ];
+ valid_targets.forEach(function(t) {
+ assertOk(function(){
+ gl.texImage2D(t, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);
+ gl.texSubImage2D(t, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, c);
+ });
+ assertOk(function(){
+ gl.texImage2D(t, 1, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);
+ gl.texSubImage2D(t, 1, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, c);
+ });
+ });
+}
+
+Tests.testTexImage2DNonSOP = function(gl) {
+ var img = document.getElementById('i2');
+ while (!img.complete) {}
+ var c = document.getElementById('c');
+ var ctx = c.getContext('2d');
+ ctx.drawImage(img,0,0);
+ assertThrowNoGLError(gl, "texImage2D with cross-origin image should throw exception.",
+ function(){gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, img);});
+ assertThrowNoGLError(gl, "texSubImage2D with cross-origin image should throw exception.",
+ function(){gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, img);});
+ assertThrowNoGLError(gl, "texImage2D with dirty origin canvas should throw exception.",
+ function(){gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);});
+ assertThrowNoGLError(gl, "texSubImage2D with dirty origin canvas should throw exception.",
+ function(){gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, c);});
+}
+
+Tests.endUnit = function(gl) {
+}
+
+wtu.setupImageForCrossOriginTest("#i2", defaultImgUrl, localImgUrl, initTests);
+</script>
+<script id="identity-flip-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(Tex.s, 1.0-Tex.t, 0.0, 0.0);
+ gl_Position = vec4(Vertex, 1.0);
+}
+</script>
+<script id="identity-hflip-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(1.0-Tex.s, Tex.t, 0.0, 0.0);
+ gl_Position = vec4(Vertex, 1.0);
+}
+</script>
+<script id="identity-frag" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform sampler2D Texture;
+
+varying vec4 texCoord0;
+void main()
+{
+ vec4 c = texture2D(Texture, texCoord0.st);
+ gl_FragColor = c;
+}
+</script>
+</head><body>
+<canvas id="gl" width="256" height="256"></canvas>
+<canvas id="c" width="256" height="256"></canvas>
+<img id="i" width="256" height="256" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAATVElEQVR4nO3d+VPUd57Hcf2b9k9Y+z44+qK7OZoGFVA5VfBGzah9cxpNzGEOoRua5lBEue/DK4fZ7MapmSm3Mlshu8xOdCpDJt3v/aEBAUHAOMG4z0fV53fqU/V6fd7fT/e32bEDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwOvBkar7l+3+GwBsk8xUrT0rTb8vx2Q45janlu7YsWPnsgXgTeYwak85U3Xv5ZiM3+XbUh/l2dICBc6080WZ1ur92baSHRQB8GayGdUWu1HzoSNFO+ZM1f2cbTLM51lT5woc5rkDObbZ/Vm2SEm23VvsyjhV5nJQBsCbxGZQVtmN6p4Mo/YPdqNGHKlayUrXJ9zWlESh0xIvzsmYL3HZ54pzMm6VuRyRMpfTW+pyUAbAm8BmVNVnGNTTdqP6vzOMGrGnaMSZqpNsk17ybKlS6DTL/ixbotRlj5flOubL3I65MpfjVrnbEalYKINSl335vQGA3wKbUW2xGdWRDKP66wyjWhYLwJGiFWeaTrJNBnFbU2SP3ST7s6xSmmuXcrczUe52xstzHfPlbsdcudt5qyzX3lKWlxkszXGeK8mxnyzJySjeQRkArzebQVllM6p7bUb149UF4EjVSmaaTrLS9eKypMgee7ocyLZJmdshFXmZUpHnXFEGB/OzJsrdjqEyt/NmWa49XJbt9Ja6Mk4Vu7hEBF5LNr2q3mZQz9gM6u9XFEBqsgCcaTrJXJgEci0pstdhkv3ZNinNTZbAofwsOZSfJQfzMqU8z5kodzsSZbmOeIXb+XW52zFa5nLcKnPZI2ULl4jFfKIAvB7MOrXFZlBHbAb11zaj+kmGUbNuAWSm65dKYHdGmhRlWqQ8zyFHCnLk+L5cOV6UK0cKXVK5J1sO5mdKhdspZavKoDTX0VPiciTLIHtFGVAIwK/NYlBW2fTqXptB/dhmSJ7+LyqArHS95JiTJVDgNEllQZZ4KgulrrpU6qtLJXBsv5wt3yMn9rvlaIFLDi8vg1xH4mB+5p+Wl0Fpjr2lJMcRLM6ynyvOzjhxIIt7A+BXY9Gr6q0L4/9SAaRoxL7w/L9WAWSbDJJrTZFid4Z4jxZJU/1xufHhOem+ek6il0/LB74qaTxTJoGj++Vs2R45vj9XjhTkyOHdC48JC2VwaHfmnyrczn+vcDsmynLtQyU5GTeLczLCpTk2T3GW7VhxVsae7d4f4I1l1qktVoM6YjOovrYa1D8sFoB9WQE415kA8u1pcvRAjnwUOiLDLQG5190o9242ylRHnQyG/XLz6nmJXqqWD3yV0nC6VPxH98nZst1yfF+uHC10SdXebDmUnyyDqoLs7w7lZ35b7nb8scxt/7dSl32kJCejqyQn40pJTkbZDiYC4NWzaJVVVr2q12ZQPbYa1H9fuwB0SwWQla6XLFOyAAoyTfLW4T3SfuWM3L3RIA/7L8vD/svyZe8l+ezW23Kvu1EmO2ploNkn3VfPSevb1fK+t1Iaz5RJ7cli8R0pktOl+XKsKFkGBxfKoHJv1l8P5mf+uSLP8fvyXMdMmdsRKXc5qotdGQXbvV/AG8WiV9Vb9aoZq141azOoxWbcXAHkWlOkJC9Dak8Xy61PL8iDnotLBbBUBH2X5Yvbl+RBz0W5e6NBJtprpL/ZJzc/Oi/XP3hLWi6ekvc8h6WuukS8Vc/KYPEC8WhhzpOqguzvKvdmfXV4d2b3wfzM9w/lZTENAK+CWaewWHWqiE2v+tqqV/2w2QLINhkkP2Nh/K89ImNtIfmi99Kz8Pcl15dL65J80XtJPr/1tty/2Sh3uxvkzvV6GY+FpO+aV65/8DuJXDwpVzyHpO7UQhmU5MvRIpdU7c2RQ7uz5MR+9x+OFbnuHi3MiVQVuKoP784u2u79A37TLFpllVWn6rXqVY+tetWPGxbAsgvAvU6TvHVot8SunJY7N+rly761g/9lb3J9sWx9fvuSfH77bXnQc1HudTfITFedjLWFpPeaR7o+eEvCjSflyoVDUlddKsHjB+TC4UI5VZwnVQU5ibcq9nx1ujS/58QB99XqYnf5DqYB4OVYdM/Gf6te9Y/k8//GBeCyGKXEnSE11Qek55Pzcv9m48rQrxP8L25fki9uvy2fr1qf3bqYnAxuNMh0Z52MRINy+1OPXP/wd9J+5Yw015+Qd84flJqTxXLhcIGcLM77+UhBzt8uVBa2nqvce/ZsxZ6y7d5L4Ddlcfy36FVfW/SqH6wGlawugMWvATvTlhWAySB5GalydH+OfFRzREajQfn81tvrh/6FwV9cF+WzWxflwa2Lcr/notzrbpSZ6/Uy1VUnkx21MtwSkJ5PLkjHe2elqf64XD53UEInDiQuHC6Yry7Omz1W5HrY+FbF4R1MA8DmWLTKKsuy8d9qUL+wAJZ/C3CPM13OHtwtbe+elunr9fLFusF/PvSf31o7+A96nq37PRflfk+j3L+Z/Fjx7o0Gme6qk4n2Ghlq8UvPx+el/coZuVZ3XC6fq/i57lTx32pOHngUOlUc/jR4lEtCYCMWnareolfNWPSqWatB9dOaBbDGl4BcFqMUu20SOnVAbn58Tu52N27qtP98g9A/WAz9QvAX173FEuhukLvdDcnJoLNWxmM1Mhjxy82Pzknn+2cSsXdPz4cbT8x+GKh8+FHwSO0OSgBYm1mnsJh1qohFr1wY/5XxZwWw/teAs9KTvwtwZH+2XA1VyXBrUB70XFz/tF9nzN9K8O91N8i9hfAvrjs3GuTOjXqZXnhEGG+vkdFoUAbD/p97Pj7/t56r57/pu+b5pOXd6qPbvdfAa8ei3VVl0al6LXrlY4tO+aNFr0pstgD2ONLlzMHdEn2nWqY66+SzlxzzHywb858L/TrBv3vjWfgX18z15JruqpOpzlqZaA8lxmKhv49Gg3/oD/s+3u69Bl47Fp2i3qJVzVh0ylmrTvmTVZ+8AFz5HsDzBZBjNkpxrk2Cpw5I90fn5M6Nhhee9lsOfvfmg3/n+rPwz1yvk5muOpleWJMdtfHJjprvJjtqKABgueT4r4iYdcqvzbpdP1j0yvjqArCv9SJQul7ctlSp2pctHwYrZaglIPdvNq5/2r/gYm9Twb+x9eBPd9XJVHISmJ/qrP1murOGRwBgOZN2V5VFp+y1aBfGf50ysVQAa3wHYLEAstL1stuRLqcr8qX18imZ7KiVBz0XXxj6jZ/vNxn86xsHP/kIUCdTnXXx6c7av0x11PRs914Drx2TTlFv0ipmzDrlrEWn/MmiV8lmCiDbbJADuTYJntwvN67+Tmau1ydDvmbot36x9yz49S8Z/NrFNT/dVfv7qc66k9u918BrxaxePf4r4hsVgHPh9wBzrSlSVZQtHwQqZTDil7vdjVs77bcY/JmtB1+mOmsTkx21T6a6ake2e6+B145Ju6vKpFP2mrTKx2bts/F/8VuALyqA3fY0OV2eLy2XTspEe43cf8Gz/TYEXyY7amWyoyY+1VHz/VRnXfN27zXw2lka/7XKWYtW+ZNFp5TNFEC2ySD7XVYJnNgnXR++JdNddZs+7X+d4NfKZEeNTHbUzE921Dya5PIPWClNrbCYtcnx36Td9YNZp4hbdKqNC2Bh/K8szJL3/YdlIOyTOzcatvwx3sY3+r8o+DLZEUpMtNc8mehg/AeeY1LvqjJplb0mjeKxWav40axVJlYXwFpvAmam6STfnibVZXkSefukjMVCcrd7EyP+eqf9loJfu2HwJzpqZKK9RsbbQ/HJ9tD3k501jP/AaiaNot6kSY7/Zq3iJ7NOKYsXgC8qgCyTQfblWMV/fJ90fnBWJjtrV4z3Wzntn7vRv/586Lca/GcrND/RHno02c74D6yQplZYTFpFxKRVLI3/Kwvg+ReB7CnJ3wFwWVLkcGGWvOc/LP3NXpm5Xv/LT/tNBn9yE8EfT4Y/MR4LPRlvDzH+A6uZNYpKk3ZXb/rC+G/SKhKbLYC8jDQ5VZYn4YsnZLQtKHdubC70mx3zf0nwx9tDMh4LyVgsFB+PBb8fb2f8B56TrlHUp2sV0yaNYmn830wBZKXrZV+2RXzH90nH+2dloqMmWQCv4LR/+eCHloK/EH4ZjwXnx2PBR2PtQcZ/YDmTRpmarlY0mTS7vkrTKP5q0ip+NuuUYtmgABypWnFZjHKoIFOueA9JX5NHprvqNh36zZ72vyT4C+FPjLYFn4zHgoz/wGomza7d6ZpdMZNG8Y1Jo3hi1i48/2+iAPIyUuVkqVuaGk/ISDQoM9df3Wm/Mvg1Ww7+WCwkY21BGW0Lxkfbgt+PxUKM/8BqaZpdu9PUiiaTRvGVSav4y9InABsUQGa6XoqyLeI9ViTt752R8fbQqsC/4tN+i8EfawvKaDQoI9HA/Ghb8JuxKOM/8ByT5l9T09SKQLpGMWTSKv7TrFU8NeuUieUFYFv1YyCOVK3kmJPj/7veg9J7zSNTnbWv6LR/BcFfWCPRQHwkGvjLSDTAm3/AetLVyjyTRvmOSauYNOsU35p1yn9sVABuW6qcLM2Vaw3HZbg1INNdr+a0X/sz/K0FfzQalNFoIHn6RwO/H2kL8uYf8CImza5Ck27Xe2atcsqiU8bXLYAUjWSm66QwyyzeY4USu3JaxmKhtUP/i0/7mhWhXxH8tvWCH5SRaEBGo4HESKv/yWhrgMs/YDPSdcois1bxvkWnfGrRK+NrFYA9RSvZZoMc3OuUdzwH5fa1CzLRUfNPPe3H1zjt1wv+4hpuDcRHooHvR6IBLv+AzTLrlEVmnfKhRad8al3z58C04ralyImSXLnWcEyGWv0y2VkrU13Ph/6lTvsNgj+6QfBHWgMy3BqQ4Vb//HBr4NFI1M/lH7AVFr0qYNGrHlr1qqc2gyq+/E1AZ5pOCrNM4jlaIG1XTstoW/Cfd9q/VPADMtzqTwy3+J8MM/4DL2XnihIwquI2o1rsKRrJNhmkYq9DLl+okFufnJfx9ppnoV/vc/utnvaxNcb8TQU/IMOtfhlq8ceHW/zfD0cDF7Z7I4Hfqp02vSpg06se2gzqpxlGTdyeopFca4ocL3HJp/VHZTDik4mOzY34L33ab+7EXwz+wvLND7cEbo20BjK3exOB37KdNqM6YDOoH2YY1U+dabp4QaZJLhzZK9F3q2UkGpCJDU/70Ks77TcMvl+GWnyJwYjvyVBL4J3t3jzgTbDTZlQHMoyah9lm/dOKPc74pfPl0vPxORmLhX6d035TwV9YEV98sMU/NRDm8g94VXbaU7UBl8X48ESJ6+kn9Ud+Hgh7EuPtoVdz2rdtJvQvDv5gxLewvH8ciHg7hloClu3eNOBNstNtSw34jxc9bH2nenaoxTc33h6aH4uF4uPtwcR48n/u/RNO+80G3ydDEd//DIR99wbCvsbt3izgTbTzaqgy0PPxufBINBAbbw89Go+FZsdjobnx9tDcaCw4P9oWjI/FgomxWCAx+gpO++G1xvxVwR+M+GQw7P1xMOx7PBj29fZHvFXbvVHAm2rn4prsrKkd6wiFR9tDsfH2mthILPRorC04O9YWmhuNheZG2wLzI9FgfLQtkBiNBhLPhf4XnPaLayDik4GwTwbC3v8daPY+HIj4Pupv9jL+A7+CncvXeHtN7WgsGB6NhWKjsVBsJBp8NBoNzo5EA3MLa364NRAfafUnhpPr5U77lcGXgbD37wNhz5/7m70jA2HPmW3eE+D/rZWF0BasHW4LhkeigdhILBQbbg08Gm4NzA63+OeGW/xzQ63++aEWf3yoxZdIrmWhb3k+9INLoV8KvvQ3e+MDzd4f+ps9/9Ef9rYNRHyObd4DAAtWFMJoW7B2uDUYHooGYkPRQGyoxf9oqMU3OxTxzQ1FfHNDLb75oYgvPhjxJpZWeO3gJ8PvSfQ3eX8aCHtn+5u9M33NXP4Br7MVhTDcGqgdbvWHB1v9scFWf2ww4n80GPHNDoa9c4MR39xg2Ds3EPbOD4S98YGwJzEQ9iT6m73S3+yVvmbPfH+zZ76vyfO0v9n7p75mb29/M5d/wG/Jc4Uw1OIP90f8scGIP9Yf8ccGwr5HA2Hv7ECzd26g2TvXlwx9vK/Z821/s+e/+po83/Y3eT7ra/Y0cfkH/LbtXL2GWny1A2FfuC/sjfWHvbH+Zs+jvrD3Zm+TZ6i3yTPW1+yZ7GvyXO9r9vi3908H8M+wohB6m7xlt695Tw6EfecGw15ff5Pnnb5mT6D32oUD2/x3AvgV7dyxY8fOgSavu7/Jk9V3zave7j8IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAICV/g9tPJEQu1XvmQAAAABJRU5ErkJggg==">
+<img id="i2">
+
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs.html
new file mode 100644
index 000000000..475f349dc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ return [gl, tex];
+}
+
+Tests.testTexImage2D = function(gl) {
+ var b = document.createElement('b');
+ var div = document.createElement('div');
+ var c = document.getElementById('c');
+ assertOk("make texture",
+ function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+ assertGLError(gl, gl.INVALID_VALUE, "y + height > texture height",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 1, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+ assertGLError(gl, gl.INVALID_VALUE, "x + width > texture width",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+ assertGLError(gl, gl.INVALID_VALUE, "negative x",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, -1, 0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+ assertGLError(gl, gl.INVALID_VALUE, "negative y",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, -1, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+ assertGLError(gl, gl.INVALID_VALUE, "negative level",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, -1, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+ assertThrowNoGLError(gl, "bad element b",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, b); });
+ assertThrowNoGLError(gl, "bad element div",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, div); });
+ assertThrowNoGLError(gl, "no element",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, 0); });
+ assertThrowNoGLError(gl, "string as data",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0,0, 0, gl.RGBA, gl.UNSIGNED_BYTE, "foo"); });
+ assertGLError(gl, gl.INVALID_ENUM, "bad target",
+ function() {gl.texSubImage2D(gl.FLOAT, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+ assertOk("good args",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+ assertGLError(gl, gl.INVALID_OPERATION, "format not same as original",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_BYTE, c); });
+ assertGLError(gl, gl.INVALID_OPERATION, "type not same as original",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_SHORT_4_4_4_4, c); });
+ assertOk("make texture RGB",
+ function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE, c); });
+ assertOk("format same as original RGB",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_BYTE, c); });
+ assertGLError(gl, gl.INVALID_OPERATION, "format not same as original RGB",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+ assertGLError(gl, gl.INVALID_OPERATION, "type not same as original RGB",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_SHORT_5_6_5, c); });
+ assertOk("make texture RGBA 4_4_4_4",
+ function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_SHORT_4_4_4_4, c); });
+ assertOk("format same as original RGBA 4_4_4_4",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_SHORT_4_4_4_4, c); });
+ assertGLError(gl, gl.INVALID_OPERATION, "format not same as original RGBA 4_4_4_4",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_BYTE, c); });
+ assertGLError(gl, gl.INVALID_OPERATION, "type not same as original RGBA 4_4_4_4",
+ function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+}
+
+Tests.endUnit = function(gl, tex) {
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.deleteTexture(tex);
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+<canvas id="c" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrix.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrix.html
new file mode 100644
index 000000000..aab88c8d2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrix.html
@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.testUniformf = function(gl) {
+ var sh = new Filter(gl, 'foobar-vert', 'foobar-frag');
+ sh.apply(function(f){
+ var foo = f.uniform('foo');
+ var bar = f.uniform('bar');
+ var bar3 = f.uniform('bar3');
+ gl.uniformMatrix4fv(foo, false, [1,0,0,0, 0,2,0,0, 0,0,3,0, 0,0,0,4]);
+ gl.uniformMatrix2fv(bar, false, [2,1, 2,2]);
+ gl.uniformMatrix3fv(bar3, false, [2,2,2, 2,2,2, 2,1,2]);
+ });
+ var d = new Uint8Array(4);
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, d);
+ assertEquals([1,2,3,8], [d[0], d[1], d[2], d[3]]);
+ sh.destroy();
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<script id="foobar-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+uniform mat2 bar;
+uniform mat3 bar3;
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(Tex.s, 1.0-Tex.t, bar[0][1]+bar3[2][1], 0.0);
+ gl_Position = vec4(Vertex, 1.0);
+}
+</script>
+<script id="foobar-frag" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform mat4 foo;
+
+varying vec4 texCoord0;
+void main()
+{
+ gl_FragColor = vec4(foo[0][0]/256.0, foo[1][1]/256.0, foo[2][2]/256.0, foo[3][3]*texCoord0.z/256.0);
+}
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrixBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrixBadArgs.html
new file mode 100644
index 000000000..3c01dbfef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrixBadArgs.html
@@ -0,0 +1,166 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var unwrappedGL = getGLContext(canvas);
+ var gl = wrapGLContext(unwrappedGL);
+ return [gl, unwrappedGL];
+}
+
+Tests.testUniformf = function(gl, unwrappedGL) {
+ var sh = new Filter(gl, 'foobar-vert', 'foobar-frag');
+ sh.apply(function(f){
+ var fm4 = f.uniform('fm4');
+ var fm2 = f.uniform('fm2');
+ var fm3 = f.uniform('fm3');
+ assertGLError(gl, gl.INVALID_VALUE, "bad transpose 4fv",
+ function(){gl.uniformMatrix4fv(fm4, true, [1,0,0,0, 0,2,0,0, 0,0,3,0, 0,0,0,4]);});
+ assertGLError(gl, gl.INVALID_VALUE, "bad transpose 3fv",
+ function(){gl.uniformMatrix3fv(fm3, true, [1,0,0, 0,2,0, 0,0,3]);});
+ assertGLError(gl, gl.INVALID_VALUE, "bad transpose 2fv",
+ function(){gl.uniformMatrix2fv(fm2, true, [1,0, 0,2]);});
+ assertThrowNoGLError(gl, "bad location",
+ function(){gl.uniformMatrix4fv(588939, false, [1,0,0,0, 0,2,0,0, 0,0,3,0, 0,0,0,4]);});
+ assertThrowNoGLError(gl, "bad location (negative)",
+ function(){gl.uniformMatrix4fv(-588939, false, [1,0,0,0, 0,2,0,0, 0,0,3,0, 0,0,0,4]);});
+ assertGLError(gl, gl.INVALID_VALUE, "17 values to 4fv",
+ function(){gl.uniformMatrix4fv(fm4, false, [0,1,0,0,0, 0,2,0,0, 0,0,3,0, 0,0,0,4]);});
+ assertGLError(gl, gl.INVALID_VALUE, "5 values to 2fv",
+ function(){gl.uniformMatrix2fv(fm2, false, [0,2,1, 2,2]);});
+ assertGLError(gl, gl.INVALID_VALUE, "10 values to 3fv",
+ function(){gl.uniformMatrix3fv(fm3, false, [0,2,2,2, 2,2,2, 2,1,2]);});
+ assertGLError(gl, gl.INVALID_VALUE, "too few values to 4fv",
+ function(){gl.uniformMatrix4fv(fm4, false, [0,0,0, 0,2,0,0, 0,0,3,0, 0,0,0,4]);});
+ assertGLError(gl, gl.INVALID_VALUE, "too few values to 2fv",
+ function(){gl.uniformMatrix2fv(fm2, false, [1, 2,2]);});
+ assertGLError(gl, gl.INVALID_VALUE, "too few values to 2fv",
+ function(){gl.uniformMatrix2fv(fm2, false, []);});
+ assertThrowNoGLError(gl, "string for data",
+ function(){gl.uniformMatrix2fv(fm2, false, "fm4");});
+ assertGLError(gl, gl.INVALID_VALUE, "too few values to 3fv",
+ function(){gl.uniformMatrix3fv(fm3, false, [2,2, 2,2,2, 2,1,2]);});
+ gl.uniformMatrix4fv(fm4, false, [1,0,0,0, 0,2,0,0, 0,0,3,0, 0,0,0,4]);
+ gl.uniformMatrix2fv(fm2, false, [2,1, 2,2]);
+ gl.uniformMatrix3fv(fm3, false, [2,2,2, 2,2,2, 2,1,2]);
+ assertGLError(gl, gl.INVALID_OPERATION, "3fv on mat4",
+ function(){gl.uniformMatrix3fv(fm4, false, [1,0,0, 0,2,0, 0,0,3]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "3fv on mat2",
+ function(){gl.uniformMatrix3fv(fm2, false, [0,2,1, 0,2,2, 0,0,0]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "2fv om mat3",
+ function(){gl.uniformMatrix2fv(fm3, false, [2,2, 2,2]);});
+ for (var ii = 2; ii <= 4; ++ii) {
+ var all = [];
+ var mats = [[],[]];
+ for (var jj = 0; jj < 2; ++jj) {
+ for (var kk = 0; kk < ii * ii; ++kk) {
+ mats[jj].push(jj + 1);
+ all.push(jj + 1);
+ }
+ }
+ var loc0Name = 'am' + ii + '[0]';
+ var loc1Name = 'am' + ii + '[1]';
+ var loc0 = f.uniform(loc0Name);
+ var loc1 = f.uniform(loc1Name);
+ var fname = "uniformMatrix" + ii + "fv";
+ assert(loc0Name, loc0 != null);
+ assert(loc1Name, loc1 != null);
+ assertOk("set array of 2 matrices " + ii + "fv",
+ function(){gl[fname].call(gl,loc0, false, all);});
+ var actual = unwrappedGL.getUniform(sh.shader.program, loc0);
+ assert("got value for loc0",
+ gl.NO_ERROR == checkError(gl, "getUniform loc0"));
+ assertArrayEquals(mats[0], actual);
+ var actual = unwrappedGL.getUniform(sh.shader.program, loc1);
+ assert("got value for loc1",
+ gl.NO_ERROR == checkError(gl, "getUniform loc1"));
+ assertArrayEquals(mats[1], actual);
+ assertOk("set array of second array of 2 matrixes",
+ function(){gl[fname].call(gl, loc1, false, mats[0]);});
+ var actual = unwrappedGL.getUniform(sh.shader.program, loc1);
+ assert("got value for loc1",
+ gl.NO_ERROR == checkError(gl, "getUniform loc1"));
+ assertArrayEquals(mats[0], actual);
+ var big = mats[1].concat([3]);
+ assertGLError(gl, gl.INVALID_VALUE, "set array of first array of 2 matrixes plus 1 value",
+ function(){gl[fname].call(gl, loc0, false, big);});
+ }
+ });
+ var d = new Uint8Array(4);
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, d);
+ assertArrayEqualsWithEpsilon([1,2,3,8], d, [1,1,1,1]);
+ sh.destroy();
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<script id="foobar-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+uniform mat2 fm2;
+uniform mat3 fm3;
+uniform mat2 am2[2];
+uniform mat3 am3[2];
+uniform mat4 am4[2];
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(Tex.s, 1.0-Tex.t, fm2[0][1]+fm3[2][1], 0.0);
+ float d = am2[0][1][1] + am3[0][2][2] + am4[0][3][3] +
+ am2[1][1][1] + am3[1][2][2] + am4[1][3][3];
+ gl_Position = vec4(Vertex, 1.0 + d * 0.0001);
+}
+</script>
+<script id="foobar-frag" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform mat4 fm4;
+
+varying vec4 texCoord0;
+void main()
+{
+ gl_FragColor = vec4(fm4[0][0]/256.0, fm4[1][1]/256.0, fm4[2][2]/256.0, fm4[3][3]*texCoord0.z/256.0);
+}
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformf.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformf.html
new file mode 100644
index 000000000..21fa77ee3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformf.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.testUniformf = function(gl) {
+ var sh = new Filter(gl, 'foobar-vert', 'foobar-frag');
+ sh.apply(function(f){
+ var foo = f.uniform('foo');
+ var bar = f.uniform('bar');
+ gl.uniform4fv(foo, [1,2,3,4]);
+ gl.uniform1fv(bar, [2]);
+ });
+ var d = new Uint8Array(4);
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, d);
+ assertEquals([1,2,3,8], [d[0], d[1], d[2], d[3]]);
+ sh.apply(function(f){
+ var foo = f.uniform('foo');
+ var bar = f.uniform('bar');
+ gl.uniform4f(foo, 2,2,3,4);
+ gl.uniform1f(bar, 3);
+ });
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, d);
+ assertEquals([2,2,3,12], [d[0], d[1], d[2], d[3]]);
+ sh.destroy();
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<script id="foobar-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+uniform float bar;
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(Tex.s, 1.0-Tex.t, bar, 0.0);
+ gl_Position = vec4(Vertex, 1.0);
+}
+</script>
+<script id="foobar-frag" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform vec4 foo;
+
+varying vec4 texCoord0;
+void main()
+{
+ gl_FragColor = vec4(foo.r/255.0, foo.g/255.0, foo.b/255.0, foo.a*texCoord0.z/255.0);
+}
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfArrayLen1.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfArrayLen1.html
new file mode 100644
index 000000000..2e4383d40
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfArrayLen1.html
@@ -0,0 +1,123 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.testUniformArray = function(gl) {
+ var sh = new Filter(gl, 'foobar-vert', 'foobar-frag');
+ sh.apply(function(f){
+ var uniV4 = f.uniform('uniV4');
+ var uniFloat = f.uniform('uniFloat');
+ assertOk("1fv on 1fv",
+ function(){gl.uniform1fv(uniFloat, [2]);});
+ assertOk("5 values on 1fv",
+ function(){gl.uniform1fv(uniFloat, [2,3,4,5,6]);});
+ assertOk("4fv on 4fv",
+ function(){gl.uniform4fv(uniV4, [1, 2, 3, 4]);});
+ assertOk("8 values on 4fv",
+ function(){gl.uniform4fv(uniV4, [1, 2, 3, 4, 5, 6, 7, 8]);});
+
+ var uniformsFound = 0;
+ var numUniforms = gl.getProgramParameter(f.shader.program, gl.ACTIVE_UNIFORMS);
+ for (var i = 0; i < numUniforms; ++i) {
+ var uniformName = gl.getActiveUniform(f.shader.program, i).name;
+ if (uniformName.indexOf('uniV4') == 0 || uniformName.indexOf('uniFloat') == 0) {
+ assert("Uniform array of length 1 ends with [0]", uniformName.indexOf("[0]") != -1);
+ ++uniformsFound;
+ }
+ }
+ assert("Both uniforms found", uniformsFound == 2);
+
+ uniV4 = f.uniform('uniV4[0]');
+ uniFloat = f.uniform('uniFloat[0]');
+ assertOk("1fv on 1fv",
+ function(){gl.uniform1fv(uniFloat, [2]);});
+ assertOk("5 values on 1fv",
+ function(){gl.uniform1fv(uniFloat, [2,3,4,5,6]);});
+ assertOk("4fv on 4fv",
+ function(){gl.uniform4fv(uniV4, [1, 2, 3, 4]);});
+ assertOk("8 values on 4fv",
+ function(){gl.uniform4fv(uniV4, [1, 2, 3, 4, 5, 6, 7, 8]);});
+
+ });
+ var d = new Uint8Array(4);
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, d);
+ assertArrayEquals([1,2,3,8], d);
+ sh.destroy();
+ throwError(gl);
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<script id="foobar-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+uniform float uniFloat[1];
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(Tex.s, 1.0-Tex.t, uniFloat[0], 0.0);
+ gl_Position = vec4(Vertex, 1.0);
+}
+</script>
+<script id="foobar-frag" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform vec4 uniV4[1];
+
+varying vec4 texCoord0;
+void main()
+{
+ gl_FragColor = vec4(
+ uniV4[0].r/255.0,
+ uniV4[0].g/255.0,
+ uniV4[0].b/255.0,
+ uniV4[0].a*texCoord0.z/255.0);
+}
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfBadArgs.html
new file mode 100644
index 000000000..70986ab0e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfBadArgs.html
@@ -0,0 +1,128 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.testUniformf = function(gl) {
+ var sh = new Filter(gl, 'foobar-vert', 'foobar-frag');
+ sh.apply(function(f){
+ var uniV4 = f.uniform('uniV4');
+ var uniFloat = f.uniform('uniFloat');
+ assertThrowNoGLError(gl, "number for location",
+ function(){gl.uniform4fv(58882929, [1,2,3,4]);});
+ assertThrowNoGLError(gl, "negative number for location",
+ function(){gl.uniform4fv(-58882929, [1,2,3,4]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "1fv on 4fv",
+ function(){gl.uniform1fv(uniV4, [1,2,3,4]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "more than enough values 1fv",
+ function(){gl.uniform1fv(uniFloat, [2,3,4,5,6]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "4fv on float",
+ function(){gl.uniform4fv(uniFloat, [2,3,4,5]);});
+ assertOk("4fv on 4fv",
+ function(){gl.uniform4fv(uniV4, [1, 2, 3, 4]);});
+ assertGLError(gl, gl.INVALID_VALUE, "5 values on 4fv",
+ function(){gl.uniform4fv(uniV4, [1, 2, 3, 4, 5]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "8 values on 4fv",
+ function(){gl.uniform4fv(uniV4, [1, 2, 3, 4, 5, 6, 7, 8]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "3fv on float",
+ function(){gl.uniform3fv(uniFloat, [2,3,4]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "2fv on float",
+ function(){gl.uniform2fv(uniFloat, [2,3]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "3fv on 4fv",
+ function(){gl.uniform3fv(uniV4, [4,5,6]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "2fv on 4fv",
+ function(){gl.uniform2fv(uniV4, [5,6]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "1fv on 4fv",
+ function(){gl.uniform1fv(uniV4, [6]);});
+ assertOk("1fv on 1fv",
+ function(){gl.uniform1fv(uniFloat, [2]);});
+ assertGLError(gl, gl.INVALID_VALUE, "not enough values on 1fv",
+ function(){gl.uniform1fv(uniFloat, []);});
+ assertGLError(gl, gl.INVALID_VALUE, "not enough values on 4fv",
+ function(){gl.uniform4fv(uniV4, [3,3,4]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "4iv on 4fv",
+ function(){gl.uniform4iv(uniV4, [1, 2, 3, 4]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "1iv on 1fv",
+ function(){gl.uniform1iv(uniFloat, [2]);});
+ });
+ var d = new Uint8Array(4);
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, d);
+ assertArrayEquals([1,2,3,8], d);
+ sh.destroy();
+ throwError(gl);
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<script id="foobar-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+uniform float uniFloat;
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(Tex.s, 1.0-Tex.t, uniFloat, 0.0);
+ gl_Position = vec4(Vertex, 1.0);
+}
+</script>
+<script id="foobar-frag" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform vec4 uniV4;
+
+varying vec4 texCoord0;
+void main()
+{
+ gl_FragColor = vec4(
+ uniV4.r/255.0,
+ uniV4.g/255.0,
+ uniV4.b/255.0,
+ uniV4.a*texCoord0.z/255.0);
+}
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformi.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformi.html
new file mode 100644
index 000000000..a66b45fc9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformi.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.testUniformf = function(gl) {
+ var sh = new Filter(gl, 'foobar-vert', 'foobar-frag');
+ sh.apply(function(f){
+ var foo = f.uniform('foo');
+ var bar = f.uniform('bar');
+ gl.uniform4iv(foo, [1,2,3,4]);
+ gl.uniform1iv(bar, [2]);
+ });
+ var d = new Uint8Array(4);
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, d);
+ assertEquals([1,2,3,8], [d[0], d[1], d[2], d[3]]);
+ sh.apply(function(f){
+ var foo = f.uniform('foo');
+ var bar = f.uniform('bar');
+ gl.uniform4i(foo, 2,2,3,4);
+ gl.uniform1i(bar, 3);
+ });
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, d);
+ assertEquals([2,2,3,12], [d[0], d[1], d[2], d[3]]);
+ sh.destroy();
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<script id="foobar-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+uniform int bar;
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(Tex.s, 1.0-Tex.t, float(bar), 0.0);
+ gl_Position = vec4(Vertex, 1.0);
+}
+</script>
+<script id="foobar-frag" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform ivec4 foo;
+
+varying vec4 texCoord0;
+void main()
+{
+ gl_FragColor = vec4(float(foo.r)/256.0, float(foo.g)/256.0, float(foo.b)/256.0, float(foo.a)*texCoord0.z/256.0);
+}
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformiBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformiBadArgs.html
new file mode 100644
index 000000000..e211397d8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/uniformiBadArgs.html
@@ -0,0 +1,124 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ return [gl];
+}
+
+Tests.testUniformf = function(gl) {
+ var sh = new Filter(gl, 'foobar-vert', 'foobar-frag');
+ sh.apply(function(f){
+ var uniIV4 = f.uniform('uniIV4');
+ var uniInt = f.uniform('uniInt');
+ assertThrowNoGLError(gl, "number as location",
+ function(){gl.uniform4iv(58882929, [1,2,3,4]);});
+ assertThrowNoGLError(gl, "negative number as location",
+ function(){gl.uniform4iv(-58882929, [1,2,3,4]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "more than 1 value to 1iv",
+ function(){gl.uniform1iv(uniInt, [2,3,4,5,6]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "4iv on int",
+ function(){gl.uniform4iv(uniInt, [2,3,4,5]);});
+ assertOk("4iv on 4iv",
+ function(){gl.uniform4iv(uniIV4, [1, 2, 3, 4]);});
+ assertGLError(gl, gl.INVALID_VALUE, "5 values on 4iv",
+ function(){gl.uniform4iv(uniIV4, [1, 2, 3, 4, 5]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "8 values on 4iv",
+ function(){gl.uniform4iv(uniIV4, [1, 2, 3, 4, 5, 6, 7, 8]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "3iv on int",
+ function(){gl.uniform3iv(uniInt, [2,3,4]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "2iv on int",
+ function(){gl.uniform2iv(uniInt, [2,3]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "3iv on 4iv",
+ function(){gl.uniform3iv(uniIV4, [4,5,6]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "2iv on 4iv",
+ function(){gl.uniform2iv(uniIV4, [5,6]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "1iv on 4iv",
+ function(){gl.uniform1iv(uniIV4, [6]);});
+ assertGLError(gl, gl.INVALID_VALUE, "not enough values",
+ function(){gl.uniform1iv(uniInt, []);});
+ assertGLError(gl, gl.INVALID_OPERATION, "1fv on int",
+ function(){gl.uniform1fv(uniInt, [2]);});
+ assertGLError(gl, gl.INVALID_OPERATION, "4fv on ivec4",
+ function(){gl.uniform4fv(uniIV4, [2,3,4,5]);});
+ gl.uniform1iv(uniInt, [2]);
+ gl.uniform4iv(uniIV4, [1, 2, 3, 4]);
+ });
+ var d = new Uint8Array(4);
+ gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, d);
+ assertArrayEquals([1,2,3,8], d);
+ sh.destroy();
+ throwError(gl);
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<script id="foobar-vert" type="x-shader/x-vertex">
+attribute vec3 Vertex;
+attribute vec2 Tex;
+
+uniform int uniInt;
+
+varying vec4 texCoord0;
+void main()
+{
+ texCoord0 = vec4(Tex.s, 1.0-Tex.t, float(uniInt), 0.0);
+ gl_Position = vec4(Vertex, 1.0);
+}
+</script>
+<script id="foobar-frag" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform ivec4 uniIV4;
+
+varying vec4 texCoord0;
+void main()
+{
+ gl_FragColor = vec4(
+ float(uniIV4.x)/256.0,
+ float(uniIV4.y)/256.0,
+ float(uniIV4.z)/256.0,
+ float(uniIV4.a)*texCoord0.z/256.0);
+}
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html
new file mode 100644
index 000000000..21d5a0b59
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+var verts = [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0];
+var normals = [0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0];
+var texcoords = [0.0,0.0, 1.0,0.0, 0.0,1.0];
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var prog = new Shader(gl, 'vert', 'frag');
+ prog.use();
+ var sh = prog.shader.program;
+// log(gl.getShaderInfoLog(prog.shaders[1]));
+ var v = gl.getAttribLocation(sh, 'Vertex');
+ var n = gl.getAttribLocation(sh, 'Normal');
+ var t = gl.getAttribLocation(sh, 'Tex');
+ return [gl,prog,v,n,t];
+}
+
+Tests.setup = function(gl, prog, v,n,t) {
+ assert(0 == gl.getError());
+ return [gl, prog, v,n,t];
+}
+Tests.teardown = function(gl, prog, v,n,t) {
+ gl.disableVertexAttribArray(v);
+ gl.disableVertexAttribArray(n);
+ gl.disableVertexAttribArray(t);
+}
+
+Tests.endUnit = function(gl, prog, v,n,t) {
+ prog.destroy();
+}
+
+Tests.testVertexAttrib = function(gl, prog, v,n,t) {
+ var vbo = gl.createBuffer();
+ var vertsArr = new Float32Array(verts);
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ gl.bufferData(gl.ARRAY_BUFFER, vertsArr, gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(v);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 0, 3);});
+ gl.vertexAttrib1fv(v, [1]);
+ gl.vertexAttrib2fv(v, [1,2]);
+ gl.vertexAttrib3fv(v, [1,2,3]);
+ gl.vertexAttrib4fv(v, [1,2,3,4]);
+ gl.vertexAttrib1f(v, 1);
+ gl.vertexAttrib2f(v, 1,2);
+ gl.vertexAttrib3f(v, 1,2,3);
+ gl.vertexAttrib4f(v, 1,2,3,4);
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 0, 3);});
+ throwError(gl);
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ gl.deleteBuffer(vbo);
+ throwError(gl);
+}
+Tests.testVertexAttribVBO = function(gl, prog, v,n,t) {
+ var vbo = gl.createBuffer();
+ var vertsArr = new Float32Array(verts);
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ gl.bufferData(gl.ARRAY_BUFFER, vertsArr, gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(v);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ gl.vertexAttrib1fv(v, [1]);
+ gl.vertexAttrib2fv(v, [1,2]);
+ gl.vertexAttrib3fv(v, [1,2,3]);
+ gl.vertexAttrib4fv(v, [1,2,3,4]);
+ gl.vertexAttrib1f(v, 1);
+ gl.vertexAttrib2f(v, 1,2);
+ gl.vertexAttrib3f(v, 1,2,3);
+ gl.vertexAttrib4f(v, 1,2,3,4);
+ assertOk(function(){gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);});
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 0, 3);});
+ gl.vertexAttrib4fv(v, [1,2,3,4]);
+ assertOk(function(){gl.drawArrays(gl.TRIANGLES, 0, 3);});
+ throwError(gl);
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ gl.deleteBuffer(vbo);
+ throwError(gl);
+}
+
+</script>
+<script id="vert" type="x-shader/x-vertex">
+ attribute vec3 Vertex;
+ attribute vec3 Normal;
+ attribute vec2 Tex;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ gl_Position = vec4(Vertex * Normal, 1.0);
+ texCoord0 = vec4(Tex,0.0,0.0) + gl_Position;
+ }
+</script>
+<script id="frag" type="x-shader/x-fragment">
+ precision mediump float;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ vec4 c = texCoord0;
+ gl_FragColor = c;
+ }
+</script>
+
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html
new file mode 100644
index 000000000..5ab3d5ea1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html
@@ -0,0 +1,120 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+var verts = [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0];
+var normals = [0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0];
+var texcoords = [0.0,0.0, 1.0,0.0, 0.0,1.0];
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var prog = new Shader(gl, 'vert', 'frag');
+ prog.use();
+ var sh = prog.shader.program;
+// log(gl.getShaderInfoLog(prog.shaders[1]));
+ var v = gl.getAttribLocation(sh, 'Vertex');
+ var n = gl.getAttribLocation(sh, 'Normal');
+ var t = gl.getAttribLocation(sh, 'Tex');
+ return [gl,prog,v,n,t];
+}
+
+Tests.setup = function(gl, prog, v,n,t) {
+ assert(0 == gl.getError());
+ return [gl, prog, v,n,t];
+}
+Tests.teardown = function(gl, prog, v,n,t) {
+ gl.disableVertexAttribArray(v);
+ gl.disableVertexAttribArray(n);
+ gl.disableVertexAttribArray(t);
+}
+
+Tests.endUnit = function(gl, prog, v,n,t) {
+ prog.destroy();
+}
+
+
+Tests.testVertexAttrib = function(gl, prog, v,n,t) {
+ var vbo = gl.createBuffer();
+ var vertsArr = new Float32Array(verts);
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ gl.bufferData(gl.ARRAY_BUFFER, vertsArr, gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(v);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ assertFail("bad index",
+ function(){gl.vertexAttrib1f(-1, 1);});
+ assertFail("bad index (big negative)",
+ function(){gl.vertexAttrib1f(-69092342, 1);});
+ assertFail("bad index (big positive)",
+ function(){gl.vertexAttrib1f(58928938, 1);});
+ assertOk("array too large",
+ function(){gl.vertexAttrib1fv(v, [1,2,3,4,5]);});
+ assertFail("array too small",
+ function(){gl.vertexAttrib1fv(v, []);});
+ assertOk("draw",
+ function(){gl.drawArrays(gl.TRIANGLES, 0, 3);});
+ throwError(gl);
+}
+
+</script>
+<script id="vert" type="x-shader/x-vertex">
+ attribute vec3 Vertex;
+ attribute vec3 Normal;
+ attribute vec2 Tex;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ gl_Position = vec4(Vertex * Normal, 1.0);
+ texCoord0 = vec4(Tex,0.0,0.0) + gl_Position;
+ }
+</script>
+<script id="frag" type="x-shader/x-fragment">
+ precision mediump float;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ vec4 c = texCoord0;
+ gl_FragColor = c;
+ }
+</script>
+
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointer.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointer.html
new file mode 100644
index 000000000..c11074eb4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointer.html
@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+var verts = [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0];
+var normals = [0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0];
+var texcoords = [0.0,0.0, 1.0,0.0, 0.0,1.0];
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var prog = new Shader(gl, 'vert', 'frag');
+ prog.use();
+ var sh = prog.shader.program;
+// log(gl.getShaderInfoLog(prog.shaders[1]));
+ var v = gl.getAttribLocation(sh, 'Vertex');
+ var n = gl.getAttribLocation(sh, 'Normal');
+ var t = gl.getAttribLocation(sh, 'Tex');
+ return [gl,prog,v,n,t];
+}
+
+Tests.setup = function(gl, prog, v,n,t) {
+ assert(0 == gl.getError());
+ return [gl, prog, v,n,t];
+}
+Tests.teardown = function(gl, prog, v,n,t) {
+ gl.disableVertexAttribArray(v);
+ gl.disableVertexAttribArray(n);
+ gl.disableVertexAttribArray(t);
+}
+
+Tests.endUnit = function(gl, prog, v,n,t) {
+ prog.destroy();
+}
+
+Tests.testVertexAttribPointerVBO = function(gl, prog, v,n,t) {
+ var vbo = gl.createBuffer();
+ var vertsArr = new Float32Array(verts);
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ gl.bufferData(gl.ARRAY_BUFFER, vertsArr, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 4);
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ gl.deleteBuffer(vbo);
+}
+
+</script>
+<script id="vert" type="x-shader/x-vertex">
+ attribute vec3 Vertex;
+ attribute vec3 Normal;
+ attribute vec2 Tex;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ gl_Position = vec4(Vertex * Normal, 1.0);
+ texCoord0 = vec4(Tex,0.0,0.0) + gl_Position;
+ }
+</script>
+<script id="frag" type="x-shader/x-fragment">
+ precision mediump float;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ vec4 c = texCoord0;
+ gl_FragColor = c;
+ }
+</script>
+
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointerBadArgs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointerBadArgs.html
new file mode 100644
index 000000000..7ec43f962
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointerBadArgs.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+var verts = [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0];
+var normals = [0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0];
+var texcoords = [0.0,0.0, 1.0,0.0, 0.0,1.0];
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = wrapGLContext(getGLContext(canvas));
+ var prog = new Shader(gl, 'vert', 'frag');
+ prog.use();
+ var sh = prog.shader.program;
+// log(gl.getShaderInfoLog(prog.shaders[1]));
+ var v = gl.getAttribLocation(sh, 'Vertex');
+ var n = gl.getAttribLocation(sh, 'Normal');
+ var t = gl.getAttribLocation(sh, 'Tex');
+ return [gl,prog,v,n,t];
+}
+
+Tests.setup = function(gl, prog, v,n,t) {
+ assert(0 == gl.getError());
+ return [gl, prog, v,n,t];
+}
+Tests.teardown = function(gl, prog, v,n,t) {
+ gl.disableVertexAttribArray(v);
+ gl.disableVertexAttribArray(n);
+ gl.disableVertexAttribArray(t);
+}
+
+Tests.endUnit = function(gl, prog, v,n,t) {
+ prog.destroy();
+}
+
+Tests.testVertexAttribPointerVBO = function(gl, prog, v,n,t) {
+ var vbo = gl.createBuffer();
+ var vertsArr = new Float32Array(verts);
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ gl.bufferData(gl.ARRAY_BUFFER, vertsArr, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ assertFail("negative offset",
+ function(){gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, -4);});
+ assertOk("out of range offset (OK because we can change the buffer later)",
+ function(){gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 1200);});
+ assertFail("Offset that is incompatible with type",
+ function(){gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 3);});
+ assertFail("negative stride",
+ function(){gl.vertexAttribPointer(v, 3, gl.FLOAT, false, -1, 0);});
+ assertFail("bad size",
+ function(){gl.vertexAttribPointer(v, 5, gl.FLOAT, false, 0, 0);});
+ assertFail("stride that doesn't match type",
+ function(){gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 1, 0);});
+ assertFail("bad type",
+ function(){gl.vertexAttribPointer(v, 3, gl.TEXTURE_2D, false, 0, 0);});
+ assertFail("bad index",
+ function(){gl.vertexAttribPointer(-1, 3, gl.FLOAT, false, 0, 0);});
+ assertFail("bad index (big negative)",
+ function(){gl.vertexAttribPointer(-8693948, 3, gl.FLOAT, false, 0, 0);});
+ assertFail("bad index (big positive)",
+ function(){gl.vertexAttribPointer(8693948, 3, gl.FLOAT, false, 0, 0);});
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ assertFail("binding to null buffer",
+ function(){gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);});
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ gl.vertexAttribPointer(v, 3, gl.FLOAT, false, 0, 0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ gl.deleteBuffer(vbo);
+ throwError(gl);
+}
+
+</script>
+<script id="vert" type="x-shader/x-vertex">
+ attribute vec3 Vertex;
+ attribute vec3 Normal;
+ attribute vec2 Tex;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ gl_Position = vec4(Vertex * Normal, 1.0);
+ texCoord0 = vec4(Tex,0.0,0.0) + gl_Position;
+ }
+</script>
+<script id="frag" type="x-shader/x-fragment">
+ precision mediump float;
+
+ varying vec4 texCoord0;
+ void main()
+ {
+ vec4 c = texCoord0;
+ gl_FragColor = c;
+ }
+</script>
+
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/glsl/arrayOutOfBounds.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/glsl/arrayOutOfBounds.html
new file mode 100644
index 000000000..34ab4ab0a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/glsl/arrayOutOfBounds.html
@@ -0,0 +1,281 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = getGLContext(canvas);
+ return [gl];
+}
+
+Tests.testOk = function(gl) {
+ var sh = new Filter(gl, 'okvert', 'frag');
+ assertOk(function(){sh.apply();});
+ sh.destroy();
+
+ var sh = new Filter(gl, 'vert', 'okfrag');
+ assertOk(function(){sh.apply();});
+ sh.destroy();
+
+ var sh = new Filter(gl, 'vert', 'frag');
+ assertOk(function(){sh.apply();});
+ sh.destroy();
+}
+
+var arr = ['cr', 'cw', 'vr', 'vw'];
+arr.forEach(function(e){
+ if (e == 'cr' || e == 'cw') {
+ Tests['test'+e+'vert'] = function(gl) {
+ var sh = new Filter(gl, e+'vert', 'frag');
+ assertFail(function(){sh.apply();});
+ sh.destroy();
+ }
+ }
+ Tests['test'+e+'frag'] = function(gl) {
+ var sh = new Filter(gl, 'vert', e+'frag');
+ assertFail(function(){sh.apply();});
+ sh.destroy();
+ }
+});
+
+
+</script>
+<script id="okvert" type="x-shader/x-vertex">
+
+
+ attribute vec3 Vertex;
+ attribute vec2 Tex;
+ varying vec2 TexCoord;
+ void main()
+ {
+ TexCoord = Tex;
+ float x[3];
+ x[0] = 1.0;
+ x[1] = 2.0;
+ x[2] = 3.0;
+ gl_Position = vec4(Vertex, x[2]);
+ }
+</script>
+<script id="crvert" type="x-shader/x-vertex">
+
+
+ attribute vec3 Vertex;
+ attribute vec2 Tex;
+ varying vec2 TexCoord;
+ void main()
+ {
+ TexCoord = Tex;
+ float x[3];
+ x[0] = 1.0;
+ x[1] = 2.0;
+ x[2] = 3.0;
+ gl_Position = vec4(Vertex, x[4]);
+ }
+</script>
+<script id="cwvert" type="x-shader/x-vertex">
+
+
+ attribute vec3 Vertex;
+ attribute vec2 Tex;
+ varying vec2 TexCoord;
+ void main()
+ {
+ TexCoord = Tex;
+ float x[3];
+ x[0] = 1.0;
+ x[1] = 2.0;
+ x[2] = 3.0;
+ x[4] = Vertex.z;
+ gl_Position = vec4(Vertex, x[4]);
+ }
+</script>
+<!-- This one can't be required to fail compilation, because vertex shaders must support arbitrary array indexing -->
+<script id="vrvert" type="x-shader/x-vertex">
+
+
+ attribute vec3 Vertex;
+ attribute vec2 Tex;
+ varying vec2 TexCoord;
+ void main()
+ {
+ TexCoord = Tex;
+ float x[3];
+ x[0] = 1.0;
+ x[1] = 2.0;
+ x[2] = 3.0;
+ int idx = 4 * int(max(1.0, Vertex.x*20.0));
+ gl_Position = vec4(Vertex, x[idx]);
+ }
+</script>
+<!-- This one can't be required to fail compilation, because vertex shaders must support arbitrary array indexing -->
+<script id="vwvert" type="x-shader/x-vertex">
+
+
+ attribute vec3 Vertex;
+ attribute vec2 Tex;
+ varying vec2 TexCoord;
+ void main()
+ {
+ TexCoord = Tex;
+ float x[3];
+ x[0] = 1.0;
+ x[1] = 2.0;
+ x[2] = 3.0;
+ int idx = 4 * int(max(1.0, Vertex.x*20.0));
+ x[idx] = Vertex.z;
+ gl_Position = vec4(Vertex, x[idx]);
+ }
+</script>
+<script id="vert" type="x-shader/x-vertex">
+
+
+ attribute vec3 Vertex;
+ attribute vec2 Tex;
+ varying vec2 TexCoord;
+ void main()
+ {
+ TexCoord = Tex;
+ gl_Position = vec4(Vertex, 0.0);
+ }
+</script>
+
+<script id="okfrag" type="x-shader/x-fragment">
+
+
+ precision mediump float;
+
+ varying vec2 TexCoord;
+
+ void main()
+ {
+ float x[3];
+ x[0] = 1.0;
+ x[1] = 2.0;
+ x[2] = 3.0;
+ gl_FragColor = vec4(1.0, 0.0, TexCoord.s, x[2]);
+ }
+</script>
+<script id="crfrag" type="x-shader/x-fragment">
+
+
+ precision mediump float;
+
+ varying vec2 TexCoord;
+
+ void main()
+ {
+ float x[3];
+ x[0] = 1.0;
+ x[1] = 2.0;
+ x[2] = 3.0;
+ gl_FragColor = vec4(1.0, 0.0, TexCoord.s, x[4]);
+ }
+</script>
+<script id="cwfrag" type="x-shader/x-fragment">
+
+
+ precision mediump float;
+
+ varying vec2 TexCoord;
+
+ void main()
+ {
+ float x[3];
+ x[0] = 1.0;
+ x[1] = 2.0;
+ x[2] = 3.0;
+
+ x[4] = 6.0;
+ gl_FragColor = vec4(1.0, 0.0, TexCoord.s, x[4]);
+ }
+</script>
+<!-- This one actually fails because of WebGL's restrictions on indexing expressions in fragment shaders -->
+<script id="vrfrag" type="x-shader/x-fragment">
+
+
+ precision mediump float;
+
+ varying vec2 TexCoord;
+
+ void main()
+ {
+ float x[3];
+ x[0] = 1.0;
+ x[1] = 2.0;
+ x[2] = 3.0;
+
+ int idx = 4 * int(max(1.0, TexCoord.x*20.0));
+ gl_FragColor = vec4(1.0, 0.0, TexCoord.s, x[idx]);
+ }
+</script>
+<!-- This one actually fails because of WebGL's restrictions on indexing expressions in fragment shaders -->
+<script id="vwfrag" type="x-shader/x-fragment">
+
+
+ precision mediump float;
+
+ varying vec2 TexCoord;
+
+ void main()
+ {
+ float x[3];
+ x[0] = 1.0;
+ x[1] = 2.0;
+ x[2] = 3.0;
+
+ int idx = 4 * int(max(1.0, TexCoord.x*20.0));
+ x[idx] = 6.0;
+ gl_FragColor = vec4(1.0, 0.0, TexCoord.s, x[idx]);
+ }
+</script>
+<script id="frag" type="x-shader/x-fragment">
+
+
+ precision mediump float;
+
+ varying vec2 TexCoord;
+
+ void main()
+ {
+ gl_FragColor = vec4(1.0, 0.0, TexCoord.s, 1.0);
+ }
+</script>
+
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/glsl/uniformOutOfBounds.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/glsl/uniformOutOfBounds.html
new file mode 100644
index 000000000..e5f1235e3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/glsl/uniformOutOfBounds.html
@@ -0,0 +1,219 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+ var canvas = document.getElementById('gl');
+ var gl = getGLContext(canvas);
+ return [gl];
+}
+
+var arr = ['cr', 'cw', 'vr', 'vw', 'tvw'];
+arr.forEach(function(e){
+ Tests['test'+e+'vert'] = function(gl) {
+ var sh = new Filter(gl, e+'vert', 'frag');
+ assertFail(function(){sh.apply(function(f){
+ f.uniform3fv('x', [0.0, 1.0, 2.0]);
+ throwError(e+"vert");
+ });});
+ sh.destroy();
+ }
+ Tests['test'+e+'frag'] = function(gl) {
+ var sh = new Filter(gl, 'vert', e+'frag');
+ assertFail(function(){sh.apply(function(f){
+ f.uniform3fv('x', [0.0, 1.0, 2.0]);
+ throwError(e+"frag");
+ });});
+ sh.destroy();
+ }
+});
+
+</script>
+<script id="crvert" type="x-shader/x-vertex">
+
+
+ attribute vec3 Vertex; attribute vec2 Tex;
+ uniform float x[3];
+ void main()
+ {
+ gl_Position = vec4(Vertex.st, Tex.s, x[4]);
+ }
+</script>
+<script id="cwvert" type="x-shader/x-vertex">
+
+
+ attribute vec3 Vertex; attribute vec2 Tex;
+ uniform float x[3];
+ void main()
+ {
+ x[4] = Vertex.z;
+ gl_Position = vec4(Vertex.st, Tex.s, x[4]);
+ }
+</script>
+<script id="vrvert" type="x-shader/x-vertex">
+
+
+ uniform float x[3];
+ attribute vec3 Vertex; attribute vec2 Tex;
+ void main()
+ {
+ float idx = 40.0 * max(1.0, Vertex.x*20.0);
+ gl_Position = vec4(Vertex, x[2] + Tex.s + x[int(idx)]);
+ }
+</script>
+<script id="vwvert" type="x-shader/x-vertex">
+
+
+ attribute vec3 Vertex; attribute vec2 Tex;
+ uniform float x[3];
+ void main()
+ {
+ int idx = 4 * int(max(1.0, Vertex.x*20.0));
+ x[idx] = Vertex.z;
+ gl_Position = vec4(Vertex.st, Tex.s, x[idx]);
+ }
+</script>
+<script id="tvwvert" type="x-shader/x-vertex">
+
+
+ attribute vec3 Vertex; attribute vec2 Tex;
+ uniform float x[3];
+ void main()
+ {
+ int idx = 4 * int(max(1.0, Vertex.x*20.0));
+ x[2] = Vertex[idx];
+ gl_Position = vec4(Vertex.st, Tex.s, x[2]);
+ }
+</script>
+<script id="vert" type="x-shader/x-vertex">
+
+
+ attribute vec3 Vertex; attribute vec2 Tex;
+ varying vec2 TexCoord;
+ void main()
+ {
+ TexCoord = Vertex.st;
+ gl_Position = vec4(Vertex, Tex.s);
+ }
+</script>
+
+<script id="crfrag" type="x-shader/x-fragment">
+
+
+ precision mediump float;
+
+ uniform float x[3];
+
+ varying vec2 TexCoord;
+ void main()
+ {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, x[4]);
+ }
+</script>
+<script id="cwfrag" type="x-shader/x-fragment">
+
+
+ precision mediump float;
+
+ uniform float x[3];
+
+ varying vec2 TexCoord;
+ void main()
+ {
+ x[4] = 6.0;
+ gl_FragColor = vec4(1.0, 0.0, 0.0, x[4]);
+ }
+</script>
+<script id="vrfrag" type="x-shader/x-fragment">
+
+
+ precision mediump float;
+
+ uniform float x[3];
+
+ varying vec2 TexCoord;
+ void main()
+ {
+ int idx = 4 * int(max(1.0, TexCoord.s*20.0));
+ gl_FragColor = vec4(1.0, 0.0, 0.0, x[idx]);
+ }
+</script>
+<script id="vwfrag" type="x-shader/x-fragment">
+
+
+ precision mediump float;
+
+ uniform float x[3];
+
+ varying vec2 TexCoord;
+ void main()
+ {
+ int idx = 4 * int(max(1.0, TexCoord.s*20.0));
+ x[idx] = 6.0;
+ gl_FragColor = vec4(1.0, 0.0, 0.0, x[idx]);
+ }
+</script>
+<script id="tvwfrag" type="x-shader/x-fragment">
+
+
+ precision mediump float;
+
+ uniform float x[3];
+
+ varying vec2 TexCoord;
+ void main()
+ {
+ int idx = 4 * int(max(1.0, TexCoord.s*20.0));
+ x[2] = TexCoord[idx];
+ gl_FragColor = vec4(1.0, 0.0, 0.0, x[2]);
+ }
+</script>
+<script id="frag" type="x-shader/x-fragment">
+
+
+ precision mediump float;
+
+ void main()
+ {
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+ }
+</script>
+
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+ <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/unit.css b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/unit.css
new file mode 100644
index 000000000..0758b43bd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/unit.css
@@ -0,0 +1,66 @@
+/*
+Tests for the OpenGL ES 2.0 HTML Canvas context
+
+Copyright (C) 2009 Ilmari Heikkinen <ilmari.heikkinen@gmail.com>
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+.ok {
+ color: green;
+}
+.fail {
+ color: red;
+}
+canvas {
+ display: none;
+}
+#test-status {
+ font-size: large;
+}
+
+#test-log {
+ padding-left: 0.5em;
+ padding-right: 0.5em;
+ background: white;
+ color: black;
+}
+#test-log > div {
+ padding-bottom: 0.5em;
+}
+#test-log h2 {
+ font-size: 1em;
+ margin-bottom: 0em;
+ padding-top: 0.5em;
+}
+#test-log h3 {
+ font-size: small;
+ margin-left: 1.5em;
+ margin-bottom: 0em;
+ margin-top: 0.5em;
+}
+#test-log p {
+ margin-left: 4em;
+ font-size: small;
+ margin-top: 0em;
+ margin-bottom: 0.2em;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/unit.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/unit.js
new file mode 100644
index 000000000..742f8d7b9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/unit.js
@@ -0,0 +1,951 @@
+/*
+Unit testing library for the OpenGL ES 2.0 HTML Canvas context
+*/
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* -- plaform specific code -- */
+
+// WebKit
+if (window.testRunner && !window.layoutTestController) {
+ window.layoutTestController = window.testRunner;
+}
+
+if (window.layoutTestController) {
+ layoutTestController.overridePreference("WebKitWebGLEnabled", "1");
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+
+ // The WebKit testing system compares console output.
+ // Because the output of the WebGL Tests is GPU dependent
+ // we turn off console messages.
+ window.console.log = function() { };
+ window.console.error = function() { };
+
+ // RAF doesn't work in LayoutTests. Disable it so the tests will
+ // use setTimeout instead.
+ window.requestAnimationFrame = undefined;
+ window.webkitRequestAnimationFrame = undefined;
+}
+
+if (window.internals) {
+ window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
+}
+
+/* -- end platform specific code --*/
+Tests = {
+ autorun : true,
+ message : null,
+ delay : 0,
+ autoinit: true,
+
+ startUnit : function(){ return []; },
+ setup : function() { return arguments; },
+ teardown : function() {},
+ endUnit : function() {}
+}
+
+var __testSuccess__ = true;
+var __testFailCount__ = 0;
+var __testLog__;
+var __backlog__ = [];
+
+Object.toSource = function(a, seen){
+ if (a == null) return "null";
+ if (typeof a == 'boolean') return a ? "true" : "false";
+ if (typeof a == 'string') return '"' + a.replace(/"/g, '\\"') + '"';
+ if (a instanceof HTMLElement) return a.toString();
+ if (a.width && a.height && a.data) return "[ImageData]";
+ if (a instanceof Array) {
+ if (!seen) seen = [];
+ var idx = seen.indexOf(a);
+ if (idx != -1) return '#'+(idx+1)+'#';
+ seen.unshift(a);
+ var srcs = a.map(function(o){ return Object.toSource(o,seen) });
+ var prefix = '';
+ idx = seen.indexOf(a);
+ if (idx != -1) prefix = '#'+(idx+1)+'=';
+ return prefix + '[' + srcs.join(", ") + ']';
+ }
+ if (typeof a == 'object') {
+ if (!seen) seen = [];
+ var idx = seen.indexOf(a);
+ if (idx != -1) return '#'+(idx+1)+'#';
+ seen.unshift(a);
+ var members = [];
+ var name;
+ try {
+ for (var i in a) {
+ if (i.search(/^[a-zA-Z0-9]+$/) != -1)
+ name = i;
+ else
+ name = '"' + i.replace(/"/g, '\\"') + '"';
+ var ai;
+ try { ai = a[i]; }
+ catch(e) { ai = 'null /*ERROR_ACCESSING*/'; }
+ var s = name + ':' + Object.toSource(ai, seen);
+ members.push(s);
+ }
+ } catch (e) {}
+ var prefix = '';
+ idx = seen.indexOf(a);
+ if (idx != -1) prefix = '#'+(idx+1)+'=';
+ return prefix + '{' + members.join(", ") + '}'
+ }
+ if (typeof a == 'function')
+ return '('+a.toString().replace(/\n/g, " ").replace(/\s+/g, " ")+')';
+ return a.toString();
+}
+
+function formatError(e) {
+ if (window.console) console.log(e);
+ var pathSegs = location.href.toString().split("/");
+ var currentDoc = e.lineNumber != null ? pathSegs[pathSegs.length - 1] : null;
+ var trace = (e.filename || currentDoc) + ":" + e.lineNumber + (e.trace ? "\n"+e.trace : "");
+ return e.message + "\n" + trace;
+}
+
+function runTests() {
+ var h = document.getElementById('test-status');
+ if (h == null) {
+ h = document.createElement('h1');
+ h.id = 'test-status';
+ document.body.appendChild(h);
+ }
+ h.textContent = "";
+ var log = document.getElementById('test-log');
+ if (log == null) {
+ log = document.createElement('div');
+ log.id = 'test-log';
+ document.body.appendChild(log);
+ }
+ while (log.childNodes.length > 0)
+ log.removeChild(log.firstChild);
+
+ var setup_args = [];
+
+ if (Tests.startUnit != null) {
+ __testLog__ = document.createElement('div');
+ try {
+ setup_args = Tests.startUnit();
+ if (__testLog__.childNodes.length > 0)
+ log.appendChild(__testLog__);
+ } catch(e) {
+ testFailed("startUnit", formatError(e));
+ log.appendChild(__testLog__);
+ printTestStatus();
+ return;
+ }
+ }
+
+ var testsRun = false;
+ var allTestsSuccessful = true;
+
+ for (var i in Tests) {
+ if (i.substring(0,4) != "test") continue;
+ __testLog__ = document.createElement('div');
+ __testSuccess__ = true;
+ try {
+ doTestNotify (i);
+ var args = setup_args;
+ if (Tests.setup != null)
+ args = Tests.setup.apply(Tests, setup_args);
+ Tests[i].apply(Tests, args);
+ if (Tests.teardown != null)
+ Tests.teardown.apply(Tests, args);
+ }
+ catch (e) {
+ testFailed(i, e.name, formatError(e));
+ }
+ if (__testSuccess__ == false) {
+ ++__testFailCount__;
+ }
+ var h = document.createElement('h2');
+ h.textContent = i;
+ __testLog__.insertBefore(h, __testLog__.firstChild);
+ log.appendChild(__testLog__);
+ allTestsSuccessful = allTestsSuccessful && __testSuccess__ == true;
+ reportTestResultsToHarness(__testSuccess__, i);
+ doTestNotify (i+"--"+(__testSuccess__?"OK":"FAIL"));
+ testsRun = true;
+ }
+
+ printTestStatus(testsRun);
+ if (Tests.endUnit != null) {
+ __testLog__ = document.createElement('div');
+ try {
+ Tests.endUnit.apply(Tests, setup_args);
+ if (__testLog__.childNodes.length > 0)
+ log.appendChild(__testLog__);
+ } catch(e) {
+ testFailed("endUnit", e.name, formatError(e));
+ log.appendChild(__testLog__);
+ }
+ }
+ notifyFinishedToHarness(allTestsSuccessful, "finished tests");
+}
+
+function doTestNotify(name) {
+ //try {
+ // var xhr = new XMLHttpRequest();
+ // xhr.open("GET", "http://localhost:8888/"+name, true);
+ // xhr.send(null);
+ //} catch(e) {}
+}
+
+function testFailed(assertName, name) {
+ var d = document.createElement('div');
+ var h = document.createElement('h3');
+ var d1 = document.createElement("span");
+ h.appendChild(d1);
+ d1.appendChild(document.createTextNode("FAIL: "));
+ d1.style.color = "red";
+ h.appendChild(document.createTextNode(
+ name==null ? assertName : name + " (in " + assertName + ")"));
+ d.appendChild(h);
+ var args = []
+ for (var i=2; i<arguments.length; i++) {
+ var a = arguments[i];
+ var p = document.createElement('p');
+ p.style.whiteSpace = 'pre';
+ p.textContent = (a == null) ? "null" :
+ (typeof a == 'boolean' || typeof a == 'string') ? a : Object.toSource(a);
+ args.push(p.textContent);
+ d.appendChild(p);
+ }
+ __testLog__.appendChild(d);
+ __testSuccess__ = false;
+ doTestNotify([assertName, name].concat(args).join("--"));
+}
+
+function testPassed(assertName, name) {
+ var d = document.createElement('div');
+ var h = document.createElement('h3');
+ var d1 = document.createElement("span");
+ h.appendChild(d1);
+ d1.appendChild(document.createTextNode("PASS: "));
+ d1.style.color = "green";
+ h.appendChild(document.createTextNode(
+ name==null ? assertName : name + " (in " + assertName + ")"));
+ d.appendChild(h);
+ var args = []
+ for (var i=2; i<arguments.length; i++) {
+ var a = arguments[i];
+ var p = document.createElement('p');
+ p.style.whiteSpace = 'pre';
+ p.textContent = (a == null) ? "null" :
+ (typeof a == 'boolean' || typeof a == 'string') ? a : Object.toSource(a);
+ args.push(p.textContent);
+ d.appendChild(p);
+ }
+ __testLog__.appendChild(d);
+ doTestNotify([assertName, name].concat(args).join("--"));
+}
+
+function checkTestSuccess() {
+ return __testFailCount__ == 0;
+}
+
+window.addEventListener('load', function(){
+ for (var i=0; i<__backlog__.length; i++)
+ log(__backlog__[i]);
+}, false);
+
+function log(msg) {
+ var p = document.createElement('p');
+ var a = [];
+ for (var i=0; i<arguments.length; i++)
+ a.push(arguments[i]);
+ p.textContent = a.join(", ");
+ if (!__testLog__) {
+ if (document.body)
+ document.body.appendChild(p);
+ else
+ __backlog__.push(msg);
+ } else {
+ __testLog__.appendChild(p);
+ }
+}
+
+function printTestStatus(testsRun) {
+ var status = document.getElementById('test-status');
+ if (testsRun) {
+ status.className = checkTestSuccess() ? 'ok' : 'fail';
+ status.textContent = checkTestSuccess() ? "PASS" : "FAIL";
+ } else {
+ status.className = 'fail';
+ status.textContent = "NO TESTS FOUND";
+ }
+}
+
+function assertFail(name, f) {
+ if (f == null) { f = name; name = null; }
+ var r = false;
+ try { f(); } catch(e) { r=true; }
+ if (!r) {
+ testFailed("assertFail", name, f);
+ return false;
+ } else {
+ testPassed("assertFail", name, f);
+ return true;
+ }
+}
+
+function assertOk(name, f) {
+ if (f == null) { f = name; name = null; }
+ var r = false;
+ var err;
+ try { f(); r=true; } catch(e) { err = e; }
+ if (!r) {
+ testFailed("assertOk", name, f, err.toString());
+ return false;
+ } else {
+ testPassed("assertOk", name, f);
+ return true;
+ }
+}
+
+function assert(name, v) {
+ if (v == null) { v = name; name = null; }
+ if (!v) {
+ testFailed("assert", name, v);
+ return false;
+ } else {
+ testPassed("assert", name, v);
+ return true;
+ }
+}
+
+function assertProperty(name, v, p) {
+ if (p == null) { p = v; v = name; name = p; }
+ if (v[p] == null) {
+ testFailed("assertProperty", name);
+ return false;
+ } else {
+ testPassed("assertProperty", name);
+ return true;
+ }
+}
+
+function compare(a,b) {
+ if (typeof a == 'number' && typeof b == 'number') {
+ return a == b;
+ } else {
+ return Object.toSource(a) == Object.toSource(b);
+ }
+}
+
+function assertEquals(name, v, p) {
+ if (p == null) { p = v; v = name; name = null; }
+ if (!compare(v, p)) {
+ testFailed("assertEquals", name, v, p);
+ return false;
+ } else {
+ testPassed("assertEquals", name, v, p);
+ return true;
+ }
+}
+
+function assertArrayEquals(name, v, p) {
+ if (p == null) { p = v; v = name; name = null; }
+ if (!v) {
+ testFailed("assertArrayEquals: first array undefined", name, v, p);
+ return false;
+ }
+ if (!p) {
+ testFailed("assertArrayEquals: second array undefined", name, v, p);
+ return false;
+ }
+ if (v.length != p.length) {
+ testFailed("assertArrayEquals", name, v, p);
+ return false;
+ }
+ for (var ii = 0; ii < v.length; ++ii) {
+ if (v[ii] != p[ii]) {
+ testFailed("assertArrayEquals", name, v, p);
+ return false;
+ }
+ }
+ testPassed("assertArrayEquals", name, v, p);
+ return true;
+}
+
+function assertArrayEqualsWithEpsilon(name, v, p, l) {
+ if (l == null) { l = p; p = v; v = name; name = null; }
+ if (!v) {
+ testFailed("assertArrayEqualsWithEpsilon: first array undefined", name, v, p);
+ return false;
+ }
+ if (!p) {
+ testFailed("assertArrayEqualsWithEpsilon: second array undefined", name, v, p);
+ return false;
+ }
+ if (!l) {
+ testFailed("assertArrayEqualsWithEpsilon: limit array undefined", name, v, p);
+ return false;
+ }
+ if (v.length != p.length) {
+ testFailed("assertArrayEqualsWithEpsilon", name, v, p, l);
+ return false;
+ }
+ if (v.length != l.length) {
+ testFailed("assertArrayEqualsWithEpsilon", name, v, p, l);
+ return false;
+ }
+ for (var ii = 0; ii < v.length; ++ii) {
+ if (Math.abs(v[ii]- p[ii])>l[ii]) {
+ testFailed("assertArrayEqualsWithEpsilon", name, v, p, l);
+ return false;
+ }
+ }
+ testPassed("assertArrayEqualsWithEpsilon", name, v, p, l);
+ return true;
+}
+
+function assertNotEquals(name, v, p) {
+ if (p == null) { p = v; v = name; name = null; }
+ if (compare(v, p)) {
+ testFailed("assertNotEquals", name, v, p)
+ return false;
+ } else {
+ testPassed("assertNotEquals", name, v, p)
+ return true;
+ }
+}
+
+function time(elementId, f) {
+ var s = document.getElementById(elementId);
+ var t0 = new Date().getTime();
+ f();
+ var t1 = new Date().getTime();
+ s.textContent = 'Elapsed: '+(t1-t0)+' ms';
+}
+
+function randomFloat () {
+ // note that in fuzz-testing, this can used as the size of a buffer to allocate.
+ // so it shouldn't return astronomic values. The maximum value 10000000 is already quite big.
+ var fac = 1.0;
+ var r = Math.random();
+ if (r < 0.25)
+ fac = 10;
+ else if (r < 0.4)
+ fac = 100;
+ else if (r < 0.5)
+ fac = 1000;
+ else if (r < 0.6)
+ fac = 100000;
+ else if (r < 0.7)
+ fac = 10000000;
+ else if (r < 0.8)
+ fac = NaN;
+ return -0.5*fac + Math.random() * fac;
+}
+function randomFloatFromRange(lo, hi) {
+ var r = Math.random();
+ if (r < 0.05)
+ return lo;
+ else if (r > 0.95)
+ return hi;
+ else
+ return lo + Math.random()*(hi-lo);
+}
+function randomInt (sz) {
+ if (sz != null)
+ return Math.floor(Math.random()*sz);
+ else
+ return Math.floor(randomFloat());
+}
+function randomIntFromRange(lo, hi) {
+ return Math.floor(randomFloatFromRange(lo, hi));
+}
+function randomLength () {
+ var l = Math.floor(Math.random() * 256);
+ if (Math.random < 0.5) l = l / 10;
+ if (Math.random < 0.3) l = l / 10;
+ return l;
+}
+function randomSmallIntArray () {
+ var l = randomLength();
+ var s = new Array(l);
+ for (var i=0; i<l; i++)
+ s[i] = Math.floor(Math.random() * 256)-1;
+ return s;
+}
+function randomFloatArray () {
+ var l = randomLength();
+ var s = new Array(l);
+ for (var i=0; i<l; i++)
+ s[i] = randomFloat();
+ return s;
+}
+function randomIntArray () {
+ var l = randomLength();
+ var s = new Array(l);
+ for (var i=0; i<l; i++)
+ s[i] = randomFloat();
+ return s;
+}
+function randomMixedArray () {
+ var l = randomLength();
+ var s = new Array(l);
+ for (var i=0; i<l; i++)
+ s[i] = randomNonArray();
+ return s;
+}
+function randomArray () {
+ var r = Math.random();
+ if (r < 0.3)
+ return randomFloatArray();
+ else if (r < 0.6)
+ return randomIntArray();
+ else if (r < 0.8)
+ return randomSmallIntArray();
+ else
+ return randomMixedArray();
+}
+function randomString () {
+ return String.fromCharCode.apply(String, randomSmallIntArray());
+}
+function randomGLConstant () {
+ return GLConstants[Math.floor(Math.random() * GLConstants.length)];
+}
+
+function randomNonArray() {
+ var r = Math.random();
+ if (r < 0.25) {
+ return randomFloat();
+ } else if (r < 0.6) {
+ return randomInt();
+ } else if (r < 0.7) {
+ return (r < 0.65);
+ } else if (r < 0.87) {
+ return randomString();
+ } else if (r < 0.98) {
+ return randomGLConstant();
+ } else {
+ return null;
+ }
+}
+
+function generateRandomArg(pos, count) {
+ if (pos == 0 && Math.random() < 0.5)
+ return randomGLConstant();
+ if (pos == count-1 && Math.random() < 0.25)
+ if (Math.random() < 0.5)
+ return randomString();
+ else
+ return randomArray();
+ var r = Math.random();
+ if (r < 0.25) {
+ return randomFloat();
+ } else if (r < 0.6) {
+ return randomInt();
+ } else if (r < 0.7) {
+ return (r < 0.65);
+ } else if (r < 0.77) {
+ return randomString();
+ } else if (r < 0.84) {
+ return randomArray();
+ } else if (r < 0.98) {
+ return randomGLConstant();
+ } else {
+ return null;
+ }
+}
+
+
+function generateRandomArgs(count) {
+ var arr = new Array(count);
+ for (var i=0; i<count; i++)
+ arr[i] = generateRandomArg(i, count);
+ return arr;
+}
+
+// qc (arg1gen, arg2gen, ..., predicate)
+// qc (randomString, randomInt, randomInt, function(s,i,j){ s.substring(i,j) })
+function qc() {
+}
+
+GLConstants = [
+1,
+0x00000100,
+0x00000400,
+0x00004000,
+0x0000,
+0x0001,
+0x0002,
+0x0003,
+0x0004,
+0x0005,
+0x0006,
+0,
+1,
+0x0300,
+0x0301,
+0x0302,
+0x0303,
+0x0304,
+0x0305,
+0x0306,
+0x0307,
+0x0308,
+0x8006,
+0x8009,
+0x8009,
+0x883D,
+0x800A,
+0x800B,
+0x80C8,
+0x80C9,
+0x80CA,
+0x80CB,
+0x8001,
+0x8002,
+0x8003,
+0x8004,
+0x8005,
+0x8892,
+0x8893,
+0x8894,
+0x8895,
+0x88E0,
+0x88E4,
+0x88E8,
+0x8764,
+0x8765,
+0x8626,
+0x0404,
+0x0405,
+0x0408,
+0x0DE1,
+0x0B44,
+0x0BE2,
+0x0BD0,
+0x0B90,
+0x0B71,
+0x0C11,
+0x8037,
+0x809E,
+0x80A0,
+0,
+0x0500,
+0x0501,
+0x0502,
+0x0505,
+0x0900,
+0x0901,
+0x0B21,
+0x846D,
+0x846E,
+0x0B45,
+0x0B46,
+0x0B70,
+0x0B72,
+0x0B73,
+0x0B74,
+0x0B91,
+0x0B92,
+0x0B94,
+0x0B95,
+0x0B96,
+0x0B97,
+0x0B93,
+0x0B98,
+0x8800,
+0x8801,
+0x8802,
+0x8803,
+0x8CA3,
+0x8CA4,
+0x8CA5,
+0x0BA2,
+0x0C10,
+0x0C22,
+0x0C23,
+0x0CF5,
+0x0D05,
+0x0D33,
+0x0D3A,
+0x0D50,
+0x0D52,
+0x0D53,
+0x0D54,
+0x0D55,
+0x0D56,
+0x0D57,
+0x2A00,
+0x8038,
+0x8069,
+0x80A8,
+0x80A9,
+0x80AA,
+0x80AB,
+0x86A2,
+0x86A3,
+0x1100,
+0x1101,
+0x1102,
+0x8192,
+0x1400,
+0x1401,
+0x1402,
+0x1403,
+0x1404,
+0x1405,
+0x1406,
+0x140C,
+0x1902,
+0x1906,
+0x1907,
+0x1908,
+0x1909,
+0x190A,
+0x8033,
+0x8034,
+0x8363,
+0x8B30,
+0x8B31,
+0x8869,
+0x8DFB,
+0x8DFC,
+0x8B4D,
+0x8B4C,
+0x8872,
+0x8DFD,
+0x8B4F,
+0x8B80,
+0x8B82,
+0x8B83,
+0x8B85,
+0x8B86,
+0x8B87,
+0x8B89,
+0x8B8A,
+0x8B8C,
+0x8B8D,
+0x0200,
+0x0201,
+0x0202,
+0x0203,
+0x0204,
+0x0205,
+0x0206,
+0x0207,
+0x1E00,
+0x1E01,
+0x1E02,
+0x1E03,
+0x150A,
+0x8507,
+0x8508,
+0x1F00,
+0x1F01,
+0x1F02,
+0x1F03,
+0x2600,
+0x2601,
+0x2700,
+0x2701,
+0x2702,
+0x2703,
+0x2800,
+0x2801,
+0x2802,
+0x2803,
+0x1702,
+0x8513,
+0x8514,
+0x8515,
+0x8516,
+0x8517,
+0x8518,
+0x8519,
+0x851A,
+0x851C,
+0x84C0,
+0x84C1,
+0x84C2,
+0x84C3,
+0x84C4,
+0x84C5,
+0x84C6,
+0x84C7,
+0x84C8,
+0x84C9,
+0x84CA,
+0x84CB,
+0x84CC,
+0x84CD,
+0x84CE,
+0x84CF,
+0x84D0,
+0x84D1,
+0x84D2,
+0x84D3,
+0x84D4,
+0x84D5,
+0x84D6,
+0x84D7,
+0x84D8,
+0x84D9,
+0x84DA,
+0x84DB,
+0x84DC,
+0x84DD,
+0x84DE,
+0x84DF,
+0x84E0,
+0x2901,
+0x812F,
+0x8370,
+0x8B50,
+0x8B51,
+0x8B52,
+0x8B53,
+0x8B54,
+0x8B55,
+0x8B56,
+0x8B57,
+0x8B58,
+0x8B59,
+0x8B5A,
+0x8B5B,
+0x8B5C,
+0x8B5E,
+0x8B60,
+0x8622,
+0x8623,
+0x8624,
+0x8625,
+0x886A,
+0x8645,
+0x889F,
+0x8B9A,
+0x8B9B,
+0x8B81,
+0x8B84,
+0x8B88,
+0x8DFA,
+0x8DF8,
+0x8DF9,
+0x8DF0,
+0x8DF1,
+0x8DF2,
+0x8DF3,
+0x8DF4,
+0x8DF5,
+0x8D40,
+0x8D41,
+0x8056,
+0x8057,
+0x8D62,
+0x81A5,
+0x1901,
+0x8D48,
+0x8D42,
+0x8D43,
+0x8D44,
+0x8D50,
+0x8D51,
+0x8D52,
+0x8D53,
+0x8D54,
+0x8D55,
+0x8CD0,
+0x8CD1,
+0x8CD2,
+0x8CD3,
+0x8CE0,
+0x8D00,
+0x8D20,
+0,
+0x8CD5,
+0x8CD6,
+0x8CD7,
+0x8CD9,
+0x8CDD,
+0x8CA6,
+0x8CA7,
+0x84E8,
+0x0506,
+0x809D
+];
+
+var WPT_TEST_ID = 0;
+function reportTestResultsToHarness(success, msg) {
+ if (window.parent.webglTestHarness) {
+ window.parent.webglTestHarness.reportResults(window.location.pathname, success, msg);
+ } else if (window.test) { // WPT test harness
+ test(function () {
+ assert_true(success, msg);
+ }, "WebGL test #" + (WPT_TEST_ID++) + ": " + msg);
+ }
+}
+
+function notifyFinishedToHarness() {
+ if (window.parent.webglTestHarness) {
+ window.parent.webglTestHarness.notifyFinished(window.location.pathname);
+ }
+}
+
+function initTests() {
+ if (Tests.message != null) {
+ var h = document.getElementById('test-message');
+ if (h == null) {
+ h = document.createElement('p');
+ h.id = 'test-message';
+ document.body.insertBefore(h, document.body.firstChild);
+ }
+ h.textContent = Tests.message;
+ }
+ if (Tests.autorun) {
+ runTests();
+ } else {
+ var h = document.getElementById('test-run');
+ if (h == null) {
+ h = document.createElement('input');
+ h.type = 'submit';
+ h.value = "Run tests";
+ h.addEventListener('click', function(ev){
+ runTests();
+ ev.preventDefault();
+ }, false);
+ h.id = 'test-run';
+ document.body.insertBefore(h, document.body.firstChild);
+ }
+ h.textContent = Tests.message;
+ }
+
+}
+
+window.addEventListener('load', function(){
+ if (Tests.autoinit) {
+ // let the browser hopefully finish updating the gl canvas surfaces if we are given a delay
+ if (Tests.delay)
+ setTimeout(initTests, Tests.delay);
+ else
+ initTests()
+ }
+}, false);
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/util.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/util.js
new file mode 100644
index 000000000..e1d5d638a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/more/util.js
@@ -0,0 +1,1286 @@
+/*
+Utilities for the OpenGL ES 2.0 HTML Canvas context
+*/
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+function loadTexture(gl, elem, mipmaps) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, elem);
+ if (mipmaps != false)
+ gl.generateMipmap(gl.TEXTURE_2D);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ if (mipmaps)
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);
+ else
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ return tex;
+}
+
+function getShader(gl, id) {
+ var shaderScript = document.getElementById(id);
+ if (!shaderScript) {
+ throw(new Error("No shader element with id: "+id));
+ }
+
+ var str = "";
+ var k = shaderScript.firstChild;
+ while (k) {
+ if (k.nodeType == 3)
+ str += k.textContent;
+ k = k.nextSibling;
+ }
+
+ var shader;
+ if (shaderScript.type == "x-shader/x-fragment") {
+ shader = gl.createShader(gl.FRAGMENT_SHADER);
+ } else if (shaderScript.type == "x-shader/x-vertex") {
+ shader = gl.createShader(gl.VERTEX_SHADER);
+ } else {
+ throw(new Error("Unknown shader type "+shaderScript.type));
+ }
+
+ gl.shaderSource(shader, str);
+ gl.compileShader(shader);
+
+ if (gl.getShaderParameter(shader, gl.COMPILE_STATUS) != 1) {
+ var ilog = gl.getShaderInfoLog(shader);
+ gl.deleteShader(shader);
+ throw(new Error("Failed to compile shader "+shaderScript.id + ", Shader info log: " + ilog));
+ }
+ return shader;
+}
+
+function loadShaderArray(gl, shaders) {
+ var id = gl.createProgram();
+ var shaderObjs = [];
+ for (var i=0; i<shaders.length; ++i) {
+ try {
+ var sh = getShader(gl, shaders[i]);
+ shaderObjs.push(sh);
+ gl.attachShader(id, sh);
+ } catch (e) {
+ var pr = {program: id, shaders: shaderObjs};
+ deleteShader(gl, pr);
+ throw (e);
+ }
+ }
+ var prog = {program: id, shaders: shaderObjs};
+ gl.linkProgram(id);
+ gl.validateProgram(id);
+ if (gl.getProgramParameter(id, gl.LINK_STATUS) != 1) {
+ deleteShader(gl,prog);
+ throw(new Error("Failed to link shader"));
+ }
+ if (gl.getProgramParameter(id, gl.VALIDATE_STATUS) != 1) {
+ deleteShader(gl,prog);
+ throw(new Error("Failed to validate shader"));
+ }
+ return prog;
+}
+function loadShader(gl) {
+ var sh = [];
+ for (var i=1; i<arguments.length; ++i)
+ sh.push(arguments[i]);
+ return loadShaderArray(gl, sh);
+}
+
+function deleteShader(gl, sh) {
+ gl.useProgram(null);
+ sh.shaders.forEach(function(s){
+ gl.detachShader(sh.program, s);
+ gl.deleteShader(s);
+ });
+ gl.deleteProgram(sh.program);
+}
+
+function getGLErrorAsString(ctx, err) {
+ if (err === ctx.NO_ERROR) {
+ return "NO_ERROR";
+ }
+ for (var name in ctx) {
+ if (ctx[name] === err) {
+ return name;
+ }
+ }
+ return err.toString();
+}
+
+function checkError(gl, msg) {
+ var e = gl.getError();
+ if (e != gl.NO_ERROR) {
+ log("Error " + getGLErrorAsString(gl, e) + " at " + msg);
+ }
+ return e;
+}
+
+function throwError(gl, msg) {
+ var e = gl.getError();
+ if (e != 0) {
+ throw(new Error("Error " + getGLErrorAsString(gl, e) + " at " + msg));
+ }
+}
+
+Math.cot = function(z) { return 1.0 / Math.tan(z); }
+
+/*
+ Matrix utilities, using the OpenGL element order where
+ the last 4 elements are the translation column.
+
+ Uses flat arrays as matrices for performance.
+
+ Most operations have in-place variants to avoid allocating temporary matrices.
+
+ Naming logic:
+ Matrix.method operates on a 4x4 Matrix and returns a new Matrix.
+ Matrix.method3x3 operates on a 3x3 Matrix and returns a new Matrix. Not all operations have a 3x3 version (as 3x3 is usually only used for the normal matrix: Matrix.transpose3x3(Matrix.inverseTo3x3(mat4x4)))
+ Matrix.method[3x3]InPlace(args, target) stores its result in the target matrix.
+
+ Matrix.scale([sx, sy, sz]) -- non-uniform scale by vector
+ Matrix.scale1(s) -- uniform scale by scalar
+ Matrix.scale3(sx, sy, sz) -- non-uniform scale by scalars
+
+ Ditto for translate.
+*/
+Matrix = {
+ identity : [
+ 1.0, 0.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0, 0.0,
+ 0.0, 0.0, 1.0, 0.0,
+ 0.0, 0.0, 0.0, 1.0
+ ],
+
+ newIdentity : function() {
+ return [
+ 1.0, 0.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0, 0.0,
+ 0.0, 0.0, 1.0, 0.0,
+ 0.0, 0.0, 0.0, 1.0
+ ];
+ },
+
+ newIdentity3x3 : function() {
+ return [
+ 1.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0,
+ 0.0, 0.0, 1.0
+ ];
+ },
+
+ copyMatrix : function(src, dst) {
+ for (var i=0; i<16; i++) dst[i] = src[i];
+ return dst;
+ },
+
+ to3x3 : function(m) {
+ return [
+ m[0], m[1], m[2],
+ m[4], m[5], m[6],
+ m[8], m[9], m[10]
+ ];
+ },
+
+ // orthonormal matrix inverse
+ inverseON : function(m) {
+ var n = this.transpose4x4(m);
+ var t = [m[12], m[13], m[14]];
+ n[3] = n[7] = n[11] = 0;
+ n[12] = -Vec3.dot([n[0], n[4], n[8]], t);
+ n[13] = -Vec3.dot([n[1], n[5], n[9]], t);
+ n[14] = -Vec3.dot([n[2], n[6], n[10]], t);
+ return n;
+ },
+
+ inverseTo3x3 : function(m) {
+ return this.inverse4x4to3x3InPlace(m, this.newIdentity3x3());
+ },
+
+ inverseTo3x3InPlace : function(m,n) {
+ var a11 = m[10]*m[5]-m[6]*m[9],
+ a21 = -m[10]*m[1]+m[2]*m[9],
+ a31 = m[6]*m[1]-m[2]*m[5],
+ a12 = -m[10]*m[4]+m[6]*m[8],
+ a22 = m[10]*m[0]-m[2]*m[8],
+ a32 = -m[6]*m[0]+m[2]*m[4],
+ a13 = m[9]*m[4]-m[5]*m[8],
+ a23 = -m[9]*m[0]+m[1]*m[8],
+ a33 = m[5]*m[0]-m[1]*m[4];
+ var det = m[0]*(a11) + m[1]*(a12) + m[2]*(a13);
+ if (det == 0) // no inverse
+ return [1,0,0,0,1,0,0,0,1];
+ var idet = 1 / det;
+ n[0] = idet*a11;
+ n[1] = idet*a21;
+ n[2] = idet*a31;
+ n[3] = idet*a12;
+ n[4] = idet*a22;
+ n[5] = idet*a32;
+ n[6] = idet*a13;
+ n[7] = idet*a23;
+ n[8] = idet*a33;
+ return n;
+ },
+
+ inverse3x3 : function(m) {
+ return this.inverse3x3InPlace(m, this.newIdentity3x3());
+ },
+
+ inverse3x3InPlace : function(m,n) {
+ var a11 = m[8]*m[4]-m[5]*m[7],
+ a21 = -m[8]*m[1]+m[2]*m[7],
+ a31 = m[5]*m[1]-m[2]*m[4],
+ a12 = -m[8]*m[3]+m[5]*m[6],
+ a22 = m[8]*m[0]-m[2]*m[6],
+ a32 = -m[5]*m[0]+m[2]*m[3],
+ a13 = m[7]*m[4]-m[4]*m[8],
+ a23 = -m[7]*m[0]+m[1]*m[6],
+ a33 = m[4]*m[0]-m[1]*m[3];
+ var det = m[0]*(a11) + m[1]*(a12) + m[2]*(a13);
+ if (det == 0) // no inverse
+ return [1,0,0,0,1,0,0,0,1];
+ var idet = 1 / det;
+ n[0] = idet*a11;
+ n[1] = idet*a21;
+ n[2] = idet*a31;
+ n[3] = idet*a12;
+ n[4] = idet*a22;
+ n[5] = idet*a32;
+ n[6] = idet*a13;
+ n[7] = idet*a23;
+ n[8] = idet*a33;
+ return n;
+ },
+
+ frustum : function (left, right, bottom, top, znear, zfar) {
+ var X = 2*znear/(right-left);
+ var Y = 2*znear/(top-bottom);
+ var A = (right+left)/(right-left);
+ var B = (top+bottom)/(top-bottom);
+ var C = -(zfar+znear)/(zfar-znear);
+ var D = -2*zfar*znear/(zfar-znear);
+
+ return [
+ X, 0, 0, 0,
+ 0, Y, 0, 0,
+ A, B, C, -1,
+ 0, 0, D, 0
+ ];
+ },
+
+ perspective : function (fovy, aspect, znear, zfar) {
+ var ymax = znear * Math.tan(fovy * Math.PI / 360.0);
+ var ymin = -ymax;
+ var xmin = ymin * aspect;
+ var xmax = ymax * aspect;
+
+ return this.frustum(xmin, xmax, ymin, ymax, znear, zfar);
+ },
+
+ mul4x4 : function (a,b) {
+ return this.mul4x4InPlace(a,b,this.newIdentity());
+ },
+
+ mul4x4InPlace : function (a, b, c) {
+ c[0] = b[0] * a[0] +
+ b[0+1] * a[4] +
+ b[0+2] * a[8] +
+ b[0+3] * a[12];
+ c[0+1] = b[0] * a[1] +
+ b[0+1] * a[5] +
+ b[0+2] * a[9] +
+ b[0+3] * a[13];
+ c[0+2] = b[0] * a[2] +
+ b[0+1] * a[6] +
+ b[0+2] * a[10] +
+ b[0+3] * a[14];
+ c[0+3] = b[0] * a[3] +
+ b[0+1] * a[7] +
+ b[0+2] * a[11] +
+ b[0+3] * a[15];
+ c[4] = b[4] * a[0] +
+ b[4+1] * a[4] +
+ b[4+2] * a[8] +
+ b[4+3] * a[12];
+ c[4+1] = b[4] * a[1] +
+ b[4+1] * a[5] +
+ b[4+2] * a[9] +
+ b[4+3] * a[13];
+ c[4+2] = b[4] * a[2] +
+ b[4+1] * a[6] +
+ b[4+2] * a[10] +
+ b[4+3] * a[14];
+ c[4+3] = b[4] * a[3] +
+ b[4+1] * a[7] +
+ b[4+2] * a[11] +
+ b[4+3] * a[15];
+ c[8] = b[8] * a[0] +
+ b[8+1] * a[4] +
+ b[8+2] * a[8] +
+ b[8+3] * a[12];
+ c[8+1] = b[8] * a[1] +
+ b[8+1] * a[5] +
+ b[8+2] * a[9] +
+ b[8+3] * a[13];
+ c[8+2] = b[8] * a[2] +
+ b[8+1] * a[6] +
+ b[8+2] * a[10] +
+ b[8+3] * a[14];
+ c[8+3] = b[8] * a[3] +
+ b[8+1] * a[7] +
+ b[8+2] * a[11] +
+ b[8+3] * a[15];
+ c[12] = b[12] * a[0] +
+ b[12+1] * a[4] +
+ b[12+2] * a[8] +
+ b[12+3] * a[12];
+ c[12+1] = b[12] * a[1] +
+ b[12+1] * a[5] +
+ b[12+2] * a[9] +
+ b[12+3] * a[13];
+ c[12+2] = b[12] * a[2] +
+ b[12+1] * a[6] +
+ b[12+2] * a[10] +
+ b[12+3] * a[14];
+ c[12+3] = b[12] * a[3] +
+ b[12+1] * a[7] +
+ b[12+2] * a[11] +
+ b[12+3] * a[15];
+ return c;
+ },
+
+ mulv4 : function (a, v) {
+ c = new Array(4);
+ for (var i=0; i<4; ++i) {
+ var x = 0;
+ for (var k=0; k<4; ++k)
+ x += v[k] * a[k*4+i];
+ c[i] = x;
+ }
+ return c;
+ },
+
+ rotate : function (angle, axis) {
+ axis = Vec3.normalize(axis);
+ var x=axis[0], y=axis[1], z=axis[2];
+ var c = Math.cos(angle);
+ var c1 = 1-c;
+ var s = Math.sin(angle);
+ return [
+ x*x*c1+c, y*x*c1+z*s, z*x*c1-y*s, 0,
+ x*y*c1-z*s, y*y*c1+c, y*z*c1+x*s, 0,
+ x*z*c1+y*s, y*z*c1-x*s, z*z*c1+c, 0,
+ 0,0,0,1
+ ];
+ },
+ rotateInPlace : function(angle, axis, m) {
+ axis = Vec3.normalize(axis);
+ var x=axis[0], y=axis[1], z=axis[2];
+ var c = Math.cos(angle);
+ var c1 = 1-c;
+ var s = Math.sin(angle);
+ var tmpMatrix = this.tmpMatrix;
+ var tmpMatrix2 = this.tmpMatrix2;
+ tmpMatrix[0] = x*x*c1+c; tmpMatrix[1] = y*x*c1+z*s; tmpMatrix[2] = z*x*c1-y*s; tmpMatrix[3] = 0;
+ tmpMatrix[4] = x*y*c1-z*s; tmpMatrix[5] = y*y*c1+c; tmpMatrix[6] = y*z*c1+x*s; tmpMatrix[7] = 0;
+ tmpMatrix[8] = x*z*c1+y*s; tmpMatrix[9] = y*z*c1-x*s; tmpMatrix[10] = z*z*c1+c; tmpMatrix[11] = 0;
+ tmpMatrix[12] = 0; tmpMatrix[13] = 0; tmpMatrix[14] = 0; tmpMatrix[15] = 1;
+ this.copyMatrix(m, tmpMatrix2);
+ return this.mul4x4InPlace(tmpMatrix2, tmpMatrix, m);
+ },
+
+ scale : function(v) {
+ return [
+ v[0], 0, 0, 0,
+ 0, v[1], 0, 0,
+ 0, 0, v[2], 0,
+ 0, 0, 0, 1
+ ];
+ },
+ scale3 : function(x,y,z) {
+ return [
+ x, 0, 0, 0,
+ 0, y, 0, 0,
+ 0, 0, z, 0,
+ 0, 0, 0, 1
+ ];
+ },
+ scale1 : function(s) {
+ return [
+ s, 0, 0, 0,
+ 0, s, 0, 0,
+ 0, 0, s, 0,
+ 0, 0, 0, 1
+ ];
+ },
+ scale3InPlace : function(x, y, z, m) {
+ var tmpMatrix = this.tmpMatrix;
+ var tmpMatrix2 = this.tmpMatrix2;
+ tmpMatrix[0] = x; tmpMatrix[1] = 0; tmpMatrix[2] = 0; tmpMatrix[3] = 0;
+ tmpMatrix[4] = 0; tmpMatrix[5] = y; tmpMatrix[6] = 0; tmpMatrix[7] = 0;
+ tmpMatrix[8] = 0; tmpMatrix[9] = 0; tmpMatrix[10] = z; tmpMatrix[11] = 0;
+ tmpMatrix[12] = 0; tmpMatrix[13] = 0; tmpMatrix[14] = 0; tmpMatrix[15] = 1;
+ this.copyMatrix(m, tmpMatrix2);
+ return this.mul4x4InPlace(tmpMatrix2, tmpMatrix, m);
+ },
+ scale1InPlace : function(s, m) { return this.scale3InPlace(s, s, s, m); },
+ scaleInPlace : function(s, m) { return this.scale3InPlace(s[0],s[1],s[2],m); },
+
+ translate3 : function(x,y,z) {
+ return [
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ x, y, z, 1
+ ];
+ },
+
+ translate : function(v) {
+ return this.translate3(v[0], v[1], v[2]);
+ },
+ tmpMatrix : [0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0],
+ tmpMatrix2 : [0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0],
+ translate3InPlace : function(x,y,z,m) {
+ var tmpMatrix = this.tmpMatrix;
+ var tmpMatrix2 = this.tmpMatrix2;
+ tmpMatrix[0] = 1; tmpMatrix[1] = 0; tmpMatrix[2] = 0; tmpMatrix[3] = 0;
+ tmpMatrix[4] = 0; tmpMatrix[5] = 1; tmpMatrix[6] = 0; tmpMatrix[7] = 0;
+ tmpMatrix[8] = 0; tmpMatrix[9] = 0; tmpMatrix[10] = 1; tmpMatrix[11] = 0;
+ tmpMatrix[12] = x; tmpMatrix[13] = y; tmpMatrix[14] = z; tmpMatrix[15] = 1;
+ this.copyMatrix(m, tmpMatrix2);
+ return this.mul4x4InPlace(tmpMatrix2, tmpMatrix, m);
+ },
+ translateInPlace : function(v,m){ return this.translate3InPlace(v[0], v[1], v[2], m); },
+
+ lookAt : function (eye, center, up) {
+ var z = Vec3.direction(eye, center);
+ var x = Vec3.normalizeInPlace(Vec3.cross(up, z));
+ var y = Vec3.normalizeInPlace(Vec3.cross(z, x));
+
+ var m = [
+ x[0], y[0], z[0], 0,
+ x[1], y[1], z[1], 0,
+ x[2], y[2], z[2], 0,
+ 0, 0, 0, 1
+ ];
+
+ var t = [
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ -eye[0], -eye[1], -eye[2], 1
+ ];
+
+ return this.mul4x4(m,t);
+ },
+
+ transpose4x4 : function(m) {
+ return [
+ m[0], m[4], m[8], m[12],
+ m[1], m[5], m[9], m[13],
+ m[2], m[6], m[10], m[14],
+ m[3], m[7], m[11], m[15]
+ ];
+ },
+
+ transpose4x4InPlace : function(m) {
+ var tmp = 0.0;
+ tmp = m[1]; m[1] = m[4]; m[4] = tmp;
+ tmp = m[2]; m[2] = m[8]; m[8] = tmp;
+ tmp = m[3]; m[3] = m[12]; m[12] = tmp;
+ tmp = m[6]; m[6] = m[9]; m[9] = tmp;
+ tmp = m[7]; m[7] = m[13]; m[13] = tmp;
+ tmp = m[11]; m[11] = m[14]; m[14] = tmp;
+ return m;
+ },
+
+ transpose3x3 : function(m) {
+ return [
+ m[0], m[3], m[6],
+ m[1], m[4], m[7],
+ m[2], m[5], m[8]
+ ];
+ },
+
+ transpose3x3InPlace : function(m) {
+ var tmp = 0.0;
+ tmp = m[1]; m[1] = m[3]; m[3] = tmp;
+ tmp = m[2]; m[2] = m[6]; m[6] = tmp;
+ tmp = m[5]; m[5] = m[7]; m[7] = tmp;
+ return m;
+ },
+}
+
+Vec3 = {
+ make : function() { return [0,0,0]; },
+ copy : function(v) { return [v[0],v[1],v[2]]; },
+
+ add : function (u,v) {
+ return [u[0]+v[0], u[1]+v[1], u[2]+v[2]];
+ },
+
+ sub : function (u,v) {
+ return [u[0]-v[0], u[1]-v[1], u[2]-v[2]];
+ },
+
+ negate : function (u) {
+ return [-u[0], -u[1], -u[2]];
+ },
+
+ direction : function (u,v) {
+ return this.normalizeInPlace(this.sub(u,v));
+ },
+
+ normalizeInPlace : function(v) {
+ var imag = 1.0 / Math.sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);
+ v[0] *= imag; v[1] *= imag; v[2] *= imag;
+ return v;
+ },
+
+ normalize : function(v) {
+ return this.normalizeInPlace(this.copy(v));
+ },
+
+ scale : function(f, v) {
+ return [f*v[0], f*v[1], f*v[2]];
+ },
+
+ dot : function(u,v) {
+ return u[0]*v[0] + u[1]*v[1] + u[2]*v[2];
+ },
+
+ inner : function(u,v) {
+ return [u[0]*v[0], u[1]*v[1], u[2]*v[2]];
+ },
+
+ cross : function(u,v) {
+ return [
+ u[1]*v[2] - u[2]*v[1],
+ u[2]*v[0] - u[0]*v[2],
+ u[0]*v[1] - u[1]*v[0]
+ ];
+ }
+}
+
+Shader = function(gl){
+ this.gl = gl;
+ this.shaders = [];
+ this.uniformLocations = {};
+ this.attribLocations = {};
+ for (var i=1; i<arguments.length; i++) {
+ this.shaders.push(arguments[i]);
+ }
+}
+Shader.prototype = {
+ id : null,
+ gl : null,
+ compiled : false,
+ shader : null,
+ shaders : [],
+
+ destroy : function() {
+ if (this.shader != null) deleteShader(this.gl, this.shader);
+ },
+
+ compile : function() {
+ this.shader = loadShaderArray(this.gl, this.shaders);
+ },
+
+ use : function() {
+ if (this.shader == null)
+ this.compile();
+ this.gl.useProgram(this.shader.program);
+ },
+
+ uniform1fv : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniform1fv(loc, value);
+ },
+
+ uniform2fv : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniform2fv(loc, value);
+ },
+
+ uniform3fv : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniform3fv(loc, value);
+ },
+
+ uniform4fv : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniform4fv(loc, value);
+ },
+
+ uniform1f : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniform1f(loc, value);
+ },
+
+ uniform2f : function(name, v1,v2) {
+ var loc = this.uniform(name);
+ this.gl.uniform2f(loc, v1,v2);
+ },
+
+ uniform3f : function(name, v1,v2,v3) {
+ var loc = this.uniform(name);
+ this.gl.uniform3f(loc, v1,v2,v3);
+ },
+
+ uniform4f : function(name, v1,v2,v3,v4) {
+ var loc = this.uniform(name);
+ this.gl.uniform4f(loc, v1, v2, v3, v4);
+ },
+
+ uniform1iv : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniform1iv(loc, value);
+ },
+
+ uniform2iv : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniform2iv(loc, value);
+ },
+
+ uniform3iv : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniform3iv(loc, value);
+ },
+
+ uniform4iv : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniform4iv(loc, value);
+ },
+
+ uniform1i : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniform1i(loc, value);
+ },
+
+ uniform2i : function(name, v1,v2) {
+ var loc = this.uniform(name);
+ this.gl.uniform2i(loc, v1,v2);
+ },
+
+ uniform3i : function(name, v1,v2,v3) {
+ var loc = this.uniform(name);
+ this.gl.uniform3i(loc, v1,v2,v3);
+ },
+
+ uniform4i : function(name, v1,v2,v3,v4) {
+ var loc = this.uniform(name);
+ this.gl.uniform4i(loc, v1, v2, v3, v4);
+ },
+
+ uniformMatrix4fv : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniformMatrix4fv(loc, false, value);
+ },
+
+ uniformMatrix3fv : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniformMatrix3fv(loc, false, value);
+ },
+
+ uniformMatrix2fv : function(name, value) {
+ var loc = this.uniform(name);
+ this.gl.uniformMatrix2fv(loc, false, value);
+ },
+
+ attrib : function(name) {
+ if (this.attribLocations[name] == null) {
+ var loc = this.gl.getAttribLocation(this.shader.program, name);
+ this.attribLocations[name] = loc;
+ }
+ return this.attribLocations[name];
+ },
+
+ uniform : function(name) {
+ if (this.uniformLocations[name] == null) {
+ var loc = this.gl.getUniformLocation(this.shader.program, name);
+ this.uniformLocations[name] = loc;
+ }
+ return this.uniformLocations[name];
+ }
+}
+Filter = function(gl, shader) {
+ Shader.apply(this, arguments);
+}
+Filter.prototype = new Shader();
+Filter.prototype.apply = function(init) {
+ this.use();
+ var va = this.attrib("Vertex");
+ var ta = this.attrib("Tex");
+ var vbo = Quad.getCachedVBO(this.gl);
+ if (init) init(this);
+ vbo.draw(va, null, ta);
+}
+
+
+VBO = function(gl) {
+ this.gl = gl;
+ this.data = [];
+ this.elementsVBO = null;
+ for (var i=1; i<arguments.length; i++) {
+ if (arguments[i].elements)
+ this.elements = arguments[i];
+ else
+ this.data.push(arguments[i]);
+ }
+}
+
+VBO.prototype = {
+ initialized : false,
+ length : 0,
+ vbos : null,
+ type : 'TRIANGLES',
+ elementsVBO : null,
+ elements : null,
+
+ setData : function() {
+ this.destroy();
+ this.data = [];
+ for (var i=0; i<arguments.length; i++) {
+ if (arguments[i].elements)
+ this.elements = arguments[i];
+ else
+ this.data.push(arguments[i]);
+ }
+ },
+
+ destroy : function() {
+ if (this.vbos != null)
+ for (var i=0; i<this.vbos.length; i++)
+ this.gl.deleteBuffer(this.vbos[i]);
+ if (this.elementsVBO != null)
+ this.gl.deleteBuffer(this.elementsVBO);
+ this.length = this.elementsLength = 0;
+ this.vbos = this.elementsVBO = null;
+ this.initialized = false;
+ },
+
+ init : function() {
+ this.destroy();
+ var gl = this.gl;
+
+ gl.getError();
+ var vbos = [];
+ var length = 0;
+ for (var i=0; i<this.data.length; i++)
+ vbos.push(gl.createBuffer());
+ if (this.elements != null)
+ this.elementsVBO = gl.createBuffer();
+ try {
+ throwError(gl, "genBuffers");
+ for (var i = 0; i<this.data.length; i++) {
+ var d = this.data[i];
+ var dlen = Math.floor(d.data.length / d.size);
+ if (i == 0 || dlen < length)
+ length = dlen;
+ if (!d.floatArray)
+ d.floatArray = new Float32Array(d.data);
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbos[i]);
+ throwError(gl, "bindBuffer");
+ gl.bufferData(gl.ARRAY_BUFFER, d.floatArray, gl.STATIC_DRAW);
+ throwError(gl, "bufferData");
+ }
+ if (this.elementsVBO != null) {
+ var d = this.elements;
+ this.elementsLength = d.data.length;
+ this.elementsType = d.type == gl.UNSIGNED_BYTE ? d.type : gl.UNSIGNED_SHORT;
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.elementsVBO);
+ throwError(gl, "bindBuffer ELEMENT_ARRAY_BUFFER");
+ if (this.elementsType == gl.UNSIGNED_SHORT && !d.ushortArray) {
+ d.ushortArray = new Uint16Array(d.data);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, d.ushortArray, gl.STATIC_DRAW);
+ } else if (this.elementsType == gl.UNSIGNED_BYTE && !d.ubyteArray) {
+ d.ubyteArray = new Uint8Array(d.data);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, d.ubyteArray, gl.STATIC_DRAW);
+ }
+ throwError(gl, "bufferData ELEMENT_ARRAY_BUFFER");
+ }
+ } catch(e) {
+ for (var i=0; i<vbos.length; i++)
+ gl.deleteBuffer(vbos[i]);
+ throw(e);
+ }
+
+ gl.bindBuffer(gl.ARRAY_BUFFER, null);
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+
+ this.length = length;
+ this.vbos = vbos;
+
+ this.initialized = true;
+ },
+
+ use : function() {
+ if (!this.initialized) this.init();
+ var gl = this.gl;
+ for (var i=0; i<arguments.length; i++) {
+ if (arguments[i] == null || arguments[i] == -1) continue;
+ gl.bindBuffer(gl.ARRAY_BUFFER, this.vbos[i]);
+ gl.vertexAttribPointer(arguments[i], this.data[i].size, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(arguments[i]);
+ }
+ if (this.elementsVBO != null) {
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.elementsVBO);
+ }
+ },
+
+ draw : function() {
+ var args = [];
+ this.use.apply(this, arguments);
+ var gl = this.gl;
+ if (this.elementsVBO != null) {
+ gl.drawElements(gl[this.type], this.elementsLength, this.elementsType, 0);
+ } else {
+ gl.drawArrays(gl[this.type], 0, this.length);
+ }
+ }
+}
+
+FBO = function(gl, width, height, use_depth) {
+ this.gl = gl;
+ this.width = width;
+ this.height = height;
+ if (use_depth != null)
+ this.useDepth = use_depth;
+}
+FBO.prototype = {
+ initialized : false,
+ useDepth : true,
+ fbo : null,
+ rbo : null,
+ texture : null,
+
+ destroy : function() {
+ if (this.fbo) this.gl.deleteFramebuffer(this.fbo);
+ if (this.rbo) this.gl.deleteRenderbuffer(this.rbo);
+ if (this.texture) this.gl.deleteTexture(this.texture);
+ },
+
+ init : function() {
+ var gl = this.gl;
+ var w = this.width, h = this.height;
+ var fbo = this.fbo != null ? this.fbo : gl.createFramebuffer();
+ var rb;
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ checkError(gl, "FBO.init bindFramebuffer");
+ if (this.useDepth) {
+ rb = this.rbo != null ? this.rbo : gl.createRenderbuffer();
+ gl.bindRenderbuffer(gl.RENDERBUFFER, rb);
+ checkError(gl, "FBO.init bindRenderbuffer");
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, w, h);
+ checkError(gl, "FBO.init renderbufferStorage");
+ }
+
+ var tex = this.texture != null ? this.texture : gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ try {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, w, h, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ } catch (e) { // argh, no null texture support
+ var tmp = this.getTempCanvas(w,h);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, tmp);
+ }
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ checkError(gl, "FBO.init tex");
+
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);
+ checkError(gl, "FBO.init bind tex");
+
+ if (this.useDepth) {
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, rb);
+ checkError(gl, "FBO.init bind depth buffer");
+ }
+
+ var fbstat = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
+ if (fbstat != gl.FRAMEBUFFER_COMPLETE) {
+ var glv;
+ for (var v in gl) {
+ try { glv = gl[v]; } catch (e) { glv = null; }
+ if (glv == fbstat) { fbstat = v; break; }}
+ log("Framebuffer status: " + fbstat);
+ }
+ checkError(gl, "FBO.init check fbo");
+
+ this.fbo = fbo;
+ this.rbo = rb;
+ this.texture = tex;
+ this.initialized = true;
+ },
+
+ getTempCanvas : function(w, h) {
+ if (!FBO.tempCanvas) {
+ FBO.tempCanvas = document.createElement('canvas');
+ }
+ FBO.tempCanvas.width = w;
+ FBO.tempCanvas.height = h;
+ return FBO.tempCanvas;
+ },
+
+ use : function() {
+ if (!this.initialized) this.init();
+ this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, this.fbo);
+ }
+}
+
+function GLError(err, msg, fileName, lineNumber) {
+ this.message = msg;
+ this.glError = err;
+}
+
+GLError.prototype = new Error();
+
+function makeGLErrorWrapper(gl, fname) {
+ return (function() {
+ try {
+ var rv = gl[fname].apply(gl, arguments);
+ var err = gl.getError();
+ if (err != gl.NO_ERROR) {
+ throw(new GLError(
+ err, "GL error "+getGLErrorAsString(gl, err)+" in "+fname));
+ }
+ return rv;
+ } catch (e) {
+ if (e.glError !== undefined) {
+ throw e;
+ }
+ throw(new Error("Threw " + e.name +
+ " in " + fname + "\n" +
+ e.message + "\n" +
+ arguments.callee.caller));
+ }
+ });
+}
+
+function wrapGLContext(gl) {
+ var wrap = {};
+ for (var i in gl) {
+ try {
+ if (typeof gl[i] == 'function') {
+ wrap[i] = makeGLErrorWrapper(gl, i);
+ } else {
+ wrap[i] = gl[i];
+ }
+ } catch (e) {
+ // log("wrapGLContext: Error accessing " + i);
+ }
+ }
+ wrap.getError = function(){ return gl.getError(); };
+ return wrap;
+}
+
+function getGLContext(canvas) {
+ return canvas.getContext(GL_CONTEXT_ID, {antialias: false});
+}
+
+// Assert that f generates a specific GL error.
+function assertGLError(gl, err, name, f) {
+ if (f == null) { f = name; name = null; }
+ var r = false;
+ var glErr = 0;
+ try { f(); } catch(e) { r=true; glErr = e.glError; }
+ if (glErr !== err) {
+ if (glErr === undefined) {
+ testFailed("assertGLError: UNEXPECTED EXCEPTION", name, f);
+ } else {
+ testFailed("assertGLError: expected: " + getGLErrorAsString(gl, err) +
+ " actual: " + getGLErrorAsString(gl, glErr), name, f);
+ }
+ return false;
+ }
+ return true;
+}
+
+// Assert that f generates a GL error from a list.
+function assertGLErrorIn(gl, expectedErrorList, name, f) {
+ if (f == null) { f = name; name = null; }
+
+ var actualError = 0;
+ try {
+ f();
+ } catch(e) {
+ if ('glError' in e) {
+ actualError = e.glError;
+ } else {
+ testFailed("assertGLError: UNEXPCETED EXCEPTION", name, f);
+ return false;
+ }
+ }
+
+ var expectedErrorStrList = [];
+ var expectedErrorSet = {};
+ for (var i in expectedErrorList) {
+ var cur = expectedErrorList[i];
+ expectedErrorSet[cur] = true;
+ expectedErrorStrList.push(getGLErrorAsString(gl, cur));
+ }
+ var expectedErrorListStr = "[" + expectedErrorStrList.join(", ") + "]";
+
+ if (actualError in expectedErrorSet) {
+ return true;
+ }
+
+ testFailed("assertGLError: expected: " + expectedErrorListStr +
+ " actual: " + getGLErrorAsString(gl, actualError), name, f);
+ return false;
+}
+
+// Assert that f generates some GL error. Used in situations where it's
+// ambigious which of multiple possible errors will be generated.
+function assertSomeGLError(gl, name, f) {
+ if (f == null) { f = name; name = null; }
+ var r = false;
+ var glErr = 0;
+ var err = 0;
+ try { f(); } catch(e) { r=true; glErr = e.glError; }
+ if (glErr === 0) {
+ if (glErr === undefined) {
+ testFailed("assertGLError: UNEXPECTED EXCEPTION", name, f);
+ } else {
+ testFailed("assertGLError: expected: " + getGLErrorAsString(gl, err) +
+ " actual: " + getGLErrorAsString(gl, glErr), name, f);
+ }
+ return false;
+ }
+ return true;
+}
+
+// Assert that f throws an exception but does not generate a GL error.
+function assertThrowNoGLError(gl, name, f) {
+ if (f == null) { f = name; name = null; }
+ var r = false;
+ var glErr = undefined;
+ var exp;
+ try { f(); } catch(e) { r=true; glErr = e.glError; exp = e;}
+ if (!r) {
+ testFailed(
+ "assertThrowNoGLError: should have thrown exception", name, f);
+ return false;
+ } else {
+ if (glErr !== undefined) {
+ testFailed(
+ "assertThrowNoGLError: should be no GL error but generated: " +
+ getGLErrorAsString(gl, glErr), name, f);
+ return false;
+ }
+ }
+ testPassed("assertThrowNoGLError", name, f);
+ return true;
+}
+
+Quad = {
+ vertices : [
+ -1,-1,0,
+ 1,-1,0,
+ -1,1,0,
+ 1,-1,0,
+ 1,1,0,
+ -1,1,0
+ ],
+ normals : [
+ 0,0,-1,
+ 0,0,-1,
+ 0,0,-1,
+ 0,0,-1,
+ 0,0,-1,
+ 0,0,-1
+ ],
+ texcoords : [
+ 0,0,
+ 1,0,
+ 0,1,
+ 1,0,
+ 1,1,
+ 0,1
+ ],
+ indices : [0,1,2,1,5,2],
+ makeVBO : function(gl) {
+ return new VBO(gl,
+ {size:3, data: Quad.vertices},
+ {size:3, data: Quad.normals},
+ {size:2, data: Quad.texcoords}
+ )
+ },
+ cache: {},
+ getCachedVBO : function(gl) {
+ if (!this.cache[gl])
+ this.cache[gl] = this.makeVBO(gl);
+ return this.cache[gl];
+ }
+}
+Cube = {
+ vertices : [ 0.5, -0.5, 0.5, // +X
+ 0.5, -0.5, -0.5,
+ 0.5, 0.5, -0.5,
+ 0.5, 0.5, 0.5,
+
+ 0.5, 0.5, 0.5, // +Y
+ 0.5, 0.5, -0.5,
+ -0.5, 0.5, -0.5,
+ -0.5, 0.5, 0.5,
+
+ 0.5, 0.5, 0.5, // +Z
+ -0.5, 0.5, 0.5,
+ -0.5, -0.5, 0.5,
+ 0.5, -0.5, 0.5,
+
+ -0.5, -0.5, 0.5, // -X
+ -0.5, 0.5, 0.5,
+ -0.5, 0.5, -0.5,
+ -0.5, -0.5, -0.5,
+
+ -0.5, -0.5, 0.5, // -Y
+ -0.5, -0.5, -0.5,
+ 0.5, -0.5, -0.5,
+ 0.5, -0.5, 0.5,
+
+ -0.5, -0.5, -0.5, // -Z
+ -0.5, 0.5, -0.5,
+ 0.5, 0.5, -0.5,
+ 0.5, -0.5, -0.5,
+ ],
+
+ normals : [ 1, 0, 0,
+ 1, 0, 0,
+ 1, 0, 0,
+ 1, 0, 0,
+
+ 0, 1, 0,
+ 0, 1, 0,
+ 0, 1, 0,
+ 0, 1, 0,
+
+ 0, 0, 1,
+ 0, 0, 1,
+ 0, 0, 1,
+ 0, 0, 1,
+
+ -1, 0, 0,
+ -1, 0, 0,
+ -1, 0, 0,
+ -1, 0, 0,
+
+ 0,-1, 0,
+ 0,-1, 0,
+ 0,-1, 0,
+ 0,-1, 0,
+
+ 0, 0,-1,
+ 0, 0,-1,
+ 0, 0,-1,
+ 0, 0,-1
+ ],
+
+ indices : [],
+ create : function(){
+ for (var i = 0; i < 6; i++) {
+ Cube.indices.push(i*4 + 0);
+ Cube.indices.push(i*4 + 1);
+ Cube.indices.push(i*4 + 3);
+ Cube.indices.push(i*4 + 1);
+ Cube.indices.push(i*4 + 2);
+ Cube.indices.push(i*4 + 3);
+ }
+ },
+
+ makeVBO : function(gl) {
+ return new VBO(gl,
+ {size:3, data: Cube.vertices},
+ {size:3, data: Cube.normals},
+ {elements: true, data: Cube.indices}
+ )
+ },
+ cache : {},
+ getCachedVBO : function(gl) {
+ if (!this.cache[gl])
+ this.cache[gl] = this.makeVBO(gl);
+ return this.cache[gl];
+ }
+}
+Cube.create();
+
+Sphere = {
+ vertices : [],
+ normals : [],
+ indices : [],
+ create : function(){
+ var r = 0.75;
+ function vert(theta, phi)
+ {
+ var r = 0.75;
+ var x, y, z, nx, ny, nz;
+
+ nx = Math.sin(theta) * Math.cos(phi);
+ ny = Math.sin(phi);
+ nz = Math.cos(theta) * Math.cos(phi);
+ Sphere.normals.push(nx);
+ Sphere.normals.push(ny);
+ Sphere.normals.push(nz);
+
+ x = r * Math.sin(theta) * Math.cos(phi);
+ y = r * Math.sin(phi);
+ z = r * Math.cos(theta) * Math.cos(phi);
+ Sphere.vertices.push(x);
+ Sphere.vertices.push(y);
+ Sphere.vertices.push(z);
+ }
+ for (var phi = -Math.PI/2; phi < Math.PI/2; phi += Math.PI/20) {
+ var phi2 = phi + Math.PI/20;
+ for (var theta = -Math.PI/2; theta <= Math.PI/2; theta += Math.PI/20) {
+ vert(theta, phi);
+ vert(theta, phi2);
+ }
+ }
+ }
+}
+
+Sphere.create();
+
+initGL_CONTEXT_ID = function(){
+ var c = document.createElement('canvas');
+ var contextNames = ['webgl', 'experimental-webgl'];
+ GL_CONTEXT_ID = null;
+ for (var i=0; i<contextNames.length; i++) {
+ try {
+ if (c.getContext(contextNames[i])) {
+ GL_CONTEXT_ID = contextNames[i];
+ break;
+ }
+ } catch (e) {
+ }
+ }
+ if (!GL_CONTEXT_ID) {
+ log("No WebGL context found. Unable to run tests.");
+ }
+}
+
+initGL_CONTEXT_ID();
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/00_test_list.txt
new file mode 100644
index 000000000..4b4237c9f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/00_test_list.txt
@@ -0,0 +1,2 @@
+mustpass.run.txt
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_001_to_006.html
new file mode 100644
index 000000000..8e66e0afa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: abs_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "abs_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "abs_float_frag_xvary.frag"
+ },
+ "name": "abs_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "abs_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "abs_vec2_frag_xvary.frag"
+ },
+ "name": "abs_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "abs_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "abs_vec3_frag_xvary.frag"
+ },
+ "name": "abs_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "abs_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "abs_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "abs_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "abs_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "abs_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "abs_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "abs_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "abs_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "abs_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_frag_xvary.frag
new file mode 100644
index 000000000..6bea68938
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(abs(c), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..af4160817
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_frag_xvary_ref.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (color.r - 0.5);
+ if(c < 0.0) c *= -1.0;
+
+ gl_FragColor = vec4(c, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_vert_xvary.vert
new file mode 100644
index 000000000..ab995eeb5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (gtf_Color.r - 0.5);
+ color = vec4(abs(c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..b6cd22e50
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_vert_xvary_ref.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (gtf_Color.r - 0.5);
+ if(c < 0.0) c *= -1.0;
+
+ color = vec4(c, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_frag_xvary.frag
new file mode 100644
index 000000000..5dd0df27b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(abs(c), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..043273bca
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_frag_xvary_ref.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (color.rg - 0.5);
+ if((c[0] < 0.0)) c[0] *= -1.0;
+ if((c[1] < 0.0)) c[1] *= -1.0;
+
+ gl_FragColor = vec4(c, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_vert_xvary.vert
new file mode 100644
index 000000000..391b24334
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(abs(c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..0e0cf0076
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_vert_xvary_ref.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ if((c[0] < 0.0)) c[0] *= -1.0;
+ if((c[1] < 0.0)) c[1] *= -1.0;
+
+ color = vec4(c, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_frag_xvary.frag
new file mode 100644
index 000000000..3c61c301c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(abs(c), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..91ea0ccf0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_frag_xvary_ref.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (color.rgb - 0.5);
+ if((c[0] < 0.0)) c[0] *= -1.0;
+ if((c[1] < 0.0)) c[1] *= -1.0;
+ if((c[2] < 0.0)) c[2] *= -1.0;
+
+
+ gl_FragColor = vec4(c, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_vert_xvary.vert
new file mode 100644
index 000000000..7b0098d09
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(abs(c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..29798b28a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_vert_xvary_ref.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+ if((c[0] < 0.0)) c[0] *= -1.0;
+ if((c[1] < 0.0)) c[1] *= -1.0;
+ if((c[2] < 0.0)) c[2] *= -1.0;
+
+ color = vec4(c, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/input.run.txt
new file mode 100644
index 000000000..ebf5dc91f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+abs_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html
new file mode 100644
index 000000000..09a4d1667
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: acos_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "acos_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "acos_float_frag_xvary.frag"
+ },
+ "name": "acos_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "acos_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "acos_vec2_frag_xvary.frag"
+ },
+ "name": "acos_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "acos_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "acos_vec3_frag_xvary.frag"
+ },
+ "name": "acos_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "acos_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "acos_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "acos_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "acos_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "acos_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "acos_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "acos_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "acos_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "acos_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary.frag
new file mode 100644
index 000000000..a1a2dc793
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(acos(c) / M_PI, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..94428a926
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary_ref.frag
@@ -0,0 +1,111 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+/* The following files are direct copies of each other:
+ *
+ * GL/acos/acos_float_frag_xvary_ref.frag
+ * GL/asin/asin_float_frag_xvary_ref.frag
+ *
+ * Care should be taken to apply any changes to both. Only the last
+ * line where gl_FragColor is assigned should be different.
+ */
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float lerp(float a, float b, float s)
+{
+ return a + (b - a) * s;
+}
+
+void main (void)
+{
+ float asinValues[17];
+ asinValues[0] = -1.5708;
+ asinValues[1] = -1.06544;
+ asinValues[2] = -0.848062;
+ asinValues[3] = -0.675132;
+ asinValues[4] = -0.523599;
+ asinValues[5] = -0.384397;
+ asinValues[6] = -0.25268;
+ asinValues[7] = -0.125328;
+ asinValues[8] = 0.0;
+ asinValues[9] = 0.125328;
+ asinValues[10] = 0.25268;
+ asinValues[11] = 0.384397;
+ asinValues[12] = 0.523599;
+ asinValues[13] = 0.675132;
+ asinValues[14] = 0.848062;
+ asinValues[15] = 1.06544;
+ asinValues[16] = 1.5708;
+
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * (color.r - 0.5);
+
+ float arrVal = (c + 1.0) * 8.0;
+ int arr0 = int(floor(arrVal));
+ float weight = arrVal - floor(arrVal);
+ float asin_c = 0.0;
+
+ if (arr0 == 0)
+ asin_c = lerp(asinValues[0], asinValues[1], weight);
+ else if (arr0 == 1)
+ asin_c = lerp(asinValues[1], asinValues[2], weight);
+ else if (arr0 == 2)
+ asin_c = lerp(asinValues[2], asinValues[3], weight);
+ else if (arr0 == 3)
+ asin_c = lerp(asinValues[3], asinValues[4], weight);
+ else if (arr0 == 4)
+ asin_c = lerp(asinValues[4], asinValues[5], weight);
+ else if (arr0 == 5)
+ asin_c = lerp(asinValues[5], asinValues[6], weight);
+ else if (arr0 == 6)
+ asin_c = lerp(asinValues[6], asinValues[7], weight);
+ else if (arr0 == 7)
+ asin_c = lerp(asinValues[7], asinValues[8], weight);
+ else if (arr0 == 8)
+ asin_c = lerp(asinValues[8], asinValues[9], weight);
+ else if (arr0 == 9)
+ asin_c = lerp(asinValues[9], asinValues[10], weight);
+ else if (arr0 == 10)
+ asin_c = lerp(asinValues[10], asinValues[11], weight);
+ else if (arr0 == 11)
+ asin_c = lerp(asinValues[11], asinValues[12], weight);
+ else if (arr0 == 12)
+ asin_c = lerp(asinValues[12], asinValues[13], weight);
+ else if (arr0 == 13)
+ asin_c = lerp(asinValues[13], asinValues[14], weight);
+ else if (arr0 == 14)
+ asin_c = lerp(asinValues[14], asinValues[15], weight);
+ else if (arr0 == 15)
+ asin_c = lerp(asinValues[15], asinValues[16], weight);
+ else if (arr0 == 16)
+ asin_c = asinValues[16];
+
+ // acos(x) = PI/2 - asin(x)
+ gl_FragColor = vec4(0.5 - asin_c / M_PI, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_vert_xvary.vert
new file mode 100644
index 000000000..79269d10e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * (gtf_Color.r - 0.5);
+ color = vec4(acos(c) / M_PI, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..8e05e26cf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_vert_xvary_ref.vert
@@ -0,0 +1,58 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * (gtf_Color.r - 0.5);
+
+ float acos_c = 0.0;
+ float scale = 1.0;
+ float sign = 1.0;
+
+ // pow can't handle negative numbers so take advantage of symmetry
+ if(c < 0.0)
+ {
+ sign = -1.0;
+ c *= -1.0;
+ }
+
+ // Taylors series expansion for acos
+ // 1000/2 iterations necessary to get the accuracy with this method
+ for(int i = 1; i < 1000; i += 2)
+ {
+ acos_c += scale * pow(c, float(i)) / float(i);
+ scale *= float(i) / float(i + 1);
+ }
+ acos_c = M_PI / 2.0 - sign * acos_c;
+
+ color = vec4(acos_c / M_PI, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_frag_xvary.frag
new file mode 100644
index 000000000..e2204d1f7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(acos(c) / M_PI, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..efa40ccb9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_frag_xvary_ref.frag
@@ -0,0 +1,147 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+/* The following files are direct copies of each other:
+ *
+ * GL/acos/acos_vec2_frag_xvary_ref.frag
+ * GL/asin/asin_vec2_frag_xvary_ref.frag
+ *
+ * Care should be taken to apply any changes to both. Only the last
+ * line where gl_FragColor is assigned should be different.
+ */
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float lerp(float a, float b, float s)
+{
+ return a + (b - a) * s;
+}
+
+void main (void)
+{
+ float asinValues[17];
+ asinValues[0] = -1.5708;
+ asinValues[1] = -1.06544;
+ asinValues[2] = -0.848062;
+ asinValues[3] = -0.675132;
+ asinValues[4] = -0.523599;
+ asinValues[5] = -0.384397;
+ asinValues[6] = -0.25268;
+ asinValues[7] = -0.125328;
+ asinValues[8] = 0.0;
+ asinValues[9] = 0.125328;
+ asinValues[10] = 0.25268;
+ asinValues[11] = 0.384397;
+ asinValues[12] = 0.523599;
+ asinValues[13] = 0.675132;
+ asinValues[14] = 0.848062;
+ asinValues[15] = 1.06544;
+ asinValues[16] = 1.5708;
+
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * (color.rg - 0.5);
+
+ vec2 arrVal = (c + vec2(1.0, 1.0)) * 8.0;
+ int arr0x = int(floor(arrVal.x));
+ int arr0y = int(floor(arrVal.y));
+ vec2 weight = arrVal - floor(arrVal);
+ vec2 asin_c = vec2(0.0);
+
+ if (arr0x == 0)
+ asin_c.x = lerp(asinValues[0], asinValues[1], weight.x);
+ else if (arr0x == 1)
+ asin_c.x = lerp(asinValues[1], asinValues[2], weight.x);
+ else if (arr0x == 2)
+ asin_c.x = lerp(asinValues[2], asinValues[3], weight.x);
+ else if (arr0x == 3)
+ asin_c.x = lerp(asinValues[3], asinValues[4], weight.x);
+ else if (arr0x == 4)
+ asin_c.x = lerp(asinValues[4], asinValues[5], weight.x);
+ else if (arr0x == 5)
+ asin_c.x = lerp(asinValues[5], asinValues[6], weight.x);
+ else if (arr0x == 6)
+ asin_c.x = lerp(asinValues[6], asinValues[7], weight.x);
+ else if (arr0x == 7)
+ asin_c.x = lerp(asinValues[7], asinValues[8], weight.x);
+ else if (arr0x == 8)
+ asin_c.x = lerp(asinValues[8], asinValues[9], weight.x);
+ else if (arr0x == 9)
+ asin_c.x = lerp(asinValues[9], asinValues[10], weight.x);
+ else if (arr0x == 10)
+ asin_c.x = lerp(asinValues[10], asinValues[11], weight.x);
+ else if (arr0x == 11)
+ asin_c.x = lerp(asinValues[11], asinValues[12], weight.x);
+ else if (arr0x == 12)
+ asin_c.x = lerp(asinValues[12], asinValues[13], weight.x);
+ else if (arr0x == 13)
+ asin_c.x = lerp(asinValues[13], asinValues[14], weight.x);
+ else if (arr0x == 14)
+ asin_c.x = lerp(asinValues[14], asinValues[15], weight.x);
+ else if (arr0x == 15)
+ asin_c.x = lerp(asinValues[15], asinValues[16], weight.x);
+ else if (arr0x == 16)
+ asin_c.x = asinValues[16];
+
+ if (arr0y == 0)
+ asin_c.y = lerp(asinValues[0], asinValues[1], weight.y);
+ else if (arr0y == 1)
+ asin_c.y = lerp(asinValues[1], asinValues[2], weight.y);
+ else if (arr0y == 2)
+ asin_c.y = lerp(asinValues[2], asinValues[3], weight.y);
+ else if (arr0y == 3)
+ asin_c.y = lerp(asinValues[3], asinValues[4], weight.y);
+ else if (arr0y == 4)
+ asin_c.y = lerp(asinValues[4], asinValues[5], weight.y);
+ else if (arr0y == 5)
+ asin_c.y = lerp(asinValues[5], asinValues[6], weight.y);
+ else if (arr0y == 6)
+ asin_c.y = lerp(asinValues[6], asinValues[7], weight.y);
+ else if (arr0y == 7)
+ asin_c.y = lerp(asinValues[7], asinValues[8], weight.y);
+ else if (arr0y == 8)
+ asin_c.y = lerp(asinValues[8], asinValues[9], weight.y);
+ else if (arr0y == 9)
+ asin_c.y = lerp(asinValues[9], asinValues[10], weight.y);
+ else if (arr0y == 10)
+ asin_c.y = lerp(asinValues[10], asinValues[11], weight.y);
+ else if (arr0y == 11)
+ asin_c.y = lerp(asinValues[11], asinValues[12], weight.y);
+ else if (arr0y == 12)
+ asin_c.y = lerp(asinValues[12], asinValues[13], weight.y);
+ else if (arr0y == 13)
+ asin_c.y = lerp(asinValues[13], asinValues[14], weight.y);
+ else if (arr0y == 14)
+ asin_c.y = lerp(asinValues[14], asinValues[15], weight.y);
+ else if (arr0y == 15)
+ asin_c.y = lerp(asinValues[15], asinValues[16], weight.y);
+ else if (arr0y == 16)
+ asin_c.y = asinValues[16];
+
+ // acos(x) = PI/2 - asin(x)
+ gl_FragColor = vec4(0.5 - asin_c / M_PI, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_vert_xvary.vert
new file mode 100644
index 000000000..c3751eceb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(acos(c) / M_PI, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..eb6bb5d96
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_vert_xvary_ref.vert
@@ -0,0 +1,73 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ vec2 acos_c = vec2(0.0);
+ vec2 scale = vec2(1.0);
+ vec2 sign = vec2(1.0);
+
+ // pow can't handle negative numbers so take advantage of symmetry
+ if(c.r < 0.0)
+ {
+ sign.r = -1.0;
+ c.r *= -1.0;
+ }
+
+ // Taylors series expansion for acos
+ // 1000/2 iterations necessary to get the accuracy with this method
+ for(int i = 1; i < 1000; i += 2)
+ {
+ acos_c.r += scale.r * pow(c.r, float(i)) / float(i);
+ scale.r *= float(i) / float(i + 1);
+ }
+ acos_c.r = M_PI / 2.0 - sign.r * acos_c.r;
+
+ // pow can't handle negative numbers so take advantage of symmetry
+ if(c.g < 0.0)
+ {
+ sign.g = -1.0;
+ c.g *= -1.0;
+ }
+
+ // Taylors series expansion for acos
+ // 1000/2 iterations necessary to get the accuracy with this method
+ for(int i = 1; i < 1000; i += 2)
+ {
+ acos_c.g += scale.g * pow(c.g, float(i)) / float(i);
+ scale.g *= float(i) / float(i + 1);
+ }
+ acos_c.g = M_PI / 2.0 - sign.g * acos_c.g;
+
+ color = vec4(acos_c / M_PI, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_frag_xvary.frag
new file mode 100644
index 000000000..0c3f1a976
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(acos(c) / M_PI, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..50032f199
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_frag_xvary_ref.frag
@@ -0,0 +1,183 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+/* The following files are direct copies of each other:
+ *
+ * GL/acos/acos_vec3_frag_xvary_ref.frag
+ * GL/asin/asin_vec3_frag_xvary_ref.frag
+ *
+ * Care should be taken to apply any changes to both. Only the last
+ * line where gl_FragColor is assigned should be different.
+ */
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float lerp(float a, float b, float s)
+{
+ return a + (b - a) * s;
+}
+
+void main (void)
+{
+ float asinValues[17];
+ asinValues[0] = -1.5708;
+ asinValues[1] = -1.06544;
+ asinValues[2] = -0.848062;
+ asinValues[3] = -0.675132;
+ asinValues[4] = -0.523599;
+ asinValues[5] = -0.384397;
+ asinValues[6] = -0.25268;
+ asinValues[7] = -0.125328;
+ asinValues[8] = 0.0;
+ asinValues[9] = 0.125328;
+ asinValues[10] = 0.25268;
+ asinValues[11] = 0.384397;
+ asinValues[12] = 0.523599;
+ asinValues[13] = 0.675132;
+ asinValues[14] = 0.848062;
+ asinValues[15] = 1.06544;
+ asinValues[16] = 1.5708;
+
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * (color.rgb - 0.5);
+
+ vec3 arrVal = (c + vec3(1.0, 1.0, 1.0)) * 8.0;
+ int arr0x = int(floor(arrVal.x));
+ int arr0y = int(floor(arrVal.y));
+ int arr0z = int(floor(arrVal.z));
+ vec3 weight = arrVal - floor(arrVal);
+ vec3 asin_c = vec3(0.0);
+
+ if (arr0x == 0)
+ asin_c.x = lerp(asinValues[0], asinValues[1], weight.x);
+ else if (arr0x == 1)
+ asin_c.x = lerp(asinValues[1], asinValues[2], weight.x);
+ else if (arr0x == 2)
+ asin_c.x = lerp(asinValues[2], asinValues[3], weight.x);
+ else if (arr0x == 3)
+ asin_c.x = lerp(asinValues[3], asinValues[4], weight.x);
+ else if (arr0x == 4)
+ asin_c.x = lerp(asinValues[4], asinValues[5], weight.x);
+ else if (arr0x == 5)
+ asin_c.x = lerp(asinValues[5], asinValues[6], weight.x);
+ else if (arr0x == 6)
+ asin_c.x = lerp(asinValues[6], asinValues[7], weight.x);
+ else if (arr0x == 7)
+ asin_c.x = lerp(asinValues[7], asinValues[8], weight.x);
+ else if (arr0x == 8)
+ asin_c.x = lerp(asinValues[8], asinValues[9], weight.x);
+ else if (arr0x == 9)
+ asin_c.x = lerp(asinValues[9], asinValues[10], weight.x);
+ else if (arr0x == 10)
+ asin_c.x = lerp(asinValues[10], asinValues[11], weight.x);
+ else if (arr0x == 11)
+ asin_c.x = lerp(asinValues[11], asinValues[12], weight.x);
+ else if (arr0x == 12)
+ asin_c.x = lerp(asinValues[12], asinValues[13], weight.x);
+ else if (arr0x == 13)
+ asin_c.x = lerp(asinValues[13], asinValues[14], weight.x);
+ else if (arr0x == 14)
+ asin_c.x = lerp(asinValues[14], asinValues[15], weight.x);
+ else if (arr0x == 15)
+ asin_c.x = lerp(asinValues[15], asinValues[16], weight.x);
+ else if (arr0x == 16)
+ asin_c.x = asinValues[16];
+
+ if (arr0y == 0)
+ asin_c.y = lerp(asinValues[0], asinValues[1], weight.y);
+ else if (arr0y == 1)
+ asin_c.y = lerp(asinValues[1], asinValues[2], weight.y);
+ else if (arr0y == 2)
+ asin_c.y = lerp(asinValues[2], asinValues[3], weight.y);
+ else if (arr0y == 3)
+ asin_c.y = lerp(asinValues[3], asinValues[4], weight.y);
+ else if (arr0y == 4)
+ asin_c.y = lerp(asinValues[4], asinValues[5], weight.y);
+ else if (arr0y == 5)
+ asin_c.y = lerp(asinValues[5], asinValues[6], weight.y);
+ else if (arr0y == 6)
+ asin_c.y = lerp(asinValues[6], asinValues[7], weight.y);
+ else if (arr0y == 7)
+ asin_c.y = lerp(asinValues[7], asinValues[8], weight.y);
+ else if (arr0y == 8)
+ asin_c.y = lerp(asinValues[8], asinValues[9], weight.y);
+ else if (arr0y == 9)
+ asin_c.y = lerp(asinValues[9], asinValues[10], weight.y);
+ else if (arr0y == 10)
+ asin_c.y = lerp(asinValues[10], asinValues[11], weight.y);
+ else if (arr0y == 11)
+ asin_c.y = lerp(asinValues[11], asinValues[12], weight.y);
+ else if (arr0y == 12)
+ asin_c.y = lerp(asinValues[12], asinValues[13], weight.y);
+ else if (arr0y == 13)
+ asin_c.y = lerp(asinValues[13], asinValues[14], weight.y);
+ else if (arr0y == 14)
+ asin_c.y = lerp(asinValues[14], asinValues[15], weight.y);
+ else if (arr0y == 15)
+ asin_c.y = lerp(asinValues[15], asinValues[16], weight.y);
+ else if (arr0y == 16)
+ asin_c.y = asinValues[16];
+
+ if (arr0z == 0)
+ asin_c.z = lerp(asinValues[0], asinValues[1], weight.z);
+ else if (arr0z == 1)
+ asin_c.z = lerp(asinValues[1], asinValues[2], weight.z);
+ else if (arr0z == 2)
+ asin_c.z = lerp(asinValues[2], asinValues[3], weight.z);
+ else if (arr0z == 3)
+ asin_c.z = lerp(asinValues[3], asinValues[4], weight.z);
+ else if (arr0z == 4)
+ asin_c.z = lerp(asinValues[4], asinValues[5], weight.z);
+ else if (arr0z == 5)
+ asin_c.z = lerp(asinValues[5], asinValues[6], weight.z);
+ else if (arr0z == 6)
+ asin_c.z = lerp(asinValues[6], asinValues[7], weight.z);
+ else if (arr0z == 7)
+ asin_c.z = lerp(asinValues[7], asinValues[8], weight.z);
+ else if (arr0z == 8)
+ asin_c.z = lerp(asinValues[8], asinValues[9], weight.z);
+ else if (arr0z == 9)
+ asin_c.z = lerp(asinValues[9], asinValues[10], weight.z);
+ else if (arr0z == 10)
+ asin_c.z = lerp(asinValues[10], asinValues[11], weight.z);
+ else if (arr0z == 11)
+ asin_c.z = lerp(asinValues[11], asinValues[12], weight.z);
+ else if (arr0z == 12)
+ asin_c.z = lerp(asinValues[12], asinValues[13], weight.z);
+ else if (arr0z == 13)
+ asin_c.z = lerp(asinValues[13], asinValues[14], weight.z);
+ else if (arr0z == 14)
+ asin_c.z = lerp(asinValues[14], asinValues[15], weight.z);
+ else if (arr0z == 15)
+ asin_c.z = lerp(asinValues[15], asinValues[16], weight.z);
+ else if (arr0z == 16)
+ asin_c.z = asinValues[16];
+
+ // acos(x) = PI/2 - asin(x)
+ gl_FragColor = vec4(0.5 - asin_c / M_PI, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_vert_xvary.vert
new file mode 100644
index 000000000..5bc077388
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(acos(c) / M_PI, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..a382a4573
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_vert_xvary_ref.vert
@@ -0,0 +1,89 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+ vec3 acos_c = vec3(0.0);
+ vec3 scale = vec3(1.0);
+ vec3 sign = vec3(1.0);
+
+ // pow can't handle negative numbers so take advantage of symmetry
+ if(c.r < 0.0)
+ {
+ sign.r = -1.0;
+ c.r *= -1.0;
+ }
+
+ // Taylors series expansion for acos
+ // 1000/2 iterations necessary to get the accuracy with this method
+ for(int i = 1; i < 1000; i += 2)
+ {
+ acos_c.r += scale.r * pow(c.r, float(i)) / float(i);
+ scale.r *= float(i) / float(i + 1);
+ }
+ acos_c.r = M_PI / 2.0 - sign.r * acos_c.r;
+
+ // pow can't handle negative numbers so take advantage of symmetry
+ if(c.g < 0.0)
+ {
+ sign.g = -1.0;
+ c.g *= -1.0;
+ }
+
+ // Taylors series expansion for acos
+ // 1000/2 iterations necessary to get the accuracy with this method
+ for(int i = 1; i < 1000; i += 2)
+ {
+ acos_c.g += scale.g * pow(c.g, float(i)) / float(i);
+ scale.g *= float(i) / float(i + 1);
+ }
+ acos_c.g = M_PI / 2.0 - sign.g * acos_c.g;
+
+ // pow can't handle negative numbers so take advantage of symmetry
+ if(c.b < 0.0)
+ {
+ sign.b = -1.0;
+ c.b *= -1.0;
+ }
+
+ // Taylors series expansion for acos
+ // 1000/2 iterations necessary to get the accuracy with this method
+ for(int i = 1; i < 1000; i += 2)
+ {
+ acos_c.b += scale.b * pow(c.b, float(i)) / float(i);
+ scale.b *= float(i) / float(i + 1);
+ }
+ acos_c.b = M_PI / 2.0 - sign.b * acos_c.b;
+
+ color = vec4(acos_c / M_PI, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/input.run.txt
new file mode 100644
index 000000000..fc7eedaa0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+acos_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_001_to_004.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_001_to_004.html
new file mode 100644
index 000000000..78ec7e76e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_001_to_004.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: all_001_to_004.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "all_bvec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "all_bvec2_frag.frag"
+ },
+ "name": "all_bvec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "all_bvec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "all_bvec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "all_bvec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "all_bvec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "all_bvec3_frag.frag"
+ },
+ "name": "all_bvec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "all_bvec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "all_bvec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "all_bvec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_frag.frag
new file mode 100644
index 000000000..0e3071418
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(4.0 * color.rg); // 3/4 true, 1/4 false
+ gl_FragColor = vec4(vec3(all(bvec2(c))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_frag_ref.frag
new file mode 100644
index 000000000..b0cefec6a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_frag_ref.frag
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bool _all(in bvec2 a)
+{
+ bool temp = true;
+
+ if(!a[0]) temp = false;
+ if(!a[1]) temp = false;
+
+ return temp;
+}
+
+void main (void)
+{
+ vec2 c = floor(4.0 * color.rg); // 3/4 true, 1/4 false
+ gl_FragColor = vec4(vec3(_all(bvec2(c))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_vert.vert
new file mode 100644
index 000000000..6beab14c5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_vert.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(4.0 * gtf_Color.rg); // 3/4 true, 1/4 false
+ color = vec4(vec3(all(bvec2(c))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_vert_ref.vert
new file mode 100644
index 000000000..82278b3b1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_vert_ref.vert
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bool _all(in bvec2 a)
+{
+ bool temp = true;
+
+ if(!a[0]) temp = false;
+ if(!a[1]) temp = false;
+
+ return temp;
+}
+
+void main (void)
+{
+ vec2 c = floor(4.0 * gtf_Color.rg); // 3/4 true, 1/4 false
+ color = vec4(vec3(_all(bvec2(c))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_frag.frag
new file mode 100644
index 000000000..bab07bbbc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(4.0 * color.rgb); // 3/4 true, 1/4 false
+ gl_FragColor = vec4(vec3(all(bvec3(c))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_frag_ref.frag
new file mode 100644
index 000000000..458540b70
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_frag_ref.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bool _all(in bvec3 a)
+{
+ bool temp = true;
+
+ if(!a[0]) temp = false;
+ if(!a[1]) temp = false;
+ if(!a[2]) temp = false;
+
+ return temp;
+}
+
+void main (void)
+{
+ vec3 c = floor(4.0 * color.rgb); // 3/4 true, 1/4 false
+ gl_FragColor = vec4(vec3(_all(bvec3(c))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_vert.vert
new file mode 100644
index 000000000..657970df4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_vert.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(4.0 * gtf_Color.rgb); // 3/4 true, 1/4 false
+ color = vec4(vec3(all(bvec3(c))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_vert_ref.vert
new file mode 100644
index 000000000..a413785dc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bool _all(in bvec3 a)
+{
+ bool temp = true;
+
+ if(!a[0]) temp = false;
+ if(!a[1]) temp = false;
+ if(!a[2]) temp = false;
+
+ return temp;
+}
+
+void main (void)
+{
+ vec3 c = floor(4.0 * gtf_Color.rgb); // 3/4 true, 1/4 false
+ color = vec4(vec3(_all(bvec3(c))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/input.run.txt
new file mode 100644
index 000000000..420ac35bc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+all_001_to_004.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_001_to_004.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_001_to_004.html
new file mode 100644
index 000000000..f54506813
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_001_to_004.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: any_001_to_004.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "any_bvec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "any_bvec2_frag.frag"
+ },
+ "name": "any_bvec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "any_bvec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "any_bvec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "any_bvec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "any_bvec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "any_bvec3_frag.frag"
+ },
+ "name": "any_bvec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "any_bvec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "any_bvec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "any_bvec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_frag.frag
new file mode 100644
index 000000000..83a21f61a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(1.5 * color.rg); // 1/3 true, 2/3 false
+ gl_FragColor = vec4(vec3(any(bvec2(c))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_frag_ref.frag
new file mode 100644
index 000000000..260c1a833
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_frag_ref.frag
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bool _any(in bvec2 a)
+{
+ bool temp = false;
+
+ if(a[0]) temp = true;
+ if(a[1]) temp = true;
+
+ return temp;
+}
+
+void main (void)
+{
+ vec2 c = floor(1.5 * color.rg); // 1/3 true, 2/3 false
+ gl_FragColor = vec4(vec3(_any(bvec2(c))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_vert.vert
new file mode 100644
index 000000000..1388eda2e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_vert.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(1.5 * gtf_Color.rg); // 1/3 true, 2/3 false
+ color = vec4(vec3(any(bvec2(c))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_vert_ref.vert
new file mode 100644
index 000000000..c22803637
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_vert_ref.vert
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bool _any(in bvec2 a)
+{
+ bool temp = false;
+
+ if(a[0]) temp = true;
+ if(a[1]) temp = true;
+
+ return temp;
+}
+
+void main (void)
+{
+ vec2 c = floor(1.5 * gtf_Color.rg); // 1/3 true, 2/3 false
+ color = vec4(vec3(_any(bvec2(c))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_frag.frag
new file mode 100644
index 000000000..ba8701496
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(1.5 * color.rgb); // 1/3 true, 2/3 false
+ gl_FragColor = vec4(vec3(any(bvec3(c))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_frag_ref.frag
new file mode 100644
index 000000000..1eb147e0e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_frag_ref.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bool _any(in bvec3 a)
+{
+ bool temp = false;
+
+ if(a[0]) temp = true;
+ if(a[1]) temp = true;
+ if(a[2]) temp = true;
+
+ return temp;
+}
+
+void main (void)
+{
+ vec3 c = floor(1.5 * color.rgb); // 1/3 true, 2/3 false
+ gl_FragColor = vec4(vec3(_any(bvec3(c))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_vert.vert
new file mode 100644
index 000000000..b73943460
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_vert.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(1.5 * gtf_Color.rgb); // 1/3 true, 2/3 false
+ color = vec4(vec3(any(bvec3(c))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_vert_ref.vert
new file mode 100644
index 000000000..d448ff819
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bool _any(in bvec3 a)
+{
+ bool temp = false;
+
+ if(a[0]) temp = true;
+ if(a[1]) temp = true;
+ if(a[2]) temp = true;
+
+ return temp;
+}
+
+void main (void)
+{
+ vec3 c = floor(1.5 * gtf_Color.rgb); // 1/3 true, 2/3 false
+ color = vec4(vec3(_any(bvec3(c))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/input.run.txt
new file mode 100644
index 000000000..6ac424067
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+any_001_to_004.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/array_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/array_001_to_006.html
new file mode 100644
index 000000000..853fc909f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/array_001_to_006.html
@@ -0,0 +1,223 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: array_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "new_mad2": {
+ "count": 2,
+ "type": "uniform1fv",
+ "value": [
+ 45.0,
+ 14.0
+ ]
+ }
+ },
+ "fragmentShader": "empty_uniform_array_float_frag.frag"
+ },
+ "name": "empty_uniform_array_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "empty_uniform_array_float_vert.vert",
+ "uniforms": {
+ "new_mad2": {
+ "count": 2,
+ "type": "uniform1fv",
+ "value": [
+ 45.0,
+ 14.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "empty_uniform_array_float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "empty_empty_array_float_frag.frag"
+ },
+ "name": "empty_empty_array_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "empty_empty_array_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "empty_empty_array_float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "initfunc_empty_array_float_frag.frag"
+ },
+ "name": "initfunc_empty_array_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "initfunc_empty_array_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "initfunc_empty_array_float_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_empty_array_float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_empty_array_float_frag.frag
new file mode 100644
index 000000000..89c4cdd99
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_empty_array_float_frag.frag
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int i=0;
+ float new_mad[2];
+ float gray = 0.0;
+
+ new_mad[0]=float(1);
+ new_mad[1]=float(2);
+
+ if( (new_mad[0] == 1.0) && (new_mad[1] == 2.0) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray,gray , gray, 1.0);
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_empty_array_float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_empty_array_float_vert.vert
new file mode 100644
index 000000000..98be2c128
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_empty_array_float_vert.vert
@@ -0,0 +1,44 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int i=0;
+ float new_mad[2];
+ float gray = 0.0;
+
+ new_mad[0]=float(1);
+ new_mad[1]=float(2);
+
+ if( (new_mad[0] == 1.0) && (new_mad[1] == 2.0) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_uniform_array_float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_uniform_array_float_frag.frag
new file mode 100644
index 000000000..3f5ac7704
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_uniform_array_float_frag.frag
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+uniform float new_mad2[2];
+
+void main (void)
+{
+ int i=0;
+ float new_mad[2];
+ float gray = 0.0;
+
+ new_mad[0]=new_mad2[0];
+ new_mad[1]=new_mad2[1];
+
+ if( (new_mad[0] == 45.0) && (new_mad[1] == 14.0) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_uniform_array_float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_uniform_array_float_vert.vert
new file mode 100644
index 000000000..101c33320
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_uniform_array_float_vert.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+const int array_size = 2;
+uniform float new_mad2[array_size];
+
+void main (void)
+{
+ int i=0;
+ float new_mad[array_size];
+ float gray = 0.0;
+
+ new_mad[0] = new_mad2[0];
+ new_mad[1] = new_mad2[1];
+
+ if( (new_mad[0] == 45.0) && (new_mad[1] == 14.0) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/initfunc_empty_array_float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/initfunc_empty_array_float_frag.frag
new file mode 100644
index 000000000..80c0bf0bc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/initfunc_empty_array_float_frag.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+
+void initialise_array(out float array[2], float init_val);
+void main (void)
+{
+ int i=0;
+ float new_mad[2];
+ float gray = 0.0;
+ initialise_array(new_mad,25.0);
+ if( (new_mad[0] == 25.0) && (new_mad[1] == 25.0) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+void initialise_array(out float array[2], float init_val)
+{
+ int i=0;
+ array[0] = init_val;
+ array[1] = init_val;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/initfunc_empty_array_float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/initfunc_empty_array_float_vert.vert
new file mode 100644
index 000000000..a84e72dda
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/initfunc_empty_array_float_vert.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void initialise_array(out float array[2], float init_val);
+
+void main (void)
+{
+ int i=0;
+ float new_mad[2];
+ float gray = 0.0;
+ initialise_array(new_mad,25.0);
+ if( (new_mad[0] == 25.0) && (new_mad[1] == 25.0) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+void initialise_array(out float array[2], float init_val)
+{
+ array[0] = init_val;
+ array[1] = init_val;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/input.run.txt
new file mode 100644
index 000000000..c7cbc1049
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+array_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html
new file mode 100644
index 000000000..2c540c605
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: asin_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "asin_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "asin_float_frag_xvary.frag"
+ },
+ "name": "asin_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "asin_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "asin_vec2_frag_xvary.frag"
+ },
+ "name": "asin_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "asin_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "asin_vec3_frag_xvary.frag"
+ },
+ "name": "asin_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "asin_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "asin_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "asin_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "asin_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "asin_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "asin_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "asin_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "asin_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "asin_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary.frag
new file mode 100644
index 000000000..51e81e8aa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(asin(c) / M_PI + 0.5, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..3ffe851d2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary_ref.frag
@@ -0,0 +1,110 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+/* The following files are direct copies of each other:
+ *
+ * GL/acos/acos_float_frag_xvary_ref.frag
+ * GL/asin/asin_float_frag_xvary_ref.frag
+ *
+ * Care should be taken to apply any changes to both. Only the last
+ * line where gl_FragColor is assigned should be different.
+ */
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float lerp(float a, float b, float s)
+{
+ return a + (b - a) * s;
+}
+
+void main (void)
+{
+ float asinValues[17];
+ asinValues[0] = -1.5708;
+ asinValues[1] = -1.06544;
+ asinValues[2] = -0.848062;
+ asinValues[3] = -0.675132;
+ asinValues[4] = -0.523599;
+ asinValues[5] = -0.384397;
+ asinValues[6] = -0.25268;
+ asinValues[7] = -0.125328;
+ asinValues[8] = 0.0;
+ asinValues[9] = 0.125328;
+ asinValues[10] = 0.25268;
+ asinValues[11] = 0.384397;
+ asinValues[12] = 0.523599;
+ asinValues[13] = 0.675132;
+ asinValues[14] = 0.848062;
+ asinValues[15] = 1.06544;
+ asinValues[16] = 1.5708;
+
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * (color.r - 0.5);
+
+ float arrVal = (c + 1.0) * 8.0;
+ int arr0 = int(floor(arrVal));
+ float weight = arrVal - floor(arrVal);
+ float asin_c = 0.0;
+
+ if (arr0 == 0)
+ asin_c = lerp(asinValues[0], asinValues[1], weight);
+ else if (arr0 == 1)
+ asin_c = lerp(asinValues[1], asinValues[2], weight);
+ else if (arr0 == 2)
+ asin_c = lerp(asinValues[2], asinValues[3], weight);
+ else if (arr0 == 3)
+ asin_c = lerp(asinValues[3], asinValues[4], weight);
+ else if (arr0 == 4)
+ asin_c = lerp(asinValues[4], asinValues[5], weight);
+ else if (arr0 == 5)
+ asin_c = lerp(asinValues[5], asinValues[6], weight);
+ else if (arr0 == 6)
+ asin_c = lerp(asinValues[6], asinValues[7], weight);
+ else if (arr0 == 7)
+ asin_c = lerp(asinValues[7], asinValues[8], weight);
+ else if (arr0 == 8)
+ asin_c = lerp(asinValues[8], asinValues[9], weight);
+ else if (arr0 == 9)
+ asin_c = lerp(asinValues[9], asinValues[10], weight);
+ else if (arr0 == 10)
+ asin_c = lerp(asinValues[10], asinValues[11], weight);
+ else if (arr0 == 11)
+ asin_c = lerp(asinValues[11], asinValues[12], weight);
+ else if (arr0 == 12)
+ asin_c = lerp(asinValues[12], asinValues[13], weight);
+ else if (arr0 == 13)
+ asin_c = lerp(asinValues[13], asinValues[14], weight);
+ else if (arr0 == 14)
+ asin_c = lerp(asinValues[14], asinValues[15], weight);
+ else if (arr0 == 15)
+ asin_c = lerp(asinValues[15], asinValues[16], weight);
+ else if (arr0 == 16)
+ asin_c = asinValues[16];
+
+ gl_FragColor = vec4(asin_c / M_PI + 0.5, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_vert_xvary.vert
new file mode 100644
index 000000000..d19424fcc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * (gtf_Color.r - 0.5);
+ color = vec4(asin(c) / M_PI + 0.5, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..d75bae252
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_vert_xvary_ref.vert
@@ -0,0 +1,57 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * (gtf_Color.r - 0.5);
+
+ float asin_c = 0.0;
+ float scale = 1.0;
+ float sign = 1.0;
+
+ // pow can't handle negative numbers so take advantage of symmetry
+ if(c < 0.0)
+ {
+ sign = -1.0;
+ c *= -1.0;
+ }
+
+ // Taylors series expansion for asin
+ // 1000/2 iterations necessary to get the accuracy with this method
+ for(int i = 1; i < 1000; i += 2)
+ {
+ asin_c += scale * pow(c, float(i)) / float(i);
+ scale *= float(i) / float(i + 1);
+ }
+
+ color = vec4(sign * asin_c / M_PI + 0.5, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_frag_xvary.frag
new file mode 100644
index 000000000..207ec4ffe
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(asin(c) / M_PI + 0.5, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..02fae9465
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_frag_xvary_ref.frag
@@ -0,0 +1,146 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+/* The following files are direct copies of each other:
+ *
+ * GL/acos/acos_vec2_frag_xvary_ref.frag
+ * GL/asin/asin_vec2_frag_xvary_ref.frag
+ *
+ * Care should be taken to apply any changes to both. Only the last
+ * line where gl_FragColor is assigned should be different.
+ */
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float lerp(float a, float b, float s)
+{
+ return a + (b - a) * s;
+}
+
+void main (void)
+{
+ float asinValues[17];
+ asinValues[0] = -1.5708;
+ asinValues[1] = -1.06544;
+ asinValues[2] = -0.848062;
+ asinValues[3] = -0.675132;
+ asinValues[4] = -0.523599;
+ asinValues[5] = -0.384397;
+ asinValues[6] = -0.25268;
+ asinValues[7] = -0.125328;
+ asinValues[8] = 0.0;
+ asinValues[9] = 0.125328;
+ asinValues[10] = 0.25268;
+ asinValues[11] = 0.384397;
+ asinValues[12] = 0.523599;
+ asinValues[13] = 0.675132;
+ asinValues[14] = 0.848062;
+ asinValues[15] = 1.06544;
+ asinValues[16] = 1.5708;
+
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * (color.rg - 0.5);
+
+ vec2 arrVal = (c + vec2(1.0, 1.0)) * 8.0;
+ int arr0x = int(floor(arrVal.x));
+ int arr0y = int(floor(arrVal.y));
+ vec2 weight = arrVal - floor(arrVal);
+ vec2 asin_c = vec2(0.0);
+
+ if (arr0x == 0)
+ asin_c.x = lerp(asinValues[0], asinValues[1], weight.x);
+ else if (arr0x == 1)
+ asin_c.x = lerp(asinValues[1], asinValues[2], weight.x);
+ else if (arr0x == 2)
+ asin_c.x = lerp(asinValues[2], asinValues[3], weight.x);
+ else if (arr0x == 3)
+ asin_c.x = lerp(asinValues[3], asinValues[4], weight.x);
+ else if (arr0x == 4)
+ asin_c.x = lerp(asinValues[4], asinValues[5], weight.x);
+ else if (arr0x == 5)
+ asin_c.x = lerp(asinValues[5], asinValues[6], weight.x);
+ else if (arr0x == 6)
+ asin_c.x = lerp(asinValues[6], asinValues[7], weight.x);
+ else if (arr0x == 7)
+ asin_c.x = lerp(asinValues[7], asinValues[8], weight.x);
+ else if (arr0x == 8)
+ asin_c.x = lerp(asinValues[8], asinValues[9], weight.x);
+ else if (arr0x == 9)
+ asin_c.x = lerp(asinValues[9], asinValues[10], weight.x);
+ else if (arr0x == 10)
+ asin_c.x = lerp(asinValues[10], asinValues[11], weight.x);
+ else if (arr0x == 11)
+ asin_c.x = lerp(asinValues[11], asinValues[12], weight.x);
+ else if (arr0x == 12)
+ asin_c.x = lerp(asinValues[12], asinValues[13], weight.x);
+ else if (arr0x == 13)
+ asin_c.x = lerp(asinValues[13], asinValues[14], weight.x);
+ else if (arr0x == 14)
+ asin_c.x = lerp(asinValues[14], asinValues[15], weight.x);
+ else if (arr0x == 15)
+ asin_c.x = lerp(asinValues[15], asinValues[16], weight.x);
+ else if (arr0x == 16)
+ asin_c.x = asinValues[16];
+
+ if (arr0y == 0)
+ asin_c.y = lerp(asinValues[0], asinValues[1], weight.y);
+ else if (arr0y == 1)
+ asin_c.y = lerp(asinValues[1], asinValues[2], weight.y);
+ else if (arr0y == 2)
+ asin_c.y = lerp(asinValues[2], asinValues[3], weight.y);
+ else if (arr0y == 3)
+ asin_c.y = lerp(asinValues[3], asinValues[4], weight.y);
+ else if (arr0y == 4)
+ asin_c.y = lerp(asinValues[4], asinValues[5], weight.y);
+ else if (arr0y == 5)
+ asin_c.y = lerp(asinValues[5], asinValues[6], weight.y);
+ else if (arr0y == 6)
+ asin_c.y = lerp(asinValues[6], asinValues[7], weight.y);
+ else if (arr0y == 7)
+ asin_c.y = lerp(asinValues[7], asinValues[8], weight.y);
+ else if (arr0y == 8)
+ asin_c.y = lerp(asinValues[8], asinValues[9], weight.y);
+ else if (arr0y == 9)
+ asin_c.y = lerp(asinValues[9], asinValues[10], weight.y);
+ else if (arr0y == 10)
+ asin_c.y = lerp(asinValues[10], asinValues[11], weight.y);
+ else if (arr0y == 11)
+ asin_c.y = lerp(asinValues[11], asinValues[12], weight.y);
+ else if (arr0y == 12)
+ asin_c.y = lerp(asinValues[12], asinValues[13], weight.y);
+ else if (arr0y == 13)
+ asin_c.y = lerp(asinValues[13], asinValues[14], weight.y);
+ else if (arr0y == 14)
+ asin_c.y = lerp(asinValues[14], asinValues[15], weight.y);
+ else if (arr0y == 15)
+ asin_c.y = lerp(asinValues[15], asinValues[16], weight.y);
+ else if (arr0y == 16)
+ asin_c.y = asinValues[16];
+
+ gl_FragColor = vec4(asin_c / M_PI + 0.5, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_vert_xvary.vert
new file mode 100644
index 000000000..c51ca500f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(asin(c) / M_PI + 0.5, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..9aeab86bc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_vert_xvary_ref.vert
@@ -0,0 +1,71 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ vec2 asin_c = vec2(0.0);
+ vec2 scale = vec2(1.0);
+ vec2 sign = vec2(1.0);
+
+ // pow can't handle negative numbers so take advantage of symmetry
+ if(c.r < 0.0)
+ {
+ sign.r = -1.0;
+ c.r *= -1.0;
+ }
+
+ // Taylors series expansion for asin
+ // 1000/2 iterations necessary to get the accuracy with this method
+ for(int i = 1; i < 1000; i += 2)
+ {
+ asin_c.r += scale.r * pow(c.r, float(i)) / float(i);
+ scale.r *= float(i) / float(i + 1);
+ }
+
+ // pow can't handle negative numbers so take advantage of symmetry
+ if(c.g < 0.0)
+ {
+ sign.g = -1.0;
+ c.g *= -1.0;
+ }
+
+ // Taylors series expansion for asin
+ // 1000/2 iterations necessary to get the accuracy with this method
+ for(int i = 1; i < 1000; i += 2)
+ {
+ asin_c.g += scale.g * pow(c.g, float(i)) / float(i);
+ scale.g *= float(i) / float(i + 1);
+ }
+
+ color = vec4(sign * asin_c / M_PI + 0.5, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_frag_xvary.frag
new file mode 100644
index 000000000..4a7cc79a1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(asin(c) / M_PI + 0.5, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..9dbb24897
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_frag_xvary_ref.frag
@@ -0,0 +1,182 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+/* The following files are direct copies of each other:
+ *
+ * GL/acos/acos_vec3_frag_xvary_ref.frag
+ * GL/asin/asin_vec3_frag_xvary_ref.frag
+ *
+ * Care should be taken to apply any changes to both. Only the last
+ * line where gl_FragColor is assigned should be different.
+ */
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float lerp(float a, float b, float s)
+{
+ return a + (b - a) * s;
+}
+
+void main (void)
+{
+ float asinValues[17];
+ asinValues[0] = -1.5708;
+ asinValues[1] = -1.06544;
+ asinValues[2] = -0.848062;
+ asinValues[3] = -0.675132;
+ asinValues[4] = -0.523599;
+ asinValues[5] = -0.384397;
+ asinValues[6] = -0.25268;
+ asinValues[7] = -0.125328;
+ asinValues[8] = 0.0;
+ asinValues[9] = 0.125328;
+ asinValues[10] = 0.25268;
+ asinValues[11] = 0.384397;
+ asinValues[12] = 0.523599;
+ asinValues[13] = 0.675132;
+ asinValues[14] = 0.848062;
+ asinValues[15] = 1.06544;
+ asinValues[16] = 1.5708;
+
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * (color.rgb - 0.5);
+
+ vec3 arrVal = (c + vec3(1.0, 1.0, 1.0)) * 8.0;
+ int arr0x = int(floor(arrVal.x));
+ int arr0y = int(floor(arrVal.y));
+ int arr0z = int(floor(arrVal.z));
+ vec3 weight = arrVal - floor(arrVal);
+ vec3 asin_c = vec3(0.0);
+
+ if (arr0x == 0)
+ asin_c.x = lerp(asinValues[0], asinValues[1], weight.x);
+ else if (arr0x == 1)
+ asin_c.x = lerp(asinValues[1], asinValues[2], weight.x);
+ else if (arr0x == 2)
+ asin_c.x = lerp(asinValues[2], asinValues[3], weight.x);
+ else if (arr0x == 3)
+ asin_c.x = lerp(asinValues[3], asinValues[4], weight.x);
+ else if (arr0x == 4)
+ asin_c.x = lerp(asinValues[4], asinValues[5], weight.x);
+ else if (arr0x == 5)
+ asin_c.x = lerp(asinValues[5], asinValues[6], weight.x);
+ else if (arr0x == 6)
+ asin_c.x = lerp(asinValues[6], asinValues[7], weight.x);
+ else if (arr0x == 7)
+ asin_c.x = lerp(asinValues[7], asinValues[8], weight.x);
+ else if (arr0x == 8)
+ asin_c.x = lerp(asinValues[8], asinValues[9], weight.x);
+ else if (arr0x == 9)
+ asin_c.x = lerp(asinValues[9], asinValues[10], weight.x);
+ else if (arr0x == 10)
+ asin_c.x = lerp(asinValues[10], asinValues[11], weight.x);
+ else if (arr0x == 11)
+ asin_c.x = lerp(asinValues[11], asinValues[12], weight.x);
+ else if (arr0x == 12)
+ asin_c.x = lerp(asinValues[12], asinValues[13], weight.x);
+ else if (arr0x == 13)
+ asin_c.x = lerp(asinValues[13], asinValues[14], weight.x);
+ else if (arr0x == 14)
+ asin_c.x = lerp(asinValues[14], asinValues[15], weight.x);
+ else if (arr0x == 15)
+ asin_c.x = lerp(asinValues[15], asinValues[16], weight.x);
+ else if (arr0x == 16)
+ asin_c.x = asinValues[16];
+
+ if (arr0y == 0)
+ asin_c.y = lerp(asinValues[0], asinValues[1], weight.y);
+ else if (arr0y == 1)
+ asin_c.y = lerp(asinValues[1], asinValues[2], weight.y);
+ else if (arr0y == 2)
+ asin_c.y = lerp(asinValues[2], asinValues[3], weight.y);
+ else if (arr0y == 3)
+ asin_c.y = lerp(asinValues[3], asinValues[4], weight.y);
+ else if (arr0y == 4)
+ asin_c.y = lerp(asinValues[4], asinValues[5], weight.y);
+ else if (arr0y == 5)
+ asin_c.y = lerp(asinValues[5], asinValues[6], weight.y);
+ else if (arr0y == 6)
+ asin_c.y = lerp(asinValues[6], asinValues[7], weight.y);
+ else if (arr0y == 7)
+ asin_c.y = lerp(asinValues[7], asinValues[8], weight.y);
+ else if (arr0y == 8)
+ asin_c.y = lerp(asinValues[8], asinValues[9], weight.y);
+ else if (arr0y == 9)
+ asin_c.y = lerp(asinValues[9], asinValues[10], weight.y);
+ else if (arr0y == 10)
+ asin_c.y = lerp(asinValues[10], asinValues[11], weight.y);
+ else if (arr0y == 11)
+ asin_c.y = lerp(asinValues[11], asinValues[12], weight.y);
+ else if (arr0y == 12)
+ asin_c.y = lerp(asinValues[12], asinValues[13], weight.y);
+ else if (arr0y == 13)
+ asin_c.y = lerp(asinValues[13], asinValues[14], weight.y);
+ else if (arr0y == 14)
+ asin_c.y = lerp(asinValues[14], asinValues[15], weight.y);
+ else if (arr0y == 15)
+ asin_c.y = lerp(asinValues[15], asinValues[16], weight.y);
+ else if (arr0y == 16)
+ asin_c.y = asinValues[16];
+
+ if (arr0z == 0)
+ asin_c.z = lerp(asinValues[0], asinValues[1], weight.z);
+ else if (arr0z == 1)
+ asin_c.z = lerp(asinValues[1], asinValues[2], weight.z);
+ else if (arr0z == 2)
+ asin_c.z = lerp(asinValues[2], asinValues[3], weight.z);
+ else if (arr0z == 3)
+ asin_c.z = lerp(asinValues[3], asinValues[4], weight.z);
+ else if (arr0z == 4)
+ asin_c.z = lerp(asinValues[4], asinValues[5], weight.z);
+ else if (arr0z == 5)
+ asin_c.z = lerp(asinValues[5], asinValues[6], weight.z);
+ else if (arr0z == 6)
+ asin_c.z = lerp(asinValues[6], asinValues[7], weight.z);
+ else if (arr0z == 7)
+ asin_c.z = lerp(asinValues[7], asinValues[8], weight.z);
+ else if (arr0z == 8)
+ asin_c.z = lerp(asinValues[8], asinValues[9], weight.z);
+ else if (arr0z == 9)
+ asin_c.z = lerp(asinValues[9], asinValues[10], weight.z);
+ else if (arr0z == 10)
+ asin_c.z = lerp(asinValues[10], asinValues[11], weight.z);
+ else if (arr0z == 11)
+ asin_c.z = lerp(asinValues[11], asinValues[12], weight.z);
+ else if (arr0z == 12)
+ asin_c.z = lerp(asinValues[12], asinValues[13], weight.z);
+ else if (arr0z == 13)
+ asin_c.z = lerp(asinValues[13], asinValues[14], weight.z);
+ else if (arr0z == 14)
+ asin_c.z = lerp(asinValues[14], asinValues[15], weight.z);
+ else if (arr0z == 15)
+ asin_c.z = lerp(asinValues[15], asinValues[16], weight.z);
+ else if (arr0z == 16)
+ asin_c.z = asinValues[16];
+
+ gl_FragColor = vec4(asin_c / M_PI + 0.5, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_vert_xvary.vert
new file mode 100644
index 000000000..15f0ce719
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(asin(c) / M_PI + 0.5, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..648d0ad18
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_vert_xvary_ref.vert
@@ -0,0 +1,86 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+ vec3 asin_c = vec3(0.0);
+ vec3 scale = vec3(1.0);
+ vec3 sign = vec3(1.0);
+
+ // pow can't handle negative numbers so take advantage of symmetry
+ if(c.r < 0.0)
+ {
+ sign.r = -1.0;
+ c.r *= -1.0;
+ }
+
+ // Taylors series expansion for asin
+ // 1000/2 iterations necessary to get the accuracy with this method
+ for(int i = 1; i < 1000; i += 2)
+ {
+ asin_c.r += scale.r * pow(c.r, float(i)) / float(i);
+ scale.r *= float(i) / float(i + 1);
+ }
+
+ // pow can't handle negative numbers so take advantage of symmetry
+ if(c.g < 0.0)
+ {
+ sign.g = -1.0;
+ c.g *= -1.0;
+ }
+
+ // Taylors series expansion for asin
+ // 1000/2 iterations necessary to get the accuracy with this method
+ for(int i = 1; i < 1000; i += 2)
+ {
+ asin_c.g += scale.g * pow(c.g, float(i)) / float(i);
+ scale.g *= float(i) / float(i + 1);
+ }
+
+ // pow can't handle negative numbers so take advantage of symmetry
+ if(c.b < 0.0)
+ {
+ sign.b = -1.0;
+ c.b *= -1.0;
+ }
+
+ // Taylors series expansion for asin
+ // 1000/2 iterations necessary to get the accuracy with this method
+ for(int i = 1; i < 1000; i += 2)
+ {
+ asin_c.b += scale.b * pow(c.b, float(i)) / float(i);
+ scale.b *= float(i) / float(i + 1);
+ }
+
+ color = vec4(sign * asin_c / M_PI + 0.5, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/input.run.txt
new file mode 100644
index 000000000..c2de8233a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+asin_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_001_to_008.html
new file mode 100644
index 000000000..933bbeda1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: atan_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "atan_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "atan_float_frag_xvary.frag"
+ },
+ "name": "atan_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "atan_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "atan_vec2_frag_xvary.frag"
+ },
+ "name": "atan_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "atan_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "atan_vec3_frag_xvary.frag"
+ },
+ "name": "atan_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "atan_float_frag_xvaryyvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "atan_float_frag_xvaryyvary.frag"
+ },
+ "name": "atan_float_frag_xvaryyvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "atan_vec2_frag_xvaryyvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "atan_vec2_frag_xvaryyvary.frag"
+ },
+ "name": "atan_vec2_frag_xvaryyvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "atan_vec3_frag_xvaryyvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "atan_vec3_frag_xvaryyvary.frag"
+ },
+ "name": "atan_vec3_frag_xvaryyvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "atan_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "atan_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "atan_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "atan_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "atan_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "atan_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_009_to_012.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_009_to_012.html
new file mode 100644
index 000000000..5641dee16
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_009_to_012.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: atan_009_to_012.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "atan_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "atan_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "atan_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "atan_float_vert_xvaryyvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "atan_float_vert_xvaryyvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "atan_float_vert_xvaryyvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "atan_vec2_vert_xvaryyvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "atan_vec2_vert_xvaryyvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "atan_vec2_vert_xvaryyvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "atan_vec3_vert_xvaryyvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "atan_vec3_vert_xvaryyvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "atan_vec3_vert_xvaryyvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvary.frag
new file mode 100644
index 000000000..0b3528ebb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 4.0 * 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(atan(c) / M_PI + 0.5, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..891ea8dd2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvary_ref.frag
@@ -0,0 +1,72 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 4.0 * 2.0 * (color.r - 0.5);
+ float atan_c = 0.0;
+ float scale = 1.0;
+ float sign = 1.0;
+ vec4 result;
+
+ if(c < 0.0)
+ {
+ sign = -1.0;
+ c *= -1.0;
+ }
+
+ if(c <= 1.0)
+ {
+ // Taylors series expansion for atan
+ for(int i = 1; i < 12; i += 2)
+ {
+ atan_c += scale * pow(c, float(i)) / float(i);
+ scale *= -1.0;
+ }
+
+ result = vec4(sign * atan_c / M_PI + 0.5, 0.0, 0.0, 1.0);
+ }
+ else
+ {
+ c = 1.0 / c;
+
+ // Taylors series expansion for atan
+ for(int i = 1; i < 12; i += 2)
+ {
+ atan_c += scale * pow(c, float(i)) / float(i);
+ scale *= -1.0;
+ }
+
+ result = vec4(sign * (M_PI / 2.0 - atan_c) / M_PI + 0.5, 0.0, 0.0, 1.0);
+ }
+
+ gl_FragColor = result;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary.frag
new file mode 100644
index 000000000..8228dad85
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float x = 2.0 * (color.g - 0.5);
+ float y = 2.0 * (color.b - 0.5);
+ const float epsilon = 1.0e-4;
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+
+ // Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
+ if(x > epsilon || abs(y) > epsilon)
+ {
+ gl_FragColor = vec4(atan(y, x) / (2.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
+ }
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary_ref.frag
new file mode 100644
index 000000000..cbb15f258
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary_ref.frag
@@ -0,0 +1,88 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float x = 2.0 * (color.g - 0.5);
+ float y = 2.0 * (color.b - 0.5);
+ float atan_c = 0.0;
+ float scale = 1.0;
+ float sign = 1.0;
+ vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
+ const float epsilon = 1.0e-4;
+
+ // Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
+ if(x > epsilon || abs(y) > epsilon)
+ {
+ if(x < 0.0 ^^ y < 0.0)
+ {
+ sign = -1.0;
+ }
+
+ if(abs(y) <= abs(x))
+ {
+ float c = abs(y / x);
+
+ // Taylors series expansion for atan
+ for(int i = 1; i < 12; i += 2)
+ {
+ atan_c += scale * pow(c, float(i)) / float(i);
+ scale *= -1.0;
+ }
+
+ result = vec4(sign * atan_c / (2.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
+ }
+ else
+ {
+ float c = abs(x / y);
+
+ // Taylors series expansion for atan
+ for(int i = 1; i < 12; i += 2)
+ {
+ atan_c += scale * pow(c, float(i)) / float(i);
+ scale *= -1.0;
+ }
+
+ result = vec4(sign * (M_PI / 2.0 - atan_c) / (2.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
+ }
+
+ if(x < 0.0)
+ if(y < 0.0) result.r -= 0.5;
+ else if(y > 0.0) result.r += 0.5;
+ }
+
+ gl_FragColor = result;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvary.vert
new file mode 100644
index 000000000..ead9e4be1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 4.0 * 2.0 * (gtf_Color.r - 0.5);
+ color = vec4(atan(c) / M_PI + 0.5, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..f0dd4e16f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvary_ref.vert
@@ -0,0 +1,73 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 4.0 * 2.0 * (gtf_Color.r - 0.5);
+ float atan_c = 0.0;
+ float scale = 1.0;
+ float sign = 1.0;
+ vec4 result;
+
+ if(c < 0.0)
+ {
+ sign = -1.0;
+ c *= -1.0;
+ }
+
+ if(c <= 1.0)
+ {
+ // Taylors series expansion for atan
+ for(int i = 1; i < 12; i += 2)
+ {
+ atan_c += scale * pow(c, float(i)) / float(i);
+ scale *= -1.0;
+ }
+
+ result = vec4(sign * atan_c / M_PI + 0.5, 0.0, 0.0, 1.0);
+ }
+ else
+ {
+ c = 1.0 / c;
+
+ // Taylors series expansion for atan
+ for(int i = 1; i < 12; i += 2)
+ {
+ atan_c += scale * pow(c, float(i)) / float(i);
+ scale *= -1.0;
+ }
+
+ result = vec4(sign * (M_PI / 2.0 - atan_c) / M_PI + 0.5, 0.0, 0.0, 1.0);
+ }
+
+ color = result;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary.vert
new file mode 100644
index 000000000..8ea50eaea
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary.vert
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float x = 2.0 * (gtf_Color.g - 0.5);
+ float y = 2.0 * (gtf_Color.b - 0.5);
+ const float epsilon = 1.0e-4;
+ color = vec4(0.0, 0.0, 0.0, 1.0);
+
+ // Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
+ if(x > epsilon || abs(y) > epsilon)
+ {
+ color = vec4(atan(y, x) / (2.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
+ }
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary_ref.vert
new file mode 100644
index 000000000..8bed464b9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary_ref.vert
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float x = 2.0 * (gtf_Color.g - 0.5);
+ float y = 2.0 * (gtf_Color.b - 0.5);
+ float atan_c = 0.0;
+ float scale = 1.0;
+ float sign = 1.0;
+ vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
+ const float epsilon = 1.0e-4;
+
+ // Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
+ if(x > epsilon || abs(y) > epsilon)
+ {
+ if(x < 0.0 ^^ y < 0.0)
+ {
+ sign = -1.0;
+ }
+
+ if(abs(y) <= abs(x))
+ {
+ float c = abs(y / x);
+
+ // Taylors series expansion for atan
+ for(int i = 1; i < 12; i += 2)
+ {
+ atan_c += scale * pow(c, float(i)) / float(i);
+ scale *= -1.0;
+ }
+
+ result = vec4(sign * atan_c / (2.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
+ }
+ else
+ {
+ float c = abs(x / y);
+
+ // Taylors series expansion for atan
+ for(int i = 1; i < 12; i += 2)
+ {
+ atan_c += scale * pow(c, float(i)) / float(i);
+ scale *= -1.0;
+ }
+
+ result = vec4(sign * (M_PI / 2.0 - atan_c) / (2.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
+ }
+
+ if(x < 0.0)
+ if(y < 0.0) result.r -= 0.5;
+ else if(y > 0.0) result.r += 0.5;
+ }
+
+ color = result;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvary.frag
new file mode 100644
index 000000000..2801a4938
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 4.0 * 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(atan(c) / M_PI + 0.5, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..8f5a8ad64
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvary_ref.frag
@@ -0,0 +1,132 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 4.0 * 2.0 * (color.rg - 0.5);
+ vec2 atan_c = vec2(0.0);
+ vec2 scale = vec2(1.0);
+ vec2 sign = vec2(1.0);
+ vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
+
+ if(c[0] < 0.0)
+ {
+ sign[0] = -1.0;
+ c[0] *= -1.0;
+ }
+
+ if(c[0] <= 1.0)
+ {
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * atan_c[0] / M_PI + 0.5;
+ }
+ else
+ {
+ c[0] = 1.0 / c[0];
+
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / M_PI + 0.5;
+ }
+
+
+ if(c[1] < 0.0)
+ {
+ sign[1] = -1.0;
+ c[1] *= -1.0;
+ }
+
+ if(c[1] <= 1.0)
+ {
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * atan_c[1] / M_PI + 0.5;
+ }
+ else
+ {
+ c[1] = 1.0 / c[1];
+
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * (M_PI / 2.0 - atan_c[1]) / M_PI + 0.5;
+ }
+
+ gl_FragColor = result;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary.frag
new file mode 100644
index 000000000..88d1c7933
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary.frag
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 x = 2.0 * (color.gg - 0.5);
+ vec2 y = 2.0 * (color.bb - 0.5);
+ const float epsilon = 1.0e-4;
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+
+ // Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
+ if(x[0] > epsilon || abs(y[0]) > epsilon)
+ {
+ gl_FragColor[0] = atan(y[0], x[0]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[1] > epsilon || abs(y[1]) > epsilon)
+ {
+ gl_FragColor[1] = atan(y[1], x[1]) / (2.0 * M_PI) + 0.5;
+ }
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary_ref.frag
new file mode 100644
index 000000000..8757f466c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary_ref.frag
@@ -0,0 +1,150 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 x = 2.0 * (color.gg - 0.5);
+ vec2 y = 2.0 * (color.bb - 0.5);
+ vec2 c;
+ vec2 atan_c = vec2(0.0);
+ vec2 scale = vec2(1.0);
+ vec2 sign = vec2(1.0);
+ vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
+ const float epsilon = 1.0e-4;
+
+ // Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
+ if(x[0] > epsilon || abs(y[0]) > epsilon)
+ {
+ if(x[0] < 0.0 ^^ y[0] < 0.0)
+ {
+ sign[0] = -1.0;
+ }
+
+ if(abs(y[0]) <= abs(x[0]))
+ {
+ c[0] = abs(y[0] / x[0]);
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * atan_c[0] / (2.0 * M_PI) + 0.5;
+ }
+ else
+ {
+ c[0] = abs(x[0] / y[0]);
+
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[0] < 0.0)
+ if(y[0] < 0.0) result[0] -= 0.5;
+ else if(y[0] > 0.0) result[0] += 0.5;
+ }
+
+ if(x[1] > epsilon || abs(y[1]) > epsilon)
+ {
+
+ if(x[1] < 0.0 ^^ y[1] < 0.0)
+ {
+ sign[1] = -1.0;
+ }
+
+ if(abs(y[1]) <= abs(x[1]))
+ {
+ c[1] = abs(y[1] / x[1]);
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * atan_c[1] / (2.0 * M_PI) + 0.5;
+ }
+ else
+ {
+ c[1] = abs(x[1] / y[1]);
+
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * (M_PI / 2.0 - atan_c[1]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[1] < 0.0)
+ if(y[1] < 0.0) result[1] -= 0.5;
+ else if(y[1] > 0.0) result[1] += 0.5;
+ }
+
+ gl_FragColor = result;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvary.vert
new file mode 100644
index 000000000..c9740e5db
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 4.0 * 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(atan(c) / M_PI + 0.5, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..813ed8754
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvary_ref.vert
@@ -0,0 +1,133 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 4.0 * 2.0 * (gtf_Color.rg - 0.5);
+ vec2 atan_c = vec2(0.0);
+ vec2 scale = vec2(1.0);
+ vec2 sign = vec2(1.0);
+ vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
+
+ if(c[0] < 0.0)
+ {
+ sign[0] = -1.0;
+ c[0] *= -1.0;
+ }
+
+ if(c[0] <= 1.0)
+ {
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * atan_c[0] / M_PI + 0.5;
+ }
+ else
+ {
+ c[0] = 1.0 / c[0];
+
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / M_PI + 0.5;
+ }
+
+
+ if(c[1] < 0.0)
+ {
+ sign[1] = -1.0;
+ c[1] *= -1.0;
+ }
+
+ if(c[1] <= 1.0)
+ {
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * atan_c[1] / M_PI + 0.5;
+ }
+ else
+ {
+ c[1] = 1.0 / c[1];
+
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * (M_PI / 2.0 - atan_c[1]) / M_PI + 0.5;
+ }
+
+ color = result;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary.vert
new file mode 100644
index 000000000..cbb0ab63e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary.vert
@@ -0,0 +1,51 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 x = 2.0 * (gtf_Color.gg - 0.5);
+ vec2 y = 2.0 * (gtf_Color.bb - 0.5);
+ const float epsilon = 1.0e-4;
+ color = vec4(0.0, 0.0, 0.0, 1.0);
+
+ // Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
+ if(x[0] > epsilon || abs(y[0]) > epsilon)
+ {
+ color[0] = atan(y[0], x[0]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[1] > epsilon || abs(y[1]) > epsilon)
+ {
+ color[1] = atan(y[1], x[1]) / (2.0 * M_PI) + 0.5;
+ }
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary_ref.vert
new file mode 100644
index 000000000..d80a25e2a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary_ref.vert
@@ -0,0 +1,150 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 x = 2.0 * (gtf_Color.gg - 0.5);
+ vec2 y = 2.0 * (gtf_Color.bb - 0.5);
+ vec2 c;
+ vec2 atan_c = vec2(0.0);
+ vec2 scale = vec2(1.0);
+ vec2 sign = vec2(1.0);
+ vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
+ const float epsilon = 1.0e-4;
+
+ // Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
+ if(x[0] > epsilon || abs(y[0]) > epsilon)
+ {
+ if(x[0] < 0.0 ^^ y[0] < 0.0)
+ {
+ sign[0] = -1.0;
+ }
+
+ if(abs(y[0]) <= abs(x[0]))
+ {
+ c[0] = abs(y[0] / x[0]);
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * atan_c[0] / (2.0 * M_PI) + 0.5;
+ }
+ else
+ {
+ c[0] = abs(x[0] / y[0]);
+
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[0] < 0.0)
+ if(y[0] < 0.0) result[0] -= 0.5;
+ else if(y[0] > 0.0) result[0] += 0.5;
+ }
+
+ if(x[1] > epsilon || abs(y[1]) > epsilon)
+ {
+ if(x[1] < 0.0 ^^ y[1] < 0.0)
+ {
+ sign[1] = -1.0;
+ }
+
+ if(abs(y[1]) <= abs(x[1]))
+ {
+ c[1] = abs(y[1] / x[1]);
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * atan_c[1] / (2.0 * M_PI) + 0.5;
+ }
+ else
+ {
+ c[1] = abs(x[1] / y[1]);
+
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * (M_PI / 2.0 - atan_c[1]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[1] < 0.0)
+ if(y[1] < 0.0) result[1] -= 0.5;
+ else if(y[1] > 0.0) result[1] += 0.5;
+ }
+
+ color = result;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvary.frag
new file mode 100644
index 000000000..281ae2e62
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 4.0 * 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(atan(c) / M_PI + 0.5, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..4fa29d8e9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvary_ref.frag
@@ -0,0 +1,178 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 4.0 * 2.0 * (color.rgb - 0.5);
+ vec3 atan_c = vec3(0.0);
+ vec3 scale = vec3(1.0);
+ vec3 sign = vec3(1.0);
+ vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
+
+
+ if(c[0] < 0.0)
+ {
+ sign[0] = -1.0;
+ c[0] *= -1.0;
+ }
+
+ if(c[0] <= 1.0)
+ {
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * atan_c[0] / M_PI + 0.5;
+ }
+ else
+ {
+ c[0] = 1.0 / c[0];
+
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / M_PI + 0.5;
+ }
+
+ if(c[1] < 0.0)
+ {
+ sign[1] = -1.0;
+ c[1] *= -1.0;
+ }
+
+ if(c[1] <= 1.0)
+ {
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * atan_c[1] / M_PI + 0.5;
+ }
+ else
+ {
+ c[1] = 1.0 / c[1];
+
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * (M_PI / 2.0 - atan_c[1]) / M_PI + 0.5;
+ }
+
+
+ if(c[2] < 0.0)
+ {
+ sign[2] = -1.0;
+ c[2] *= -1.0;
+ }
+
+ if(c[2] <= 1.0)
+ {
+ // Taylors series expansion for atan
+ atan_c[2] += scale[2] * pow(c[2], float(1)) / float(1);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(3)) / float(3);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(5)) / float(5);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(7)) / float(7);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(9)) / float(9);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(11)) / float(11);
+ scale[2] *= -1.0;
+
+ result[2] = sign[2] * atan_c[2] / M_PI + 0.5;
+ }
+ else
+ {
+ c[2] = 1.0 / c[2];
+
+ // Taylors series expansion for atan
+ atan_c[2] += scale[2] * pow(c[2], float(1)) / float(1);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(3)) / float(3);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(5)) / float(5);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(7)) / float(7);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(9)) / float(9);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(11)) / float(11);
+ scale[2] *= -1.0;
+
+ result[2] = sign[2] * (M_PI / 2.0 - atan_c[2]) / M_PI + 0.5;
+ }
+
+ gl_FragColor = result;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary.frag
new file mode 100644
index 000000000..c203df2da
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary.frag
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 x = 2.0 * (color.ggg - 0.5);
+ vec3 y = 2.0 * (color.bbb - 0.5);
+ const float epsilon = 1.0e-4;
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+
+ // Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
+ if(x[0] > epsilon || abs(y[0]) > epsilon)
+ {
+ gl_FragColor[0] = atan(y[0], x[0]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[1] > epsilon || abs(y[1]) > epsilon)
+ {
+ gl_FragColor[1] = atan(y[1], x[1]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[2] > epsilon || abs(y[2]) > epsilon)
+ {
+ gl_FragColor[2] = atan(y[2], x[2]) / (2.0 * M_PI) + 0.5;
+ }
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary_ref.frag
new file mode 100644
index 000000000..92b92646f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary_ref.frag
@@ -0,0 +1,203 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 x = 2.0 * (color.ggg - 0.5);
+ vec3 y = 2.0 * (color.bbb - 0.5);
+ vec3 c;
+ vec3 atan_c = vec3(0.0);
+ vec3 scale = vec3(1.0);
+ vec3 sign = vec3(1.0);
+ vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
+ const float epsilon = 1.0e-4;
+
+ // Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
+ if(x[0] > epsilon || abs(y[0]) > epsilon)
+ {
+ if(x[0] < 0.0 ^^ y[0] < 0.0)
+ {
+ sign[0] = -1.0;
+ }
+
+ if(abs(y[0]) <= abs(x[0]))
+ {
+ c[0] = abs(y[0] / x[0]);
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * atan_c[0] / (2.0 * M_PI) + 0.5;
+ }
+ else
+ {
+ c[0] = abs(x[0] / y[0]);
+
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[0] < 0.0)
+ if(y[0] < 0.0) result[0] -= 0.5;
+ else if(y[0] > 0.0) result[0] += 0.5;
+ }
+
+ if(x[1] > epsilon || abs(y[1]) > epsilon)
+ {
+
+ if(x[1] < 0.0 ^^ y[1] < 0.0)
+ {
+ sign[1] = -1.0;
+ }
+
+ if(abs(y[1]) <= abs(x[1]))
+ {
+ c[1] = abs(y[1] / x[1]);
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * atan_c[1] / (2.0 * M_PI) + 0.5;
+ }
+ else
+ {
+ c[1] = abs(x[1] / y[1]);
+
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * (M_PI / 2.0 - atan_c[1]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[1] < 0.0)
+ if(y[1] < 0.0) result[1] -= 0.5;
+ else if(y[1] > 0.0) result[1] += 0.5;
+ }
+
+ if(x[2] > epsilon || abs(y[2]) > epsilon)
+ {
+
+ if(x[2] < 0.0 ^^ y[2] < 0.0)
+ {
+ sign[2] = -1.0;
+ }
+
+ if(abs(y[2]) <= abs(x[2]))
+ {
+ c[2] = abs(y[2] / x[2]);
+ // Taylors series expansion for atan
+ atan_c[2] += scale[2] * pow(c[2], float(1)) / float(1);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(3)) / float(3);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(5)) / float(5);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(7)) / float(7);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(9)) / float(9);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(11)) / float(11);
+ scale[2] *= -1.0;
+
+ result[2] = sign[2] * atan_c[2] / (2.0 * M_PI) + 0.5;
+ }
+ else
+ {
+ c[2] = abs(x[2] / y[2]);
+
+ // Taylors series expansion for atan
+ atan_c[2] += scale[2] * pow(c[2], float(1)) / float(1);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(3)) / float(3);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(5)) / float(5);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(7)) / float(7);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(9)) / float(9);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(11)) / float(11);
+ scale[2] *= -1.0;
+
+ result[2] = sign[2] * (M_PI / 2.0 - atan_c[2]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[2] < 0.0)
+ if(y[2] < 0.0) result[2] -= 0.5;
+ else if(y[2] > 0.0) result[2] += 0.5;
+ }
+
+ gl_FragColor = result;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvary.vert
new file mode 100644
index 000000000..ad0d32787
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 4.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(atan(c) / M_PI + 0.5, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..735f88092
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvary_ref.vert
@@ -0,0 +1,178 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 4.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ vec3 atan_c = vec3(0.0);
+ vec3 scale = vec3(1.0);
+ vec3 sign = vec3(1.0);
+ vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
+
+ if(c[0] < 0.0)
+ {
+ sign[0] = -1.0;
+ c[0] *= -1.0;
+ }
+
+ if(c[0] <= 1.0)
+ {
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * atan_c[0] / M_PI + 0.5;
+ }
+ else
+ {
+ c[0] = 1.0 / c[0];
+
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / M_PI + 0.5;
+ }
+
+
+ if(c[1] < 0.0)
+ {
+ sign[1] = -1.0;
+ c[1] *= -1.0;
+ }
+
+ if(c[1] <= 1.0)
+ {
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * atan_c[1] / M_PI + 0.5;
+ }
+ else
+ {
+ c[1] = 1.0 / c[1];
+
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * (M_PI / 2.0 - atan_c[1]) / M_PI + 0.5;
+ }
+
+ if(c[2] < 0.0)
+ {
+ sign[2] = -1.0;
+ c[2] *= -1.0;
+ }
+
+ if(c[2] <= 1.0)
+ {
+ // Taylors series expansion for atan
+ atan_c[2] += scale[2] * pow(c[2], float(1)) / float(1);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(3)) / float(3);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(5)) / float(5);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(7)) / float(7);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(9)) / float(9);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(11)) / float(11);
+ scale[2] *= -1.0;
+
+ result[2] = sign[2] * atan_c[2] / M_PI + 0.5;
+ }
+ else
+ {
+ c[2] = 1.0 / c[2];
+
+ // Taylors series expansion for atan
+ atan_c[2] += scale[2] * pow(c[2], float(1)) / float(1);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(3)) / float(3);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(5)) / float(5);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(7)) / float(7);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(9)) / float(9);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(11)) / float(11);
+ scale[2] *= -1.0;
+
+ result[2] = sign[2] * (M_PI / 2.0 - atan_c[2]) / M_PI + 0.5;
+ }
+
+ color = result;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary.vert
new file mode 100644
index 000000000..637d7a3e3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary.vert
@@ -0,0 +1,56 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 x = 2.0 * (gtf_Color.ggg - 0.5);
+ vec3 y = 2.0 * (gtf_Color.bbb - 0.5);
+ const float epsilon = 1.0e-4;
+ color = vec4(0.0, 0.0, 0.0, 1.0);
+
+ // Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
+ if(x[0] > epsilon || abs(y[0]) > epsilon)
+ {
+ color[0] = atan(y[0], x[0]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[1] > epsilon || abs(y[1]) > epsilon)
+ {
+ color[1] = atan(y[1], x[1]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[2] > epsilon || abs(y[2]) > epsilon)
+ {
+ color[2] = atan(y[2], x[2]) / (2.0 * M_PI) + 0.5;
+ }
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary_ref.vert
new file mode 100644
index 000000000..c8a671240
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary_ref.vert
@@ -0,0 +1,202 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 x = 2.0 * (gtf_Color.ggg - 0.5);
+ vec3 y = 2.0 * (gtf_Color.bbb - 0.5);
+ vec3 c;
+ vec3 atan_c = vec3(0.0);
+ vec3 scale = vec3(1.0);
+ vec3 sign = vec3(1.0);
+ vec4 result = vec4(0.0, 0.0, 0.0, 1.0);
+ const float epsilon = 1.0e-4;
+
+ // Avoid evaluating atan(0, x) for x < epsilon because it's implementation-dependent
+ if(x[0] > epsilon || abs(y[0]) > epsilon)
+ {
+ if(x[0] < 0.0 ^^ y[0] < 0.0)
+ {
+ sign[0] = -1.0;
+ }
+
+ if(abs(y[0]) <= abs(x[0]))
+ {
+ c[0] = abs(y[0] / x[0]);
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * atan_c[0] / (2.0 * M_PI) + 0.5;
+ }
+ else
+ {
+ c[0] = abs(x[0] / y[0]);
+
+ // Taylors series expansion for atan
+ atan_c[0] += scale[0] * pow(c[0], float(1)) / float(1);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(3)) / float(3);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(5)) / float(5);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(7)) / float(7);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(9)) / float(9);
+ scale[0] *= -1.0;
+ atan_c[0] += scale[0] * pow(c[0], float(11)) / float(11);
+ scale[0] *= -1.0;
+
+ result[0] = sign[0] * (M_PI / 2.0 - atan_c[0]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[0] < 0.0)
+ if(y[0] < 0.0) result[0] -= 0.5;
+ else if(y[0] > 0.0) result[0] += 0.5;
+ }
+
+ if(x[1] > epsilon || abs(y[1]) > epsilon)
+ {
+ if(x[1] < 0.0 ^^ y[1] < 0.0)
+ {
+ sign[1] = -1.0;
+ }
+
+ if(abs(y[1]) <= abs(x[1]))
+ {
+ c[1] = abs(y[1] / x[1]);
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * atan_c[1] / (2.0 * M_PI) + 0.5;
+ }
+ else
+ {
+ c[1] = abs(x[1] / y[1]);
+
+ // Taylors series expansion for atan
+ atan_c[1] += scale[1] * pow(c[1], float(1)) / float(1);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(3)) / float(3);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(5)) / float(5);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(7)) / float(7);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(9)) / float(9);
+ scale[1] *= -1.0;
+ atan_c[1] += scale[1] * pow(c[1], float(11)) / float(11);
+ scale[1] *= -1.0;
+
+ result[1] = sign[1] * (M_PI / 2.0 - atan_c[1]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[1] < 0.0)
+ if(y[1] < 0.0) result[1] -= 0.5;
+ else if(y[1] > 0.0) result[1] += 0.5;
+ }
+
+ if(x[2] > epsilon || abs(y[2]) > epsilon)
+ {
+ if(x[2] < 0.0 ^^ y[2] < 0.0)
+ {
+ sign[2] = -1.0;
+ }
+
+ if(abs(y[2]) <= abs(x[2]))
+ {
+ c[2] = abs(y[2] / x[2]);
+ // Taylors series expansion for atan
+ atan_c[2] += scale[2] * pow(c[2], float(1)) / float(1);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(3)) / float(3);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(5)) / float(5);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(7)) / float(7);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(9)) / float(9);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(11)) / float(11);
+ scale[2] *= -1.0;
+
+ result[2] = sign[2] * atan_c[2] / (2.0 * M_PI) + 0.5;
+ }
+ else
+ {
+ c[2] = abs(x[2] / y[2]);
+
+ // Taylors series expansion for atan
+ atan_c[2] += scale[2] * pow(c[2], float(1)) / float(1);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(3)) / float(3);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(5)) / float(5);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(7)) / float(7);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(9)) / float(9);
+ scale[2] *= -1.0;
+ atan_c[2] += scale[2] * pow(c[2], float(11)) / float(11);
+ scale[2] *= -1.0;
+
+ result[2] = sign[2] * (M_PI / 2.0 - atan_c[2]) / (2.0 * M_PI) + 0.5;
+ }
+
+ if(x[2] < 0.0)
+ if(y[2] < 0.0) result[2] -= 0.5;
+ else if(y[2] > 0.0) result[2] += 0.5;
+ }
+
+ color = result;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/input.run.txt
new file mode 100644
index 000000000..1c305f211
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/input.run.txt
@@ -0,0 +1,3 @@
+# this file is auto-generated. DO NOT EDIT.
+atan_001_to_008.html
+atan_009_to_012.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_001_to_008.html
new file mode 100644
index 000000000..c3cafba1e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_001_to_008.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: biConstants_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_MaxCombinedTextureImageUnits_frag.frag"
+ },
+ "name": "gl_MaxCombinedTextureImageUnits_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "gl_MaxCombinedTextureImageUnits_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "gl_MaxCombinedTextureImageUnits_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_MaxDrawBuffers_frag.frag"
+ },
+ "name": "gl_MaxDrawBuffers_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "gl_MaxDrawBuffers_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "gl_MaxDrawBuffers_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_MaxFragmentUniformVectors_frag.frag"
+ },
+ "name": "gl_MaxFragmentUniformVectors_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "gl_MaxFragmentUniformVectors_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "gl_MaxFragmentUniformVectors_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_MaxTextureImageUnits_frag.frag"
+ },
+ "name": "gl_MaxTextureImageUnits_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "gl_MaxTextureImageUnits_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "gl_MaxTextureImageUnits_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_009_to_016.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_009_to_016.html
new file mode 100644
index 000000000..31b9d07a1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_009_to_016.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: biConstants_009_to_016.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_MaxVaryingVectors_frag.frag"
+ },
+ "name": "gl_MaxVaryingVectors_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "gl_MaxVaryingVectors_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "gl_MaxVaryingVectors_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_MaxVertexAttribs_frag.frag"
+ },
+ "name": "gl_MaxVertexAttribs_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "gl_MaxVertexAttribs_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "gl_MaxVertexAttribs_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_MaxVertexTextureImageUnits_frag.frag"
+ },
+ "name": "gl_MaxVertexTextureImageUnits_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "gl_MaxVertexTextureImageUnits_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "gl_MaxVertexTextureImageUnits_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_MaxVertexUniformVectors_frag.frag"
+ },
+ "name": "gl_MaxVertexUniformVectors_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "gl_MaxVertexUniformVectors_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "gl_MaxVertexUniformVectors_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxCombinedTextureImageUnits_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxCombinedTextureImageUnits_frag.frag
new file mode 100644
index 000000000..94e9c6d0e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxCombinedTextureImageUnits_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxCombinedTextureImageUnits is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 8.0 will get clamped to 1.0 or white.
+ gl_FragColor = vec4(float(gl_MaxCombinedTextureImageUnits) / 8.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxCombinedTextureImageUnits_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxCombinedTextureImageUnits_vert.vert
new file mode 100644
index 000000000..8dcfd2d98
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxCombinedTextureImageUnits_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxCombinedTextureImageUnits is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 8.0 will get clamped to 1.0 or white.
+ color = vec4(float(gl_MaxCombinedTextureImageUnits) / 8.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxDrawBuffers_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxDrawBuffers_frag.frag
new file mode 100644
index 000000000..481f76a15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxDrawBuffers_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxDrawBuffers is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 1.0 will get clamped to 1.0 or white.
+ gl_FragColor = vec4(float(gl_MaxDrawBuffers) / 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxDrawBuffers_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxDrawBuffers_vert.vert
new file mode 100644
index 000000000..25cc2b469
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxDrawBuffers_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxDrawBuffers is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 1.0 will get clamped to 1.0 or white.
+ color = vec4(float(gl_MaxDrawBuffers) / 1.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxFragmentUniformVectors_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxFragmentUniformVectors_frag.frag
new file mode 100644
index 000000000..d54198995
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxFragmentUniformVectors_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxFragmentUniformVectors is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 16.0 will get clamped to 1.0 or white.
+ gl_FragColor = vec4(float(gl_MaxFragmentUniformVectors) / 16.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxFragmentUniformVectors_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxFragmentUniformVectors_vert.vert
new file mode 100644
index 000000000..f430197c8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxFragmentUniformVectors_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxFragmentUniformVectors is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 16.0 will get clamped to 1.0 or white.
+ color = vec4(float(gl_MaxFragmentUniformVectors) / 16.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxTextureImageUnits_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxTextureImageUnits_frag.frag
new file mode 100644
index 000000000..55b7b2078
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxTextureImageUnits_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxTextureImageUnits is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 8.0 will get clamped to 1.0 or white.
+ gl_FragColor = vec4(float(gl_MaxTextureImageUnits) / 8.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxTextureImageUnits_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxTextureImageUnits_vert.vert
new file mode 100644
index 000000000..b0851a729
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxTextureImageUnits_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxTextureImageUnits is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 8.0 will get clamped to 1.0 or white.
+ color = vec4(float(gl_MaxTextureImageUnits) / 8.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVaryingVectors_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVaryingVectors_frag.frag
new file mode 100644
index 000000000..abd8e8bff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVaryingVectors_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxVaryingVectors is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 8.0 will get clamped to 1.0 or white.
+ gl_FragColor = vec4(float(gl_MaxVaryingVectors) / 8.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVaryingVectors_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVaryingVectors_vert.vert
new file mode 100644
index 000000000..cfb2449cb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVaryingVectors_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxVaryingVectors is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 8.0 will get clamped to 1.0 or white.
+ color = vec4(float(gl_MaxVaryingVectors) / 8.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexAttribs_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexAttribs_frag.frag
new file mode 100644
index 000000000..f839f4c4e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexAttribs_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxVertexAttribs is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 8.0 will get clamped to 1.0 or white.
+ gl_FragColor = vec4(float(gl_MaxVertexAttribs) / 8.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexAttribs_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexAttribs_vert.vert
new file mode 100644
index 000000000..ca7742902
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexAttribs_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxVertexAttribs is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 8.0 will get clamped to 1.0 or white.
+ color = vec4(float(gl_MaxVertexAttribs) / 8.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexTextureImageUnits_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexTextureImageUnits_frag.frag
new file mode 100644
index 000000000..946dbd827
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexTextureImageUnits_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxVertexTextureImageUnits is set and that its
+ // value is greater than or equal to the minimum value.
+ if(gl_MaxVertexTextureImageUnits >= 0)
+ gl_FragColor = vec4(1.0);
+ else
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexTextureImageUnits_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexTextureImageUnits_vert.vert
new file mode 100644
index 000000000..28306594d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexTextureImageUnits_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxVertexTextureImageUnits is set and that its
+ // value is greater than or equal to the minimum value.
+ if(gl_MaxVertexTextureImageUnits >= 0)
+ color = vec4(1.0);
+ else
+ color = vec4(0.0, 0.0, 0.0, 1.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexUniformVectors_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexUniformVectors_frag.frag
new file mode 100644
index 000000000..735c7d0ce
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexUniformVectors_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxVertexUniformVectors is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 128.0 will get clamped to 1.0 or white.
+ gl_FragColor = vec4(float(gl_MaxVertexUniformVectors) / 128.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexUniformVectors_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexUniformVectors_vert.vert
new file mode 100644
index 000000000..b9e1b3387
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexUniformVectors_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ // This test verifies that gl_MaxVertexUniformVectors is set and that its
+ // value is greater than or equal to the minimum value.
+ // Values greater than 128.0 will get clamped to 1.0 or white.
+ color = vec4(float(gl_MaxVertexUniformVectors) / 128.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/input.run.txt
new file mode 100644
index 000000000..15c403b1a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/input.run.txt
@@ -0,0 +1,3 @@
+# this file is auto-generated. DO NOT EDIT.
+biConstants_001_to_008.html
+biConstants_009_to_016.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/DepthRange_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/DepthRange_frag.frag
new file mode 100644
index 000000000..0dcfe2a9a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/DepthRange_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+void main(void)
+{
+ gl_FragColor = vec4(gl_DepthRange.near, gl_DepthRange.far, gl_DepthRange.diff, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/DepthRange_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/DepthRange_vert.vert
new file mode 100644
index 000000000..6f8288c1e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/DepthRange_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main(void)
+{
+ color = vec4(gl_DepthRange.near, gl_DepthRange.far, gl_DepthRange.diff, 1.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html
new file mode 100644
index 000000000..64e7d71b9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html
@@ -0,0 +1,115 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: biuDepthRange_001_to_002.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.25,
+ 0.75,
+ 0.5,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "name": "DepthRange_frag.test.html",
+ "pattern": "compare",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "DepthRange_frag.frag"
+ },
+ "state": {
+ "depthrange": {
+ "far": "0.75",
+ "near": "0.25"
+ }
+ },
+ "model": null
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.25,
+ 0.75,
+ 0.5,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "name": "DepthRange_vert.test.html",
+ "pattern": "compare",
+ "testProgram": {
+ "vertexShader": "DepthRange_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "state": {
+ "depthrange": {
+ "far": "0.75",
+ "near": "0.25"
+ }
+ },
+ "model": "grid"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/input.run.txt
new file mode 100644
index 000000000..21f2fd2e1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+biuDepthRange_001_to_002.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CG_Data_Types_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CG_Data_Types_frag.frag
new file mode 100644
index 000000000..2fed27f6d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CG_Data_Types_frag.frag
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ half h1; // Not a basic type.
+ half2 h2; // Not a basic type.
+ half3 h3; // Not a basic type.
+ half4 h4; // Not a basic type.
+ float2 f2; // Not a basic type.
+ float3 f3; // Not a basic type.
+ float4 f4; // Not a basic type.
+ fixed fx1; // Not a basic type.
+ fixed2 fx2; // Not a basic type.
+ fixed3 fx3; // Not a basic type.
+ fixed4 fx4; // Not a basic type.
+ float3x3 f3x3; // Not a basic type.
+ float2x4 f2x4; // Not a basic type.
+ half4x4 h4x4; // Not a basic type.
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CG_Standard_Library_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CG_Standard_Library_frag.frag
new file mode 100644
index 000000000..17bf049bf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CG_Standard_Library_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int i = round(1.3); // round is not a built-in function.
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectBuiltInOveride_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectBuiltInOveride_frag.frag
new file mode 100644
index 000000000..21576a226
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectBuiltInOveride_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump int;
+#endif
+
+int radians(int f)
+{
+ return f;
+}
+
+void main()
+{
+ int f = 45;
+ f = radians(f);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectComma_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectComma_frag.frag
new file mode 100644
index 000000000..3a83174a4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectComma_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct s {
+ float f;
+ vec3 v;
+};
+
+void main()
+{
+ const vec4 v = (vec4(1,2,3,4), vec4(5,6,7,8)); // 5,6,7,8
+ const s s1 = (s(9.0, vec3(10,11,12)), s(13.0, vec3(14,15,16))); // 13,14,15,16
+ gl_FragColor = v + vec4(s1.f, s1.v); // 18, 20, 22, 24
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstFolding1_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstFolding1_vert.vert
new file mode 100644
index 000000000..5c5dee325
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstFolding1_vert.vert
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+
+ const struct s2 {
+ int i;
+ vec3 v3;
+ bvec4 bv4;
+ } s22 = s2(8, vec3(9, 10, 11), bvec4(true, false, true, false));
+
+ struct s4 {
+ int ii;
+ vec4 v4;
+ };
+
+ const struct s1 {
+ s2 ss;
+ int i;
+ float f;
+ mat4 m;
+ s4 s44;
+ } s11 = s1(s22, 2, 4.0, mat4(5), s4(6, vec4(7, 8, 9, 10))) ;
+
+ const int field3 = s11.i * s11.ss.i; // constant folding (int * int)
+ const vec4 field4 = s11.s44.v4 * s11.s44.v4; // constant folding (vec4 * vec4)
+ // 49, 64, 81, 100
+ const vec4 v4 = vec4(s11.ss.v3.y, s11.m[3][3], field3, field4[2]); // 10.0, 5.0, 16.0, 81.0
+ gl_Position = v4;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstFolding2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstFolding2_vert.vert
new file mode 100644
index 000000000..2749d2b99
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstFolding2_vert.vert
@@ -0,0 +1,438 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+ struct s5 {
+ float k;
+ };
+ const struct s {
+ int i;
+ float j;
+ s5 s55;
+ } ss = s(4,1.0, s5(1.0));
+
+
+ const struct s2 {
+ int i;
+ vec3 v3;
+ bvec4 bv4;
+ } s22 = s2(8, vec3(9, 10, 11), bvec4(true, false, true, false));
+
+ struct s4 {
+ int ii;
+ vec4 v4;
+ };
+
+ const struct s1 {
+ s2 ss;
+ int i;
+ float f;
+ mat4 m;
+ s4 s44;
+ } s11 = s1(s22, 2, 4.0, mat4(5), s4(6, vec4(7, 8, 9, 10))) ;
+
+
+ const struct s7 {
+ int i;
+ mat3 m3;
+ } s77 = s7(12, mat3(15));
+
+ vec2 v21 = vec2(1); // Not a constant
+ const vec2 v22 = vec2(11); // 11.0, 11.0
+ const vec4 v41 = vec4(2); // 2.0, 2.0, 2.0, 2.0
+ const vec4 v43 = vec4(4,4,4,4); // 4.0, 4.0, 4.0, 4.0
+ const vec4 v44 = vec4(5.0, 5.0, 5.0, 5.0); // 5.0, 5.0, 5.0, 5.0
+ const vec4 v45 = vec4(v22, v22); // 11.0, 11.0, 11.0, 11.0
+ const vec4 v46 = vec4(vec2(20, 21), vec2(22, 23)); // 20.0, 21.0, 22.0, 23.0
+
+ const vec3 v31 = vec3(s22.v3); // 9.0, 10.0, 11.0
+ const vec3 v32 = vec3(s77.m3); // 15.0, 0, 0
+ const vec3 v33 = vec3(s77.m3[2]); // 0, 0, 15.0
+ const vec3 v34 = vec3(s77.m3[2][0]); // 0,0,0
+
+
+ const mat4 m41 = mat4(1); // 1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1
+ const mat4 m42 = mat4(v44, v44, v44, v44); // all 5s
+ const mat4 m43 = mat4( v43.x); // 4,0,0,0,0,4,0,0,0,0,0,4,0,0,0,0,0,4
+
+ const vec4 v47 = vec4(m41[0][0]); // 1.0,1.0,1.0,1.0
+
+ const mat4 m45 = mat4(s22.v3, v44, v45, v32, 50, 52); //9,10,11,5,5,5,5,11,11,11,11,15.0, 0,0, 50.0, 52.0
+ //const mat3 m31 = mat3(1, mat2(1), 2.0, vec3(1)); // 1.0, 1,0,0,1,2,1,1,1
+ const vec4 v48 = vec4(v31[0], v22[1], v41[0], v43[3]); //9, 11, 2, 4
+ const vec4 v49 = vec4(s22.v3.xy, s22.v3.zx); // 9,10,11,9
+ const vec4 v410 = vec4(v44.xy, v43.zx); //5,5,4,4
+
+ const vec4 v411 = vec4(m42[3]); // 5,5,5,5
+ const vec4 v412 = vec4(m43[2]); // 0,0,4,0
+
+ const vec2 v23 = vec2(m41); // 1,0
+
+ const vec2 v24 = vec2(33, s11.i); // 33, 2
+
+ const vec4 v413 = vec4(vec2(1.0,2.0),ivec2(3.0,4.0)); // 1,2,3,4
+ const ivec4 i41 = ivec4(1.0, 2.0, 3.0, 4.0); // 1,2,3,4
+
+ const ivec4 i42 = ivec4(6); // 6,6,6,6
+ const ivec4 i43 = ivec4(v45); //11,11,11,11
+
+ const ivec4 i44 = ivec4(v44[0]); // 5,5,5,5
+ const ivec4 i45 = ivec4(vec2(20, 21), vec2(22, 23)); // 20, 21, 22, 23
+ const vec4 v414 = vec4(ivec2(29, 30), ivec2(31, 32)); // 29.0, 30.0, 31.0, 32.0
+ const ivec4 i46 = ivec4(ivec2(2.0,3.0), ivec3(4.0,5.0,6.0));
+ const ivec4 i47 = ivec4(i46); // 2,3,4,5
+ const ivec4 i48 = ivec4(v414.x); // 29,29,29,29
+
+ const ivec4 i49 = ivec4(vec4(1)); // 1,1,1,1
+ const ivec4 i414 = ivec4(mat4(14)); // 14, 0,0,0,
+ const ivec4 i410 = ivec4(m43); // 4,0,0,0
+ const ivec4 i411 = ivec4(m43[1]); // 0, 4, 0, 0
+ const ivec4 i412 = ivec4(s77.i); // 12, 12, 12, 12
+ const ivec4 i416 = ivec4(s22.v3.zyx, 12); // 11, 10, 9, 12
+
+ const vec4 v415 = vec4(ivec2(35), ivec2(36)); // 35.0, 35.0 ,36.0 , 36.0
+
+ const bvec4 b41 = bvec4(1.0, 2.0, 3.0, 4.0); // true,true,true,true
+
+ const bvec4 b42 = bvec4(6); // true,true,true,true
+ const bvec4 b43 = bvec4(v45); //true,true,true,true
+
+ const bvec4 b44 = bvec4(v44[0]); // true,true,true,true
+ const bvec4 b45 = bvec4(vec2(0, 21), vec2(0, 1)); // false, true, false, true
+ const bvec4 b46 = bvec4(ivec2(0.0,3.0), ivec3(0,5.0,6.0)); // false, true, false, true
+ const bvec4 b47 = bvec4(i46); // true,true,true,true
+ const bvec4 b48 = bvec4(v414.x); // true,true,true,true
+
+ const bvec4 b49 = bvec4(vec4(0)); // false,false,false,false
+ const bvec4 b414 = bvec4(mat4(14)); // true, false,false,false,
+ const bvec4 b410 = bvec4(m43); // true,false,false,false
+ const bvec4 b411 = bvec4(m43[1]); // false, true, false, false
+ const bvec4 b412 = bvec4(s77.i) ; // true, true, true, true
+
+ const vec3 v35 = vec3(s11.s44.v4); // 7.0,8.0,9.0
+
+
+ struct s10 {
+ int k;
+ };
+ struct s9 {
+ float f;
+ s10 s101;
+ };
+ const struct s8 {
+ int i;
+ s9 s99;
+ } s88 = s8(1, s9(2.0, s10(5)));
+
+ struct st4 {
+ int m;
+ vec3 v3;
+ };
+ struct st3 {
+ int k;
+ int l;
+ st4 st44;
+ };
+ struct st2 {
+ float f;
+ st3 st33;
+ };
+ const struct st1 {
+ int i;
+ st2 st22;
+ } st11 = st1(1, st2(2.0, st3(5, 6, st4(7, v35))));
+
+ const vec4 v416 = vec4(s88.s99.s101.k); // all 5s
+ const vec4 v417 = vec4(st11.st22.st33.st44.v3, s88.s99.s101.k); // 7.0, 8.0, 9.0, 5.0
+ const vec3 v36 = vec3(s11.ss.v3); // 9, 10, 11
+
+ vec4 v418 = v416; // all 5s
+ const float f1 = v416[0]; // 5.0
+ vec4 v419;
+ v419.xyz = st11.st22.st33.st44.v3;
+ mat4 m47;
+
+ struct struct2 {
+ int k;
+ } struct22 = struct2(4);
+
+ const struct struct1 {
+ struct2 sst2;
+ } struct11 = struct1(struct2(2));
+
+ const vec4 v420 = v417; // 7.0, 8.0, 9.0 , 5.0
+
+ vec4 v421 = vec4(s11.m); // 5, 0, 0, 0
+ vec4 v422 = v420; // 7.0, 8.0, 9.0 , 5.0
+
+ vec4 v423 = s11.s44.v4; // 7, 8, 9, 10
+
+ int int1 = ss.i * ss.i; // 16
+ int int2 = ss.i * 2; // 8
+
+ const vec4 v425 = v420 * v420; // 49, 64, 81, 25
+ const vec4 v426 = s11.m * s11.s44.v4; // 35, 40, 45, 50
+ const vec4 v427 = s11.s44.v4 * s11.m; // 35, 40, 45, 50
+
+ float ff = 2.0;
+ const float ffConst = 2.0;
+
+ vec4 v428 = ff + v425; // ordinary assignment with binary node
+ vec3 v39 = vec3(5);
+
+ vec3 v310 = s22.v3 + v39; //14, 15, 16
+
+ const vec4 v429 = v420 + v420; // 14, 16, 18, 10
+ const vec4 v430 = v420 + ffConst; // 9, 10, 11,7
+ const vec4 v432 = v429 + s11.f; // 18, 20, 22, 14
+
+ const vec4 v433 = vec4(s11.f + s11.f); // all 8s
+ const vec4 v434 = v432 + vec4(3); // 21, 23, 25, 17
+ const mat4 m48 = s11.m + ffConst; // diagonal 7s and others 2s
+ const mat4 m49 = mat4(ffConst + s11.f); // diagonal 6s
+ const mat4 m410 = m48 + s11.f; // diagonal 11, others - 6s
+
+ const mat4 m413 = m48 + m48 ; // diagonal 14, others 4
+ const mat4 m414 = m413 + ffConst ; // diagonal 16, others 6
+
+ const vec4 v435 = ffConst + v420; // 9, 10, 11,7
+ const vec4 v436 = s11.f + v429; // 18, 20, 22, 14
+ const mat4 m415 = ffConst + s11.m; // diagonal 7s and others 2s
+ const mat4 m416 = s11.f + m48 ; // diagonal 11, others - 6s
+ const mat4 m417 = ffConst + m413 ; // diagonal 16, others 6
+
+ const vec4 v437 = v420 - v420; // 0, 0, 0, 0
+ const vec4 v438 = v420 - ffConst; // 5, 6, 7,3
+ const vec4 v440 = v429 - s11.f; // 10, 12, 14, 6
+
+ const vec4 v441 = vec4(s11.f - s11.f); // all 0s
+ const vec4 v442 = v432 - vec4(3); // 15, 17, 19, 11
+ const mat4 m418 = s11.m - ffConst; // diagonal 3s and others -2s
+ const mat4 m419 = mat4(ffConst - s11.f); // diagonal -> -2s
+ const mat4 m420 = m48 - s11.f; // diagonal 3, others -> -2
+
+ const mat4 m423 = m48 - m48 ; // All 0s
+ const mat4 m424 = m413 - ffConst ; // diagonal 12, others 2
+
+ const vec4 v443 = ffConst - v420; // -5, -6, -7,-3
+ const vec4 v444 = s11.f - v429; // -10, -12, -14, -6
+ const mat4 m425 = ffConst - s11.m; // diagonal -3s and others 2s
+ const mat4 m426 = s11.f - m48 ; // diagonal -3, others 2s
+ const mat4 m427 = ffConst - m413 ; // diagonal -12, others -2
+
+ const vec4 v445 = v420 * v420; // 49, 64, 81, 25
+ const vec4 v446 = v420 * ffConst; // 14, 16, 18,10
+ const vec4 v448 = v429 * s11.f; // 56, 46, 72, 40
+
+ const vec4 v449 = vec4(s11.f * s11.f); // all 16
+ const vec4 v450 = v432 * vec4(3); // 54, 60, 66, 42
+ const mat4 m428 = s11.m * ffConst; // diagonal 10 and others 0s
+ const mat4 m429 = mat4(ffConst * s11.f); // diagonal 8
+ const mat4 m430 = m48 * s11.f; // diagonal 28, others 8
+
+ const mat4 m433 = m48 * m48 ; // diagonal 61, others 36
+ const mat4 m434 = m413 * ffConst ; // diagonal 28, others 8
+
+ const vec4 v451 = ffConst * v420; // 14, 16, 18,10
+ const vec4 v452 = s11.f * v429; // 56, 64, 72, 40
+ const mat4 m435 = ffConst * s11.m; // diagonal 10 and others 0s
+ const mat4 m436 = s11.f * m48 ; // diagonal 28, others - 8s
+ const mat4 m437 = ffConst * m413 ; // diagonal 28, others 8
+
+ const vec4 v453 = v420 / v420; // 1, 1, 1, 1
+ const vec4 v454 = v420 / ffConst; // 3.5, 4, 4.5,2.5
+
+ const vec4 v457 = vec4(s11.f / s11.f); // all 1s
+ const vec4 v458 = v432 / vec4(3); // 6, 6.6666, 7.333, 4.6666
+ const mat4 m438 = s11.m / ffConst; // diagonal 2.5 and others 0s
+ const mat4 m439 = mat4(ffConst / s11.f); // diagonal 0.5s
+ const mat4 m440 = m48 / s11.f; // diagonal 1.75, others 0.5s
+
+ const mat4 m443 = m48 / m48 ; // All 1s
+ const mat4 m444 = m413 / ffConst ; // diagonal 7, others 2
+
+ const vec4 v459 = ffConst / v420; // .2857 , .25, .22, .4
+ const vec4 v460 = s11.f / v429; // .2857, .25, .22, .4
+ //const mat4 m445 = ffConst / s11.m; // divide by zero error
+ const mat4 m446 = s11.f / m48 ; // diagonal .571, others 2
+ const mat4 m447 = ffConst / m413 ; // diagonal .1428, others 0.5
+
+ const vec4 v461 = v453 * m428; // 10, 10, 10, 10
+ const vec4 v462 = v453 * m437; // 52, 52, 52, 52
+ const vec4 v463 = m428 * v451; // 140, 160, 180, 100
+ const vec4 v464 = m437 * v451; // 744, 784, 824, 664
+
+ int ii = 2;
+ const int iiConst = 2;
+
+ const ivec4 i420 = ivec4( 7,8,9,5); // 7, 8, 9, 5
+
+ const ivec4 i429 = i420 + i420; // 14, 16, 18, 10
+ const ivec4 i430 = i420 + iiConst; // 9, 10, 11,7
+ const ivec4 i432 = i429 + ss.i; // 18, 20, 22, 14
+
+ const ivec4 i433 = ivec4(ss.i + ss.i); // all 8s
+
+ const ivec4 i435 = iiConst + i420; // 9, 10, 11,7
+ const ivec4 i436 = ss.i + i429; // 18, 20, 22, 14
+
+ const ivec4 i437 = i420 - i420; // 0, 0, 0, 0
+ const ivec4 i438 = i420 - iiConst; // 5, 6, 7,3
+ const ivec4 i440 = i429 - ss.i; // 10, 12, 14, 6
+
+ const ivec4 i441 = ivec4(ss.i - ss.i); // all 0s
+
+ const ivec4 i443 = iiConst - i420; // -5, -6, -7,-3
+ const ivec4 i444 = ss.i - i429; // -10, -12, -14, -6
+
+ const ivec4 i445 = i420 * i420; // 49, 64, 81, 25
+ const ivec4 i446 = i420 * iiConst; // 14, 16, 18,10
+ const ivec4 i448 = i429 * ss.i; // 56, 64, 72, 40
+
+ const ivec4 i449 = ivec4(ss.i * ss.i); // all 16
+
+ const ivec4 i451 = iiConst * i420; // 14, 16, 18,10
+ const ivec4 i452 = ss.i * i429; // 56, 64, 72, 40
+
+ const ivec4 i453 = i420 / i420; // 1, 1, 1, 1
+ const ivec4 i454 = i420 / iiConst; // 3, 4, 4,2
+ const ivec4 i456 = i429 / ss.i; // 3, 4, 4, 2
+
+ const ivec4 i457 = ivec4(ss.i / ss.i); // all 1s
+
+ const ivec4 i459 = iiConst / i420; // 0 , 0, 0,0
+ const ivec4 i460 = ss.i / i429; // 0, 0, 0,0
+
+ const bvec4 b424 = bvec4(s22.bv4);
+
+ const bool b1 = s22.bv4 == b424; // true
+ const bool b2 = i420 == i420; // true
+ const bool b3 = i420 == i445; // false
+ const bool b4 = v420 == v420; // true
+ const bool b5 = m430 == m434; // true
+
+ const vec4 v465 = -v420; // -7, -8, -9, -5
+ const mat4 m448 = -m447 ; // diagonal -.1428, others -0.5
+ const ivec4 i465 = -i456 ; // -3, -4, -4,-2
+
+ const bool b7 = s22 == s22;
+
+ const vec4 v466 = v432 + vec4(3,4,5,6); // 21, 24, 27, 20
+ const vec4 v467 = v432 + vec4(vec2(3,4),5,6); // 21, 24, 27, 20
+ const vec4 v468 = v432 + vec4(3, vec2(4, 5),vec2(6,7)); // 21, 24, 27, 20
+ const vec4 v469 = vec4(v468) + vec4(3) + v468 + vec4(s77.m3[2][0]); // 45, 51, 57, 43
+
+ const bool b8 = ss == ss; // true
+
+ struct st6 {
+ vec3 v;
+ };
+
+ struct st5 {
+ int i;
+ float f;
+ st6 st66;
+ } st55;
+
+ const st5 st551 = st5(2, 4.0, st6(vec3(7)));
+ const st5 st552 = st5(2, 4.0, st6(vec3(7)));
+
+ const bool b10 = st551 == st552; // true
+
+ const bool b11 = st551.st66 == st552.st66; // true
+
+ const st5 st553 = st5(2, 4.0, st6(vec3(8)));
+
+ const bool b12 = st551.st66 == st553.st66; // false
+ const bool b13 = st551 == st553; // false
+
+ const bool b14 = st551 != st552; // false
+ const bool b15 = st551.st66 != st552.st66; // false
+ const bool b16 = st551.st66 != st553.st66; // true
+ const bool b17 = st551 != st553; // true
+
+ const bool b18 = s22.bv4 != b424; // false
+ const bool b19 = i420 != i420; // false
+ const bool b20 = i420 != i445; // true
+ const bool b21 = v420 != v420; // false
+ const bool b22 = m430 != m434; // false
+
+ const int int10 = i420.xy.y; // 8
+
+ //float f = v470.x;
+
+
+
+ const int int13 = -ss.i;
+
+ const vec4 v474 = -vec4(0.5);
+
+ int int14 = ii++;
+ int array[3];
+ array[2];
+
+ const vec4 v478 = v466 * 2.0; // 42, 48, 54, 40
+
+ const vec4 v479 = iiConst > 1 ? v466 : v478; // 21, 24, 27, 20
+
+ const struct st7 {
+ int i;
+ bool b;
+ } st77 = st7(ss.i, true);
+
+ const vec4 v481 = vec4(st77.i);
+
+ const struct st8 {
+ int i;
+ } ;
+
+
+ const struct st9 {
+ s2 ss;
+ } st99 = st9(s22);
+
+ const vec3 v312 = st99.ss.v3; // 9, 10, 11
+ const vec4 v482 = mat4(1)[0]; // 1, 0, 0 , 0
+
+ const mat4 m450 = mat4(ss.i); // mat4(4)
+ const mat4 m451 = mat4(b20); // mat4(1)
+ const mat4 m452 = mat4(st77.b); // mat4(1)
+
+ const vec4 v483 = vec4(vec4(3).x); // 3,3,3,3
+ const mat4 m453 = mat4(vec4(5).x); // mat5(5)
+
+ const vec4 v484 = vec4(mat4(6)[1]); // 0,6,0,0
+ const mat4 m454 = mat4(mat4(6)[1][1]); // mat4(6)
+
+ const vec4 v485 = vec4(st7(8, true).b); // 1,1,1,1
+
+ const vec4 v487 = vec4(vec4(12, 13, 14, 15).ab, 12, 14);
+
+ int i20 = ss.i;
+ const vec4 v489 = -vec4(7,8,9,5); // -7, -8, -9, -5
+
+ gl_Position = vec4(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstruct_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstruct_vert.vert
new file mode 100644
index 000000000..82212df5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstruct_vert.vert
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+struct s {
+ float f;
+} s1 = s(1.0);
+
+struct s3 {
+ int i;
+} s3Inst;
+
+struct s2 {
+ float f;
+ s3 s3Inst;
+} s2Inst = s2(1.0, s3(1));
+
+void main()
+{
+ vec3 i = vec3(5.0, 4.0, ivec2(2.0, 1.0));
+ ivec4 v2 = ivec4(1.0);
+ vec4 v4 = vec4(v2);
+ bvec4 v5 = bvec4(v2);
+ vec3 v6 = vec3(v5);
+ vec3 v = vec3(2, 2.0, 1);
+ vec3 v1 = vec3(1.2, v);
+
+ mat3 m1 = mat3(v,v,v);
+ mat2 m2 = mat2(v, v6.x);
+
+ gl_Position = vec4(1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension10_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension10_V100_frag.frag
new file mode 100644
index 000000000..716291dbb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension10_V100_frag.frag
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#version 100
+#extension extensionfoo : enable // warning extension not supported
+#extension extensionfoo : disable // warning extension not supported
+#extension extensionfoo : warn // warning extension not supported
+
+#extension all : disable // no error in the program
+#extension all : warn // no error in the program
+
+#extension extensionfoo : enable // warning extension not supported
+#extension extensionfoo : disable // warning extension not supported
+#extension extensionfoo : warn // warning extension not supported
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension1_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension1_V100_frag.frag
new file mode 100644
index 000000000..eec6d43fa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension1_V100_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#extension all : disable // no error in the program
+#extension all : warn // no error in the program
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension4_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension4_V100_frag.frag
new file mode 100644
index 000000000..3145ab766
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension4_V100_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#extension extensionfoo : enable // warning extension not supported
+#extension extensionfoo : disable // warning extension not supported
+#extension extensionfoo : warn // warning extension not supported
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFull_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFull_vert.vert
new file mode 100644
index 000000000..0ae877cca
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFull_vert.vert
@@ -0,0 +1,671 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+struct gtf_MaterialParameters
+{
+vec4 emission;
+vec4 ambient;
+vec4 diffuse;
+vec4 specular;
+float shininess;
+};
+struct gtf_LightSourceParameters
+{
+vec4 ambient;
+vec4 diffuse;
+vec4 specular;
+vec4 position;
+vec4 halfVector;
+vec3 spotDirection;
+float spotExponent;
+float spotCutoff;
+float spotCosCutoff;
+float constantAttenuation;
+float linearAttenuation;
+float quadraticAttenuation;
+};
+struct gtf_PointParameters {
+float size;
+float sizeMin;
+float sizeMax;
+float fadeThresholdSize;
+float distanceConstantAttenuation;
+float distanceLinearAttenuation;
+float distanceQuadraticAttenuation;
+};
+struct gtf_DepthRangeParameters {
+float near;
+float far;
+float diff;
+};
+struct gtf_LightModelParameters {
+vec4 ambient;
+};
+struct gtf_LightModelProducts {
+vec4 sceneColor;
+};
+struct gtf_LightProducts {
+vec4 ambient;
+vec4 diffuse;
+vec4 specular;
+};
+struct gtf_FogParameters {
+vec4 color;
+float density;
+float start;
+float end;
+float scale;
+};
+uniform int gtf_MaxFragmentUniformComponents;
+uniform int gtf_MaxVertexUniformComponents;
+uniform int gtf_MaxVertexTextureImageUnits;
+uniform int gtf_MaxLights;
+uniform int gtf_MaxClipPlanes;
+uniform int gtf_MaxCombinedTextureImageUnits;
+uniform int gtf_MaxTextureCoords;
+uniform int gtf_MaxVertexAttribs;
+uniform int gtf_MaxVaryingFloats;
+uniform int gtf_MaxTextureUnits;
+uniform int gtf_MaxDrawBuffers;
+uniform int gtf_MaxTextureImageUnits;
+uniform gtf_LightProducts gtf_FrontLightProduct[8];
+uniform gtf_LightModelProducts gtf_FrontLightModelProduct;
+uniform gtf_DepthRangeParameters gtf_DepthRange;
+uniform gtf_FogParameters gtf_Fog;
+uniform gtf_PointParameters gtf_Point;
+uniform gtf_LightModelParameters gtf_LightModel;
+varying vec4 gtf_FogFragCoord;
+varying vec4 gtf_BackColor;
+varying vec4 gtf_BackSecondaryColor;
+varying vec4 gtf_FrontSecondaryColor;
+varying vec4 gtf_TexCoord[2];
+varying vec4 gtf_FrontColor;
+uniform gtf_MaterialParameters gtf_FrontMaterial;
+uniform gtf_LightSourceParameters gtf_LightSource[8];
+attribute vec4 gtf_MultiTexCoord1;
+attribute vec4 gtf_MultiTexCoord2;
+attribute vec4 gtf_SecondaryColor;
+attribute vec4 gtf_Color;
+attribute vec4 gtf_MultiTexCoord3;
+attribute vec4 gtf_MultiTexCoord0;
+attribute vec4 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_NormalMatrix;
+uniform mat4 gtf_ProjectionMatrix;
+uniform mat4 gtf_TextureMatrix[8];
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+void test_function(const in int in_int, inout int out_int);
+int test_function1(in int in_int1, inout int in_out_int);
+
+uniform float array_float[2];
+
+struct nested
+{
+ int a;
+ float f;
+};
+
+struct light1
+{
+ float intensity;
+ vec3 position;
+ int test_int[2];
+ nested light2;
+} lightVar;
+light1 ll2;
+
+void Assign (out light1 out1, in light1 in1)
+{
+ out1.intensity = in1.intensity;
+ out1.position = in1.position;
+ out1.test_int[0] = in1.test_int[0];
+ out1.test_int[1] = in1.test_int[1];
+ out1.light2 = in1.light2;
+}
+
+struct light3 {
+ float i;
+};
+
+struct light4 {
+ float i;
+};
+
+struct light5 {
+ float i ;
+ float a[2];
+} light5_inst;
+
+uniform light3 uniformLight3;
+
+struct light6 {
+ float i;
+};
+uniform light6 uniformLight6;
+
+struct slight10{
+ float f;
+ };
+struct slight9{
+ slight10 light10;
+ };
+struct slight8{
+ slight9 light9;
+ };
+struct light7 {
+ slight8 light8;
+} ;
+
+
+light3 struct_var = light3(5.0);
+
+// Attribtue variables can only be Global
+attribute float flt_attrib;
+attribute vec2 vec2_attrib;
+attribute vec3 vec3_attrib;
+attribute vec4 vec4_attrib;
+attribute mat2 mat2_attrib;
+attribute mat3 mat3_attrib;
+attribute mat4 mat4_attrib;
+
+uniform float flt_uniform;
+uniform vec3 uniform_vec3;
+uniform mat3 uniform_mat3;
+
+uniform sampler2D samp[3];
+uniform sampler2D samp1;
+
+const struct light12 {
+ int a;
+} uniform_struct = light12(2);
+
+varying vec3 varying_vec3;
+varying vec2 varying_vec2;
+varying vec4 varying_vec4;
+varying mat4 varying_mat4;
+varying mat2 varying_mat2;
+varying mat3 varying_mat3;
+varying float varying_flt;
+
+float frequencies[2];
+
+void test_function2(int func_int)
+{
+}
+
+void test_function3(light3);
+void test_function4(light5 ll20);
+void test_function5(light1);
+light6 test_function6(int a);
+
+const float FloatConst1 = 3.0 * 8.0, floatConst2 = 4.0;
+const bool BoolConst1 = true && true || false;
+const bool BoolConst2 = false || !false && false;
+
+void main(void)
+{
+
+ int test_int1 = 2;
+ const int const_test_int1 = 2;
+
+ struct structMain {
+ float i;
+ } testStruct;
+
+ struct {
+ structMain a;
+ } aStruct;
+
+ testStruct.i = 5.0 ;
+ struct_var.i = 5.0;
+
+ structMain newStruct, newStruct1;
+ testStruct = newStruct;
+ newStruct = newStruct1;
+
+ lightVar.light2.f = 1.1;
+
+ light1 ll1;
+ ll1.light2.a = 1;
+
+ const struct const_struct {
+ float i;
+ } const_struct_inst = const_struct(1.0);
+
+ //ll1 = ll2;
+ Assign (ll1, ll2);
+ ll1.light2 = ll2.light2;
+ ll1.light2 = ll1.light2;
+ ll1.light2.f = ll2.light2.f;
+ ll1.light2.f = ll1.light2.f;
+
+ // lightVar = ll2;
+ // ll2 = lightVar;
+ Assign (lightVar, ll2);
+ Assign (ll2, lightVar);
+
+ light5 ll10;
+
+ light7 ll7[4];
+ structMain newStruct2[2];
+ newStruct2[0].i = 1.1;
+
+ ll7[0].light8.light9.light10.f = 1.1;
+
+
+ bool test_bool4 = false ;
+
+ bool test_bool5 = 1.2 > 3.0 ;
+
+ int test_int2 = 047;
+ int test_int4 = 0xa8; // testing for hexadecimal numbers
+
+ float test_float1 = 1.5;
+ float test_float2 = .01;
+ float test_float3 = 10.;
+ float test_float4 = 10.01;
+ float test_float5 = 23e+2;
+ float test_float6 = 23E-3;
+ float test_float8 = 23E2;
+ bool test_bool6 = BoolConst1 && ! (test_int1 != 0) && ! BoolConst1 && ! (FloatConst1 != 0.0) && (FloatConst1 != 0.0) && (test_float1 != 0.0);
+
+ vec4 color = vec4(0.0, 1.0, 0.0, 1.0);
+ vec4 color2 = vec4(0.0);
+
+ vec3 color4 = vec3(test_float8);
+
+ ivec4 test_int_vect1 = ivec4(1.0,1.0,1.0,1.0);
+ ivec3 test_int_vec3 = ivec3(1, 1, 1) ;
+
+ bvec4 test_bool_vect1 = bvec4(1., 1., 1. , 1. );
+
+ vec2 test_vec2 = vec2(1., 1.);
+ vec2 test_vec3 = vec2(1., 1);
+ vec4 test_vec4 = vec4(test_int_vect1);
+
+ vec2 test_vec5 = vec2(color4);
+ vec3 test_vec7 = vec3(color);
+ vec3 test_vec8 = vec3(test_vec2, test_float4);
+ vec3 test_vec9 = vec3(test_float4, test_vec2);
+
+ vec4 test_vec10 = vec4(test_vec9, 0.01);
+ vec4 test_vec11 = vec4(0.01, test_vec9);
+
+ vec4 test_vec12 = vec4(test_vec2, test_vec2);
+
+ mat2 test_mat2 = mat2(test_float3);
+ mat3 test_mat3 = mat3(test_float3);
+ mat4 test_mat4 = mat4(test_float3);
+
+ mat2 test_mat7 = mat2(test_vec2, test_vec2);
+ mat2 test_mat8 = mat2(01.01, 2.01, 3.01, 4.01);
+
+ mat3 test_mat9 = mat3(test_vec7, test_vec7, test_vec7);
+ mat4 test_mat10 = mat4(test_vec10, test_vec10, test_vec10, test_vec10);
+ test_mat10[1] = test_vec10;
+
+
+ mat2 test_mat12 = mat2(test_vec2, 0.01, 0.01);
+ mat2 test_mat13 = mat2(0.01, 5., test_vec2);
+ mat2 test_mat15 = mat2(0.1, 5., test_vec2 );
+
+ //mat2 test_mat16 = mat2(test_mat9);
+ //mat2 test_mat17 = mat2(test_mat10);
+
+ float freq1[2];
+ float freq2[25];
+
+ for (int i=0; i<100; i++)
+ {
+ if (test_float1 < 1.0)
+ {
+
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ freq2[1] = 1.9 ;
+ const int array_index = 2;
+ freq2[const_test_int1] = 1.9 ;
+ freq2[array_index] = 1.8;
+
+ const int const_int = 5;
+
+ test_float1 = varying_flt;
+
+ int out_int;
+ int intArray[6];
+ test_function(test_int1, test_int1);
+ test_function(test_int1, intArray[2]);
+
+ vec3 vv = vec3(test_function1(test_int1, out_int));
+ bool bool_var = true;
+ int test_int6 = int(bool_var);
+ test_float1 = float(bool_var);
+ test_float1 = float(test_int6);
+ test_int6 = int(test_float1);
+ bool_var = bool(test_int6);
+ bool_var = bool(test_float1);
+ test_float1 = float(test_vec9);
+
+ test_vec2.x = 1.2;
+ test_vec2.y = 1.4;
+ test_vec2.xy;
+
+
+ color.zy = test_vec2;
+
+ test_vec2[1] = 1.1;
+
+ test_mat2[0][0] = 1.1;
+
+ test_float1 += 1.0;
+ test_float1 -= 1.0;
+ test_float1 *= 1.0;
+ test_float1 /= 1.0;
+
+ test_mat12 *= test_mat13 ;
+ test_mat12 *= test_float1;
+ test_vec2 *= test_float1;
+ test_vec2 *= test_mat12;
+ test_float1++;
+ test_float1--;
+ --test_float1;
+ ++test_float1;
+ test_float1;
+ test_int1++;
+ test_int1--;
+
+ test_vec2 = test_vec2 + test_float1;
+ test_vec2 = test_float1 + test_vec2;
+
+ test_mat12 = test_mat12 * test_mat13;
+ test_vec2 = test_vec2 * test_vec5;
+
+ test_vec2++;
+ test_mat2++;
+
+ bool test_bool2 = test_float2 > test_float3;
+
+ bool test_bool3 = test_int1 > test_int6 ;
+
+ test_bool3 = test_vec2 == test_vec5;
+
+ test_bool2 = test_bool3 && test_bool4;
+ test_bool2 = test_bool3 || test_bool4;
+ test_bool2 = test_bool3 ^^ test_bool4;
+
+ test_bool2 = !test_bool3;
+
+ test_bool3 = !(test_int1 > test_int6) ;
+
+ test_float1 = test_int1 > test_int6 ? test_float2 : test_float3;
+ test_vec2 = test_int1 > test_int6 ? test_vec2 : test_vec5;
+ if(test_bool2)
+ test_float1++;
+ else
+ test_float1--;
+
+ if(test_float1 > test_float2)
+ test_float1++;
+
+ if( test_bool2 )
+ {
+ int if_int;
+ test_float1++;
+ }
+
+ if(test_bool2)
+ if(test_bool3)
+ if(test_bool3)
+ test_float1++;
+
+ for(int for_int=0; for_int < 5; for_int++)
+ {
+ // do nothing as such
+ }
+
+
+ for(int x1=0; x1 < 10; x1++)
+ {
+ if (!test_bool2)
+ break;
+
+ int for_int;
+ }
+
+ for(int x2=-10; x2 < 100; x2++)
+ {
+ test_bool2 = (test_float1 > test_float2);
+ if (!test_bool2)
+ break;
+ }
+
+ for(int for_int1 = 0; for_int1 < 100; for_int1++)
+ {
+ if (!test_bool2)
+ break;
+
+ int for_int;
+ }
+
+ for(int for_int1 = 0; for_int1 < 100; for_int1++)
+ {
+ if (!test_bool2)
+ continue;
+
+ int for_int;
+ }
+
+
+ for(int i=0; i<100; i++)
+ {
+ if (!(test_float1 > test_float2))
+ {
+ break;
+ }
+
+ break;
+ continue;
+ }
+
+ for(int i=0; i<100; i++)
+ {
+ if (!test_bool2)
+ break;
+
+ break;
+ }
+
+ for (int i=0; i<100; i++)
+ {
+ int dowhile_int;
+ dowhile_int = 3;
+
+ if (!test_bool2)
+ break;
+ }
+
+ gl_Position = vec4(2.0, 3.0, 1.0, 1.1);
+ gl_Position = gtf_Vertex;
+
+
+ // VERTEX SHADER BUILT-IN ATTRIBUTES
+
+ vec4 builtInV4 = gtf_Color + gtf_SecondaryColor + gtf_Vertex + gtf_MultiTexCoord0 + gtf_MultiTexCoord1 + gtf_MultiTexCoord2 + gtf_MultiTexCoord3;
+
+
+ int builtInI = gtf_MaxLights + gtf_MaxClipPlanes + gtf_MaxTextureUnits + gtf_MaxTextureCoords + gtf_MaxVertexAttribs + gtf_MaxVertexUniformComponents + gtf_MaxVaryingFloats + gtf_MaxVertexTextureImageUnits + gtf_MaxCombinedTextureImageUnits + gtf_MaxTextureImageUnits + gtf_MaxFragmentUniformComponents + gtf_MaxDrawBuffers ;
+
+
+ mat4 builtInM4 = gtf_ModelViewMatrix + gtf_ModelViewProjectionMatrix + gtf_ProjectionMatrix;
+
+ gtf_NormalMatrix;
+
+ gtf_TextureMatrix[gtf_MaxTextureCoords-1];
+ gtf_TextureMatrix;
+
+ gtf_DepthRange.near ;
+
+ test_float1 = gtf_DepthRange.near;
+ test_float1 = gtf_DepthRange.far;
+ test_float1 = gtf_DepthRange.diff;
+
+ gtf_Point.size;
+ gtf_Point.sizeMin;
+ gtf_Point.sizeMax;
+ gtf_Point.fadeThresholdSize ;
+ gtf_Point.distanceConstantAttenuation;
+ gtf_Point.distanceLinearAttenuation ;
+ gtf_Point.distanceQuadraticAttenuation;
+
+ gtf_MaterialParameters test;
+ gtf_FrontMaterial.emission;
+
+ color = gtf_FrontMaterial.emission;
+ color = gtf_FrontMaterial.ambient;
+ color = gtf_FrontMaterial.diffuse;
+ color = gtf_FrontMaterial.specular;
+ test_float1 = gtf_FrontMaterial.shininess;
+
+ gtf_LightSourceParameters lightSource;
+
+ float builtInFloat1 = gtf_LightSource[0].spotExponent;
+ color = gtf_LightSource[0].ambient;
+ color = lightSource.ambient;
+ color = lightSource.diffuse;
+ color = lightSource.specular;
+ color = lightSource.position;
+ color = lightSource.halfVector;
+ color4 = lightSource.spotDirection;
+ test_float1 = lightSource.spotExponent;
+ test_float1 = lightSource.spotCutoff;
+ test_float1 = lightSource.spotCosCutoff;
+ test_float1 = lightSource.constantAttenuation;
+ test_float1 = lightSource.linearAttenuation;
+ test_float1 = lightSource.quadraticAttenuation;
+
+ color = gtf_LightModel.ambient;
+
+ gtf_LightModelParameters lightModel;
+ color = gtf_LightModel.ambient;
+ color = lightModel.ambient;
+
+ color = gtf_FrontLightModelProduct.sceneColor ;
+
+ gtf_LightModelProducts lightModelProd;
+
+ color = lightModelProd.sceneColor;
+ color = gtf_FrontLightModelProduct.sceneColor;
+
+ color = gtf_FrontLightProduct[0].ambient;
+ color = gtf_FrontLightProduct[0].ambient;
+ gtf_LightProducts lightProd;
+
+ color = lightProd.ambient;
+ color = lightProd.diffuse;
+ color = lightProd.specular;
+
+
+ test_float1 = gtf_Fog.density ;
+ test_float1 = gtf_Fog.start ;
+ test_float1 = gtf_Fog.end ;
+ test_float1 = gtf_Fog.scale ;
+ color = gtf_Fog.color ;
+
+ gtf_FrontColor = vec4(1.0, 1.0, 1.0, 1.0);
+ gtf_BackColor = vec4(1.0, 1.0, 1.0, 1.0);
+ gtf_FrontSecondaryColor = vec4(1.0, 1.0, 1.0, 1.0);
+ gtf_BackSecondaryColor = vec4(1.0, 1.0, 1.0, 1.0);
+
+
+ // VARYING VARIABLES AVAILABLE IN FRAGMENT AND VERTEX SHADERS BOTH
+ gtf_TexCoord[0] = vec4(1.0, 1.0, 1.0, 1.0);
+ gtf_FogFragCoord = vec4(1.0, 1.0, 1.0, 1.0);
+
+}
+
+void test_function(const in int in_int, inout int out_int)
+{
+ out_int = 5;
+ int i = 5;
+ return ;
+}
+
+int test_function1(in int in_int1, inout int in_out_int)
+{
+ float ff;
+ in_int1 = 5;
+ return in_int1;
+}
+
+void test_function3(light3 ll)
+{
+ ll.i = 5.0;
+ varying_flt = 1.2;
+}
+
+void test_function4(light5 ll20)
+{
+ ll20.i = 10.0;
+}
+
+void test_function5(light1 struct_light1)
+{
+ struct_light1.light2.a = 1;
+ light5 ll5;
+ struct_light1.light2.f = ll5.i;
+ struct_light1.light2.f++;
+ struct_light1.light2.a++;
+}
+
+light6 test_function6(int a)
+{
+ int x;
+ light6 funcStruct;
+ light7 funcStruct1;
+ -x;
+ x = x - x ;
+ mat2 m;
+ m++;
+ -m;
+ (m)++;
+ return funcStruct;
+}
+
+float test_function7(light1 ll1, int light1 )
+{
+ float f;
+
+ struct ss1 {
+ int a;
+ };
+
+ return float(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFuncOverload_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFuncOverload_frag.frag
new file mode 100644
index 000000000..4bd543b62
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFuncOverload_frag.frag
@@ -0,0 +1,44 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void testVoid (vec4 v, vec4 v1)
+{
+}
+
+void testVoid (ivec4 v, ivec4 v1)
+{
+}
+
+void main(void)
+{
+ vec4 v;
+ ivec4 i;
+ testVoid(i, i);
+ testVoid(v, v);
+ gl_FragColor = v;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFuncOverload_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFuncOverload_vert.vert
new file mode 100644
index 000000000..bd798e61a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFuncOverload_vert.vert
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+struct S2
+{
+ float f;
+};
+
+struct S1
+{
+ float f;
+ S2 s2;
+};
+
+float process(S1 s1);
+float process(S2 s2);
+
+void main()
+{
+ S1 s1 = S1(1.0, S2(1.0));
+ gl_Position = vec4(process(s1));
+}
+
+float process(S1 s1)
+{
+ return s1.f + process(s1.s2);
+}
+
+float process(S2 s2)
+{
+ return s2.f;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFunction1_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFunction1_vert.vert
new file mode 100644
index 000000000..c95136ab4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFunction1_vert.vert
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+vec3 bar(vec3, vec3);
+
+uniform vec2 v;
+
+bool foo(out vec3);
+
+void main()
+{
+ bool b1, b2, b3, b4, b5, b6;
+
+ b1 = any(lessThan(v, v));
+
+ b2 = all(lessThanEqual(v, v));
+
+ b3 = any(not(greaterThan(v, v)));
+
+ b4 = any(greaterThanEqual(v, v));
+
+ b5 = any(notEqual(v, v));
+
+ b6 = any(equal(v, v));
+
+ vec2 u;
+ if (b1 && b2 && b3 && b4 && b5 && b6)
+ u = v;
+
+ gl_Position = vec4(u, u);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectModule_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectModule_frag.frag
new file mode 100644
index 000000000..9d9043446
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectModule_frag.frag
@@ -0,0 +1,81 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+vec4 test_function4(float);
+vec4 test_function1(float);
+vec4 test_function2(float);
+vec4 test_function3(float);
+float f = 2.6;
+
+
+vec4 test_function1(float ff)
+{
+ vec4 func_vec4 = vec4(ff+f);
+ return func_vec4;
+}
+
+float f1 = 1.5;
+
+vec4 test_function4(float ff)
+{
+ vec4 func_vec4 = vec4(f1);
+ return func_vec4;
+}
+
+float f2 = 3.5;
+
+void main()
+{
+ vec4 v1 = test_function4(f2);
+ vec4 v2 = test_function1(f2);
+ vec4 v3 = test_function2(f2);
+ vec4 v4 = test_function3(f2);
+
+ if (f1 > f2) {
+ gl_FragColor = v1 + v2 + v3 + v4;
+ } else
+ gl_FragColor = v1 + v2 + v3 + v4;
+}
+
+float f4 = 5.5;
+vec4 test_function3(float ff)
+{
+ if (ff > f4)
+ return vec4(ff);
+ else
+ return vec4(f4);
+}
+
+float f3 = 4.5;
+vec4 test_function2(float ff)
+{
+ vec4 func_vec4 = vec4(ff+f3);
+ return func_vec4;
+}
+
+float f5 = 6.5;
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse1_frag.frag
new file mode 100644
index 000000000..df3baa5ca
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse1_frag.frag
@@ -0,0 +1,68 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform vec3 a[8];
+
+uniform bool ub;
+varying mat4 vm;
+
+int foo(float);
+
+float bar(int i)
+{
+ return float(i);
+}
+
+void main (void)
+{
+ const int x = 3;
+ mat4 a[4];
+ vec4 v;
+
+ for (float f = 0.0; f != 3.0; ++f)
+ {
+ }
+
+ vec3 v3[x + x];
+
+ int vi = foo(2.3);
+
+ vec3 v3_1 = v3[x];
+
+ float f1 = a[x][2].z * float(x);
+ f1 = a[x][2][2] * float(x);
+ f1 = v[2] * v[1];
+
+ const int ci = 2;
+
+}
+
+int foo(float f)
+{
+ return 2;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse2_frag.frag
new file mode 100644
index 000000000..b87048be4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse2_frag.frag
@@ -0,0 +1,153 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+const float FloatConst1 = 3.0 * 8.0, floatConst2 = 4.0;
+const bool BoolConst1 = true && true || false;
+const bool BoolConst2 = false || !false && false;
+
+void main (void)
+{
+ float float1 = 4.0, float2 = floatConst2;
+ int int_1 = int(FloatConst1);
+ vec4 vec4_1;
+ vec3 vec3_1;
+// unsigned int unsigned_int_1;
+ bool bool4, bool5;
+
+ bool4 = bool5;
+ //float1 = bool5;
+ //bool5 = float1;
+
+ bool4 = 4.0 > 5.0;
+ bool4 = !(3.2 != 0.0);
+ bool4 = bool(float1);
+ bool4 = bool(int_1);
+ float1 = float(bool4);
+ float1 = float(int_1);
+ int_1 = int(float1);
+ int_1 = int(bool4);
+
+ {
+ int a, b, c;
+
+ a = b;
+ b = c;
+ {
+ int b, c, d;
+
+ b = c;
+ c = d;
+ {
+ int a, d, e;
+
+ a = d;
+ d = e;
+ }
+ {
+ int a, b, c;
+ a = b;
+ b = c;
+ }
+ }
+ a = b;
+ b = c;
+ }
+
+ {
+ float f1, f2;
+ vec3 v31, v32;
+
+ max(f1, f2);
+ max(v31, v32);
+
+ vec4 v4 = vec4(3.0);
+ vec3 v3 = -vec3(2.0, 1.0, 3.0);
+ mat2 m2 = mat2(3.0, 4.0, 6.0, 3.0);
+ //mat4 m4 = mat4(1.0, m2, v3, v4, m2);
+ }
+
+ if (BoolConst1)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (BoolConst2)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (BoolConst1 || BoolConst2)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (BoolConst2 && BoolConst1)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (FloatConst1 != 0.0)
+ --int_1;
+ else
+ ++int_1;
+
+ if (0 != 0)
+ ++int_1;
+ else
+ --int_1;
+
+ bool4 = BoolConst1 && ! (int_1 != 0) && ! BoolConst1 && ! (FloatConst1 != 0.0) && (FloatConst1 != 0.0) && (float1 != 0.0);
+
+ float1 = 5 != 0 ? float1 : float(int_1);
+ float1 = 0 != 0 ? float1 : float(int_1);
+
+ if (float1 != float1)
+ ++int_1;
+ else
+ --int_1;
+
+ float1 = float1 != float1 ? float1 : float(int_1);
+
+ --int_1;
+ ++float1;
+ (vec4_1.x)--;
+ vec3_1++;
+
+ if (int_1 != 4)
+ discard;
+
+ float1 = 4.0 + 6.0;
+ int ii,jj,kk;
+ float ff;
+ ii = jj, kk, ff;
+
+ vec4_1 = vec4_1 + 2.0;
+ ivec4 iv;
+ iv = iv + 2;
+ gl_FragColor = vec4(float1+float1, float1, float1, float(int_1));
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse2_vert.vert
new file mode 100644
index 000000000..4309de92b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse2_vert.vert
@@ -0,0 +1,166 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+const float FloatConst1 = 3.0 * 8.0, floatConst2 = 4.0;
+const bool BoolConst1 = true && true || false;
+const bool BoolConst2 = false || !false && false;
+
+void main (void)
+{
+ float float1 = 4.0, float2 = floatConst2;
+ int int_1 = int(FloatConst1);
+ vec4 vec4_1;
+ vec3 vec3_1 = vec3(1, 1, 1);
+ vec3 vec3_2 = vec3(0, 0, 0);
+// unsigned int unsigned_int_1;
+ bool bool4, bool5;
+
+ bool4 = bool5;
+ //float1 = bool5;
+ //bool5 = float1;
+
+ bool4 = 4 > 5;
+ bool4 = !(3.2 != 0.0);
+ bool4 = bool(float1);
+ bool4 = bool(int_1);
+ float1 = float(bool4);
+ float1 = float(int_1);
+ int_1 = int(float1);
+ int_1 = int(bool4);
+
+ {
+ int a, b, c;
+
+ a = b;
+ b = c;
+ {
+ int b, c, d;
+
+ b = c;
+ c = d;
+ {
+ int a, d, e;
+
+ a = d;
+ d = e;
+ }
+ {
+ int a, b, c;
+ a = b;
+ b = c;
+ }
+ }
+ a = b;
+ b = c;
+ }
+
+ {
+ float f1, f2;
+ vec3 v31, v32;
+
+ max(f1, f2);
+ max(v31, v32);
+
+ vec4 v4 = vec4(3.0);
+ vec3 v3 = -vec3(2.0, 1.0, 3.0);
+ mat2 m2 = mat2(3.0, 4.0, 6.0, 3.0);
+ //mat4 m4 = mat4(1.0, m2, v3, v4, m2);
+ }
+
+ if (BoolConst1)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (BoolConst2)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (BoolConst1 || BoolConst2)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (BoolConst2 && BoolConst1)
+ ++vec3_1;
+ else
+ --vec3_1;
+
+ if (FloatConst1 != 0.0)
+ --int_1;
+ else
+ ++int_1;
+
+ if (0 != 0)
+ ++int_1;
+ else
+ --int_1;
+
+ bool4 = BoolConst1 && ! (int_1 != 0) && ! BoolConst1 && ! (FloatConst1 != 0.0) && (FloatConst1 != 0.0) && (float1 != 0.0);
+
+ float1 = 5 != 0 ? float1 : float(int_1);
+ float1 = BoolConst1 ? float1 : float(int_1);
+
+ if (float1 != float1)
+ ++int_1;
+ else
+ --int_1;
+
+ float1 = float1 != float1 ? float1 : float(int_1);
+
+ --int_1;
+ ++float1;
+ (vec4_1.x)--;
+ vec3_1++;
+
+ if (vec3_1.x > vec3_2.x)
+ float1 = 4.0 + 6.0;
+
+ if (bool4 ^^ bool5)
+ float1 *= 2.4;
+
+ if (false ^^ false)
+ float1 *= 2.5;
+
+ if (true ^^ false)
+ float1 *= 2.6;
+
+ {
+ int i;
+ }
+
+ if (bool4) {
+ int i;
+ } else {
+ int i;
+ i = 5;
+ }
+
+ mat4 m1;
+ m1[2][1] = 4.0;
+
+ gl_Position = vec4(float1+float1, float1, float1, float(int_1));
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParseTest1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParseTest1_frag.frag
new file mode 100644
index 000000000..4af1b0641
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParseTest1_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct s {
+ vec4 v;
+} s2;
+
+void main()
+{
+ s s1 = s(vec4(ivec4(4.0, vec2(5,6), 7.0)));
+ vec4 v = vec4(2,ivec2(3.0, 4.0), 5.0);
+ vec4 v4 = vec4(ivec4(8.0));
+
+ gl_FragColor = v4 + v + s1.v;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParseTest_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParseTest_frag.frag
new file mode 100644
index 000000000..b126aba5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParseTest_frag.frag
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct s{
+ float f;
+ vec3 v;
+} s1 ;
+void main()
+{
+ vec4 v = vec4(float(vec2(1,2)), 5,6,7); // 1, 5, 6, 7
+ vec4 v1 = vec4(3, vec2(ivec2(1,2)), 4); // 3, 1, 2, 4
+ vec4 v2 = vec4(8, 9, vec4(ivec4(1,2,3,4))); // 8,9, 1,2
+ vec2 v3 = vec2(v2); // 8,9
+ vec4 v4 = vec4(v3, v2.z, v2.w); // 8,9,1,2
+
+ const vec4 v5 = vec4(2.0, s(2.0, vec3(3,4,5)).v); // 2,3,4,5
+ gl_FragColor = v5 + v + v1 + v4 ; // 14, 18, 13, 18
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess5_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess5_frag.frag
new file mode 100644
index 000000000..ba401b982
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess5_frag.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+//mutiple line macros - test case.
+
+#define test 5
+#define t1 1
+#define t2 2
+#define token (t1+t2)
+#define test1 int sum =1; sum = test; sum = test+test;
+
+#define test2 { test1 sum = sum +token; sum = t2*t1; }
+
+void main(void)
+{
+ int test3=1;
+ test1
+ test2;
+ test3 = test;
+ sum = test3;
+}
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess8_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess8_frag.frag
new file mode 100644
index 000000000..90dc01a2a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess8_frag.frag
@@ -0,0 +1,132 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+// Extensive testing on #if #else #elif #ifdef, #ifndef and #endif.
+
+
+#define t1 1
+
+#if(t1==1)
+ #define t2 2
+#endif
+
+#if (t2!=2)
+ #define t3 33
+#else
+ #define t3 3
+#endif
+
+#if (t3!=3)
+ #define t4 4
+#elif (t3==3)
+ #define t4 44
+#else
+ #define t4 0
+#endif
+
+#if defined(t5)
+ #define t6 6
+#elif (t3!=3)
+ #define t5 5
+#elif (t3==3)
+ #define t5 5
+#endif
+
+#ifdef t5
+ #define t6 6
+#else
+ #define t7 7
+#endif
+
+#ifndef t8
+ #define t8 8
+#endif
+
+#if defined t8
+ #define t9
+ #ifdef t9
+ #define t10 10
+ #endif
+#elif
+ #define t11 11
+#endif
+
+#ifndef t8
+ #define t12 12
+#else
+ #define t12 12
+ #ifndef t13
+ #define t13 13
+ #endif
+ #ifdef t14
+ #define t15 15
+ #else
+ #if defined t8
+ #define t16 16
+ #endif
+ #endif
+#endif
+
+#ifdef t1
+ #ifdef t10
+ #if defined t8
+ #if defined(t3)
+ #ifndef t20
+ #define t25 25
+ #endif
+ #else
+ #define t15 15
+ #define t24 24
+ #endif
+ #endif
+ #endif
+#else
+ #ifdef t21
+ #define t22 22
+ #else
+ #define t23 23
+ #endif
+#endif
+#define t7 7
+#define t11 11
+#define t14 14
+#define t15 15
+#define t20 20
+#define t22 22
+#define t23 23
+#define t24 42
+
+void main(void)
+{
+ int sum =0;
+ sum = t1+t2+t3+t4+t5;
+ sum = t6+t7+t8+t9+t10;
+ sum = t11+t12+t13+t14+t15;
+ sum = t16+t20+t22+t23+t25+t24;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess9_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess9_frag.frag
new file mode 100644
index 000000000..6ffb88377
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess9_frag.frag
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+#define t1 2.3333333333333333
+#define t2 (0.978293600-1.0)
+#define t3 .9090909090
+#define t4 26578235.000000083487
+#define t5 78e-03
+#define t6 78.100005E+05
+#define t7 6278.78e-5
+
+void main(void){
+ float tes=2e-3;
+ float test=3.2e-5;
+ float test1=0.99995500;
+ float test2=6789.983;
+
+ test = t1+t2;
+ test = t3-t4;
+ tes = t5 * t6;
+ test2 = t7;
+
+ gl_FragColor = vec4(test, tes, test1, test2);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle1_frag.frag
new file mode 100644
index 000000000..8f367ae98
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle1_frag.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec2 v = vec2(1,5);
+ // at the end of next statement, values in
+ // v.x = 12, v.y = 12
+ v.xy += v.yx += v.xy;
+ // v1 and v2, both are initialized with 12
+ vec2 v1 = v, v2 = v;
+
+ v1.xy += v2.yx += ++(v.xy); // v1 = 37, v2 = 25 each
+ v1.xy += v2.yx += (v.xy)++; // v1 = 75, v2 = 38 each
+ gl_FragColor = vec4(v1,v2); // 75, 75, 38, 38
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle1_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle1_vert.vert
new file mode 100644
index 000000000..8875d94e4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle1_vert.vert
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Normal;
+uniform mat4 gtf_NormalMatrix;
+void main(void)
+{
+ vec4 v = vec4(1,2,3,4);
+ vec3 v3 = vec3(5,6,7);
+ vec4 v4 = vec4(normalize(v3.yzy).xyz.zyx, 1.0);
+ gl_Position = v4 + vec4(normalize(gtf_NormalMatrix * gtf_Normal).xyz.zyx, v4.y);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle2_frag.frag
new file mode 100644
index 000000000..9c20ec836
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle2_frag.frag
@@ -0,0 +1,56 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f, f1, f2;
+ f = f1 = f2;
+ f += f1 += f2;
+
+ vec4 v, v1, v2;
+ v = v1 = v2;
+ v += v1 += v2;
+ v.wx = v1.zx = v2.yx;
+ v.wx += v1.zx += v2.yx;
+
+ mat4 m, m1, m2;
+ m = m1 = m2;
+ m += m1 += m2;
+ m[3].wx = m1[2].zx = m2[1].yx;
+ m[3].wx += m1[2].zx += m2[1].yx;
+
+ mat4 am[4], am1[4], am2[4];
+ am[3] = am1[2] = am2[1];
+ am[3] += am1[2] += am2[1];
+ am[3][3].wx = am1[2][2].zx = am2[1][1].yx;
+ am[3][3].wx += am1[2][2].zx += am2[1][1].yx;
+ am[3][3].wx += am1[2][2].zx += ++(am2[1][1].yx);
+ am[3][3].wx += am1[2][2].zx += (am2[1][1].yx)++;
+
+ gl_FragColor = vec4(am[3][3].z, m[3].w, v.w, f);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle2_vert.vert
new file mode 100644
index 000000000..c28627995
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle2_vert.vert
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+ vec4 v1 = vec4(5,6,7,8);
+ vec4 v2 = vec4(9,10, 11, 12);
+ vec3 v3 = (v1 * v2).ywx;
+ float f = (v2 * v1).z;
+ vec3 v4 = normalize((v1.ywx * v3).xyz).xyz;
+ gl_Position = vec4(v4, f);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle3_frag.frag
new file mode 100644
index 000000000..e1cc59e76
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle3_frag.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec4 v = vec4(5,6,7,8);
+ // value changes for lhs
+ // 8765, 6758, 857, 75 i.e. replace v.zx
+ // value changes for rhs
+ // 8765, 6758, 86 i.e replace with v.wy
+ // replace v.z with v.w
+ // replace v.x with v.y
+ // add 1.000000 to v.w and v.y
+ v.wzyx.zywx.wzy.zy = (v.wzyx.zywx.wx)++;
+ gl_FragColor = vec4(v); // 6,7,8,9
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectVersion_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectVersion_V100_frag.frag
new file mode 100644
index 000000000..e125af65e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectVersion_V100_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#version 100
+#ifdef GL_ES
+precision mediump float;
+#endif
+/* #version can only be followed by number 100. The only statements before
+ #version can be comment or white spaces */
+
+void main()
+{
+ gl_FragColor = vec4(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/DuplicateVersion1_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/DuplicateVersion1_V100_frag.frag
new file mode 100644
index 000000000..6ef4b1bbf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/DuplicateVersion1_V100_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#version 100
+#version 100
+#ifdef GL_ES
+precision mediump float;
+#endif
+/* Two version statements are not allowed since any #version must be the first non-whitespace, non-comment */
+
+void main()
+{
+ gl_FragColor = vec4(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/FunctionParam_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/FunctionParam_vert.vert
new file mode 100644
index 000000000..f8df4570b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/FunctionParam_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+int y = 1;
+
+int foo(int, int b[y]) // array size should be constant
+{
+ return 1;
+}
+
+void main()
+{
+ int a[1];
+
+ gl_Position = vec4(1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Include_Preprocessor_Directive_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Include_Preprocessor_Directive_frag.frag
new file mode 100644
index 000000000..745cc458b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Include_Preprocessor_Directive_frag.frag
@@ -0,0 +1,29 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+#include "GL/build/NVIDIA_Test_Include_frag.frag"
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Low_Level_Assembly_Reserved_Words_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Low_Level_Assembly_Reserved_Words_frag.frag
new file mode 100644
index 000000000..f42a80aa1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Low_Level_Assembly_Reserved_Words_frag.frag
@@ -0,0 +1,44 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float MIN;
+uniform float R0;
+uniform float FOGC;
+uniform float CUBE;
+uniform float f;
+uniform float o;
+uniform float p;
+uniform float w;
+uniform float x;
+uniform float y;
+uniform float z;
+
+void main()
+{
+ gl_FragColor = vec4(f, o, p, w);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Main_Parameters_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Main_Parameters_vert.vert
new file mode 100644
index 000000000..13b97a22e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Main_Parameters_vert.vert
@@ -0,0 +1,29 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main(vec4 position : POSITION)
+{
+ gl_Position = position;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/ParseTest3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/ParseTest3_frag.frag
new file mode 100644
index 000000000..f1f7004ef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/ParseTest3_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ const vec4 v = vec4(normalize(vec4(1))); // Builtin functions are constant expressions if all their parameters are constant expressions - code ok
+ const vec4 v1 = vec4(clamp(1.0, .20, 3.0)); // Builtin functions are constant expressions if all their parameters are constant expressions - code ok
+ float f = 1.0;
+ const vec4 v2 = vec4(float(vec4(1,2,3,f))); // f is not constant - code fails and test does not compile (expected)
+
+ gl_FragColor = v + v1 + v2;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/ParseTest4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/ParseTest4_frag.frag
new file mode 100644
index 000000000..add162fe3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/ParseTest4_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ const vec4 v = vec2(2.0, 3.0);
+ gl_FragColor = v;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Permissive_Constant_Conversions_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Permissive_Constant_Conversions_frag.frag
new file mode 100644
index 000000000..3fbbf1c5d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Permissive_Constant_Conversions_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f = 2; // Should be 2.0
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Permissive_Scalar_Vector_Expressions_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Permissive_Scalar_Vector_Expressions_frag.frag
new file mode 100644
index 000000000..df1232cd5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Permissive_Scalar_Vector_Expressions_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec2 v = vec2(1.0, 2.0);
+ v *= 2.0; // Legal in GLSL.
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/TernaryOp_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/TernaryOp_frag.frag
new file mode 100644
index 000000000..5aa6c71bb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/TernaryOp_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ mat4 m;
+ vec4 v;
+ bool b;
+ gl_FragColor = b ? v : m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Texture_Rectangle_Samplers_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Texture_Rectangle_Samplers_frag.frag
new file mode 100644
index 000000000..863c2ed77
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Texture_Rectangle_Samplers_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2DRect samp;
+
+void main()
+{
+ gl_FragColor = texture2DRect(samp, vec2(0.0, 0.0));
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array10_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array10_frag.frag
new file mode 100644
index 000000000..62a2ce332
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array10_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+void main()
+{
+ float f[];
+ float flt = f[5];
+ float f[3]; // higher array index has already been used
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array11_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array11_frag.frag
new file mode 100644
index 000000000..8ba8323b4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array11_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f[];
+ int f[4]; // array redeclared with a different type
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array1_frag.frag
new file mode 100644
index 000000000..aff04d3ec
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array1_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int array[2][2]; // two dimentional arrays are not allowed
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array2_frag.frag
new file mode 100644
index 000000000..c3fc0d619
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array2_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ const int array[2]; // cannot declare const arrays
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array3_frag.frag
new file mode 100644
index 000000000..aae911fab
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array3_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int array1[2], array2[2];
+ bool b = array1 == array2; // equality operator does not work on arrays but works on array elements
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array4_frag.frag
new file mode 100644
index 000000000..2f7baf1d8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array4_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f[-2]; // cannot declare arrays with negative size
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array5_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array5_frag.frag
new file mode 100644
index 000000000..36957dc40
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array5_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int i = 3;
+ float f[i]; // arrays should be declared with a constant size
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array6_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array6_frag.frag
new file mode 100644
index 000000000..109d7ad89
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array6_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ const float index = 3.0;
+ float f[index]; // arrays should be declared with an integer expression not float
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array7_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array7_frag.frag
new file mode 100644
index 000000000..6e7dea3de
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array7_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f[5];
+ f[]; // array used without a size
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array8_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array8_frag.frag
new file mode 100644
index 000000000..2fd8795ed
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array8_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f[5];
+ float f[]; // redeclaration of array already declared with a size
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array9_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array9_frag.frag
new file mode 100644
index 000000000..5a11791a1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array9_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec2 array[2];
+ array.xy; // arrays cannot directly be swizzled, however, an element of array can be swizzled
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute1_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute1_vert.vert
new file mode 100644
index 000000000..2726899e8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute1_vert.vert
@@ -0,0 +1,31 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute int i; // attributes cannot be int or bool
+
+void main()
+{
+ gl_Position = vec4(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute2_vert.vert
new file mode 100644
index 000000000..f5bd8860d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute2_vert.vert
@@ -0,0 +1,31 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute float f[2]; // attributes cannot be arrays
+
+void main()
+{
+ gl_Position = vec4(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute_frag.frag
new file mode 100644
index 000000000..af78ed7f0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ attribute float foo; // attributes can be declared at global scope in vertex shader only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute_vert.vert
new file mode 100644
index 000000000..1c35aea82
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute_vert.vert
@@ -0,0 +1,29 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+ attribute float foo; // attributes can be declared at a global scope only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/break_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/break_frag.frag
new file mode 100644
index 000000000..bb50e2aa5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/break_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ break; // break keyword allowed only inside the loops
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html
new file mode 100644
index 000000000..f2fb266c0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectBuiltInOveride_frag.frag"
+ },
+ "name": "CorrectBuiltInOveride_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectComma_frag.frag"
+ },
+ "name": "CorrectComma_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "CorrectConstFolding1_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "CorrectConstFolding1_vert.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "CorrectConstFolding2_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "CorrectConstFolding2_vert.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "CorrectConstruct_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "CorrectConstruct_vert.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectExtension10_V100_frag.frag"
+ },
+ "name": "CorrectExtension10_V100_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectExtension1_V100_frag.frag"
+ },
+ "name": "CorrectExtension1_V100_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectExtension4_V100_frag.frag"
+ },
+ "name": "CorrectExtension4_V100_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html
new file mode 100644
index 000000000..2c6077e0d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_009_to_016.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "CorrectFull_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "CorrectFull_vert.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectFuncOverload_frag.frag"
+ },
+ "name": "CorrectFuncOverload_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "CorrectFuncOverload_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "CorrectFuncOverload_vert.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "CorrectFunction1_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "CorrectFunction1_vert.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectModule_frag.frag"
+ },
+ "name": "CorrectModule_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectParse1_frag.frag"
+ },
+ "name": "CorrectParse1_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectParse2_frag.frag"
+ },
+ "name": "CorrectParse2_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "CorrectParse2_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "CorrectParse2_vert.test.html",
+ "linkstat": true,
+ "compstat": true
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_017_to_024.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_017_to_024.html
new file mode 100644
index 000000000..c3b5a09b3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_017_to_024.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_017_to_024.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectParseTest1_frag.frag"
+ },
+ "name": "CorrectParseTest1_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectParseTest_frag.frag"
+ },
+ "name": "CorrectParseTest_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectPreprocess5_frag.frag"
+ },
+ "name": "CorrectPreprocess5_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectPreprocess8_frag.frag"
+ },
+ "name": "CorrectPreprocess8_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectPreprocess9_frag.frag"
+ },
+ "name": "CorrectPreprocess9_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectSwizzle1_frag.frag"
+ },
+ "name": "CorrectSwizzle1_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "CorrectSwizzle1_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "CorrectSwizzle1_vert.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectSwizzle2_frag.frag"
+ },
+ "name": "CorrectSwizzle2_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_025_to_032.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_025_to_032.html
new file mode 100644
index 000000000..efd881a5d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_025_to_032.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_025_to_032.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "CorrectSwizzle2_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "CorrectSwizzle2_vert.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectSwizzle3_frag.frag"
+ },
+ "name": "CorrectSwizzle3_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "DuplicateVersion1_V100_frag.frag"
+ },
+ "name": "DuplicateVersion1_V100_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "CorrectVersion_V100_frag.frag"
+ },
+ "name": "CorrectVersion_V100_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "FunctionParam_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "FunctionParam_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ParseTest3_frag.frag"
+ },
+ "name": "ParseTest3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ParseTest4_frag.frag"
+ },
+ "name": "ParseTest4_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array10_frag.frag"
+ },
+ "name": "array10_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_033_to_040.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_033_to_040.html
new file mode 100644
index 000000000..c578f0f71
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_033_to_040.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_033_to_040.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array11_frag.frag"
+ },
+ "name": "array11_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array1_frag.frag"
+ },
+ "name": "array1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array2_frag.frag"
+ },
+ "name": "array2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array3_frag.frag"
+ },
+ "name": "array3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array4_frag.frag"
+ },
+ "name": "array4_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array5_frag.frag"
+ },
+ "name": "array5_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array6_frag.frag"
+ },
+ "name": "array6_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array7_frag.frag"
+ },
+ "name": "array7_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_041_to_048.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_041_to_048.html
new file mode 100644
index 000000000..dba2e3e04
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_041_to_048.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_041_to_048.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array8_frag.frag"
+ },
+ "name": "array8_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array9_frag.frag"
+ },
+ "name": "array9_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "attribute1_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "attribute1_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "attribute2_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "attribute2_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "attribute_frag.frag"
+ },
+ "name": "attribute_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "attribute_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "attribute_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "break_frag.frag"
+ },
+ "name": "break_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "comma1_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "comma1_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_049_to_056.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_049_to_056.html
new file mode 100644
index 000000000..0c46a779f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_049_to_056.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_049_to_056.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "comma2_frag.frag"
+ },
+ "name": "comma2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "comma2_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "comma2_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "comma3_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "comma3_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "comment_frag.frag"
+ },
+ "name": "comment_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "conditional1_frag.frag"
+ },
+ "name": "conditional1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "conditional2_frag.frag"
+ },
+ "name": "conditional2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "conditional3_frag.frag"
+ },
+ "name": "conditional3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "constFunc_frag.frag"
+ },
+ "name": "constFunc_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_057_to_064.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_057_to_064.html
new file mode 100644
index 000000000..9600b32e9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_057_to_064.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_057_to_064.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "constructor1_frag.frag"
+ },
+ "name": "constructor1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "constructor2_frag.frag"
+ },
+ "name": "constructor2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "constructor3_V100_frag.frag"
+ },
+ "name": "constructor3_V100_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "continue_frag.frag"
+ },
+ "name": "continue_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType10_frag.frag"
+ },
+ "name": "dataType10_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType11_frag.frag"
+ },
+ "name": "dataType11_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType12_frag.frag"
+ },
+ "name": "dataType12_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType13_frag.frag"
+ },
+ "name": "dataType13_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_065_to_072.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_065_to_072.html
new file mode 100644
index 000000000..5224b2d0a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_065_to_072.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_065_to_072.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType19_frag.frag"
+ },
+ "name": "dataType19_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType1_frag.frag"
+ },
+ "name": "dataType1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType2_frag.frag"
+ },
+ "name": "dataType2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType3_frag.frag"
+ },
+ "name": "dataType3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType4_frag.frag"
+ },
+ "name": "dataType4_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType5_frag.frag"
+ },
+ "name": "dataType5_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType6_frag.frag"
+ },
+ "name": "dataType6_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType7_frag.frag"
+ },
+ "name": "dataType7_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_073_to_080.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_073_to_080.html
new file mode 100644
index 000000000..968b662d2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_073_to_080.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_073_to_080.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType8_frag.frag"
+ },
+ "name": "dataType8_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dataType9_frag.frag"
+ },
+ "name": "dataType9_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dowhile_frag.frag"
+ },
+ "name": "dowhile_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dvec2_frag.frag"
+ },
+ "name": "dvec2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dvec3_frag.frag"
+ },
+ "name": "dvec3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dvec4_frag.frag"
+ },
+ "name": "dvec4_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "extension2_V100_frag.frag"
+ },
+ "name": "extension2_V100_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "extension3_V100_frag.frag"
+ },
+ "name": "extension3_V100_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_081_to_088.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_081_to_088.html
new file mode 100644
index 000000000..70b94d6df
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_081_to_088.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_081_to_088.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "extension5_V100_frag.frag"
+ },
+ "name": "extension5_V100_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "extension6_V100_frag.frag"
+ },
+ "name": "extension6_V100_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "extension7_V100_frag.frag"
+ },
+ "name": "extension7_V100_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "extension8_V100_frag.frag"
+ },
+ "name": "extension8_V100_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "extension9_V100_frag.frag"
+ },
+ "name": "extension9_V100_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "float2_frag.frag"
+ },
+ "name": "float2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "float3_frag.frag"
+ },
+ "name": "float3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "float4_frag.frag"
+ },
+ "name": "float4_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_089_to_096.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_089_to_096.html
new file mode 100644
index 000000000..df7b7b063
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_089_to_096.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_089_to_096.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "fragmentOnly1_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "fragmentOnly1_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "fragmentOnly2_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "fragmentOnly2_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "fragmentOnly3_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "fragmentOnly3_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "fragmentOnly4_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "fragmentOnly4_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "fragmentOnly_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "fragmentOnly_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "function10_frag.frag"
+ },
+ "name": "function10_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "function1_frag.frag"
+ },
+ "name": "function1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "function2_V100_frag.frag"
+ },
+ "name": "function2_V100_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_097_to_104.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_097_to_104.html
new file mode 100644
index 000000000..a081fb3da
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_097_to_104.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_097_to_104.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "function3_frag.frag"
+ },
+ "name": "function3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "function4_frag.frag"
+ },
+ "name": "function4_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "function6_frag.frag"
+ },
+ "name": "function6_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "function7_frag.frag"
+ },
+ "name": "function7_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "function8_frag.frag"
+ },
+ "name": "function8_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "function9_frag.frag"
+ },
+ "name": "function9_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "hvec2_frag.frag"
+ },
+ "name": "hvec2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "hvec3_frag.frag"
+ },
+ "name": "hvec3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_105_to_112.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_105_to_112.html
new file mode 100644
index 000000000..5229538f5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_105_to_112.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_105_to_112.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "hvec4_frag.frag"
+ },
+ "name": "hvec4_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "identifier1_frag.frag"
+ },
+ "name": "identifier1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "identifier2_frag.frag"
+ },
+ "name": "identifier2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "identifier3_frag.frag"
+ },
+ "name": "identifier3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "if1_frag.frag"
+ },
+ "name": "if1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "if2_frag.frag"
+ },
+ "name": "if2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "increment1_frag.frag"
+ },
+ "name": "increment1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "increment2_frag.frag"
+ },
+ "name": "increment2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_113_to_120.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_113_to_120.html
new file mode 100644
index 000000000..3aa93a3ba
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_113_to_120.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_113_to_120.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "increment3_frag.frag"
+ },
+ "name": "increment3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "increment4_frag.frag"
+ },
+ "name": "increment4_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "increment6_frag.frag"
+ },
+ "name": "increment6_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "main1_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "main1_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "main2_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "main2_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "main3_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "main3_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "matrix_V100_frag.frag"
+ },
+ "name": "matrix_V100_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "normal_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "normal_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_121_to_128.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_121_to_128.html
new file mode 100644
index 000000000..6ee65c70e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_121_to_128.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_121_to_128.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "parser10_frag.frag"
+ },
+ "name": "parser10_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "parser1_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "parser1_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "parser3_frag.frag"
+ },
+ "name": "parser3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "parser4_frag.frag"
+ },
+ "name": "parser4_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "parser5_frag.frag"
+ },
+ "name": "parser5_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "parser6_frag.frag"
+ },
+ "name": "parser6_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "parser7_frag.frag"
+ },
+ "name": "parser7_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "parser8_frag.frag"
+ },
+ "name": "parser8_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_129_to_136.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_129_to_136.html
new file mode 100644
index 000000000..b211e519b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_129_to_136.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_129_to_136.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "parser9_frag.frag"
+ },
+ "name": "parser9_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "preprocess0_frag.frag"
+ },
+ "name": "preprocess0_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "preprocess10_frag.frag"
+ },
+ "name": "preprocess10_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "preprocess1_frag.frag"
+ },
+ "name": "preprocess1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "preprocess2_frag.frag"
+ },
+ "name": "preprocess2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "preprocess3_frag.frag"
+ },
+ "name": "preprocess3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "preprocess4_frag.frag"
+ },
+ "name": "preprocess4_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "preprocess6_frag.frag"
+ },
+ "name": "preprocess6_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_137_to_144.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_137_to_144.html
new file mode 100644
index 000000000..7bb778bb5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_137_to_144.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_137_to_144.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "preprocess7_frag.frag"
+ },
+ "name": "preprocess7_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "scoping1_frag.frag"
+ },
+ "name": "scoping1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "scoping2_frag.frag"
+ },
+ "name": "scoping2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct10_frag.frag"
+ },
+ "name": "struct10_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct11_frag.frag"
+ },
+ "name": "struct11_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct1_frag.frag"
+ },
+ "name": "struct1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct2_frag.frag"
+ },
+ "name": "struct2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct3_frag.frag"
+ },
+ "name": "struct3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_145_to_152.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_145_to_152.html
new file mode 100644
index 000000000..c7071ff5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_145_to_152.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_145_to_152.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct4_frag.frag"
+ },
+ "name": "struct4_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct5_frag.frag"
+ },
+ "name": "struct5_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct6_frag.frag"
+ },
+ "name": "struct6_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct7_frag.frag"
+ },
+ "name": "struct7_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct8_frag.frag"
+ },
+ "name": "struct8_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct9_frag.frag"
+ },
+ "name": "struct9_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "swizzle1_frag.frag"
+ },
+ "name": "swizzle1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "swizzle2_frag.frag"
+ },
+ "name": "swizzle2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_153_to_160.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_153_to_160.html
new file mode 100644
index 000000000..f7777cf14
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_153_to_160.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_153_to_160.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "swizzle3_frag.frag"
+ },
+ "name": "swizzle3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "typecast_frag.frag"
+ },
+ "name": "typecast_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "uniform1_frag.frag"
+ },
+ "name": "uniform1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "uniform_frag.frag"
+ },
+ "name": "uniform_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "varying1_frag.frag"
+ },
+ "name": "varying1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "varying2_frag.frag"
+ },
+ "name": "varying2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "varying3_frag.frag"
+ },
+ "name": "varying3_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "varying_frag.frag"
+ },
+ "name": "varying_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_161_to_168.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_161_to_168.html
new file mode 100644
index 000000000..87a495ba9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_161_to_168.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_161_to_168.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vector_frag.frag"
+ },
+ "name": "vector_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "version2_V100_frag.frag"
+ },
+ "name": "version2_V100_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "version3_V100_frag.frag"
+ },
+ "name": "version3_V100_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vertexOnly2_frag.frag"
+ },
+ "name": "vertexOnly2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vertexOnly_frag.frag"
+ },
+ "name": "vertexOnly_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "vertex_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "vertex_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "while1_frag.frag"
+ },
+ "name": "while1_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "while2_frag.frag"
+ },
+ "name": "while2_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_169_to_176.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_169_to_176.html
new file mode 100644
index 000000000..991e2f458
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_169_to_176.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_169_to_176.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "while_frag.frag"
+ },
+ "name": "while_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "TernaryOp_frag.frag"
+ },
+ "name": "TernaryOp_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "default.vert",
+ "fragmentShader": "CG_Data_Types_frag.frag"
+ },
+ "name": "CG_Data_Types_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "default.vert",
+ "fragmentShader": "CG_Standard_Library_frag.frag"
+ },
+ "name": "CG_Standard_Library_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "default.vert",
+ "fragmentShader": "Include_Preprocessor_Directive_frag.frag"
+ },
+ "name": "Include_Preprocessor_Directive_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "default.vert",
+ "fragmentShader": "Low_Level_Assembly_Reserved_Words_frag.frag"
+ },
+ "name": "Low_Level_Assembly_Reserved_Words_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "Main_Parameters_vert.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "Main_Parameters_vert.test.html",
+ "linkstat": false,
+ "compstat": false
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "default.vert",
+ "fragmentShader": "Permissive_Constant_Conversions_frag.frag"
+ },
+ "name": "Permissive_Constant_Conversions_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_177_to_178.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_177_to_178.html
new file mode 100644
index 000000000..e9ddd6ef8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_177_to_178.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: build_177_to_178.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "default.vert",
+ "fragmentShader": "Permissive_Scalar_Vector_Expressions_frag.frag"
+ },
+ "name": "Permissive_Scalar_Vector_Expressions_frag.test.html",
+ "linkstat": true,
+ "compstat": true
+ },
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "default.vert",
+ "fragmentShader": "Texture_Rectangle_Samplers_frag.frag"
+ },
+ "name": "Texture_Rectangle_Samplers_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma1_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma1_vert.vert
new file mode 100644
index 000000000..85f66ac80
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma1_vert.vert
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+ int i, j, k;
+ float f;
+ i = j, k, f;
+ i = (j, k, f); // float cannot be assigned to int
+ gl_Position = vec4(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma2_frag.frag
new file mode 100644
index 000000000..b37276228
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma2_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ const vec4 v = (vec4(1,2,3,4), vec4(5,6,7,8), 1.2); // right most value of comma operator shoul be a vec4
+ const vec4 v1 = (vec3(0.2, 2.0), vec4(1,2,3,4), vec4(5,6,7,8));
+ const vec4 v2 = (vec4(1,2,3,4), vec2(2.1, 2), vec4(5,6,7,8));
+ gl_FragColor = v + v1 + v2;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma2_vert.vert
new file mode 100644
index 000000000..9620a32cb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma2_vert.vert
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+ int i, j, k;
+ float f;
+ i = j, k, f;
+ i = (j = k, f = 1.0); // float cannot be assigned to int
+ gl_Position = vec4(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma3_vert.vert
new file mode 100644
index 000000000..9075fa562
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma3_vert.vert
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+ int i, j, k;
+ float f;
+ i = j, k, f;
+ i = j = k, f = 1.0;
+ i = j, k = (3, f); // float cannot be assigned to int
+ gl_Position = vec4(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comment_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comment_frag.frag
new file mode 100644
index 000000000..3274a5870
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comment_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ /****** // comment not closed
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional1_frag.frag
new file mode 100644
index 000000000..616f077ae
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional1_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f1,f2;
+ int i;
+ float f3 = i ? f1 : f2; // expression must be boolean and not int
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional2_frag.frag
new file mode 100644
index 000000000..5dcff4b0f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional2_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f1,f2;
+ int i;
+ bool b;
+ float f3 = b ? i : f2; // second and third expression should of the type float
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional3_frag.frag
new file mode 100644
index 000000000..bf28fa73c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional3_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f1,f2;
+ bool b;
+ int i = b ? f1 : f2; // second and third expression type does not match the lvalue type
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constFunc_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constFunc_frag.frag
new file mode 100644
index 000000000..b93eeb02f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constFunc_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+vec2 func()
+{
+ vec2 v;
+ return v;
+}
+
+void main()
+{
+ const vec3 v = vec3(1.0, func()); // user defined functions do not return const value
+ gl_FragColor = vec4(v, v);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor1_frag.frag
new file mode 100644
index 000000000..2e58b3c0f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor1_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec4 v = vec4(1,2,3); // insufficient data provided for constructor, 4 values are required
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor2_frag.frag
new file mode 100644
index 000000000..d56b85f9e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor2_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec3 v;
+ vec4 v1 = vec4(v); // insufficient data specified for construction
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor3_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor3_V100_frag.frag
new file mode 100644
index 000000000..8de87cc2c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor3_V100_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec3 v;
+ vec4 v1 = vec4(v,v,v); // too many arguments in the constructor
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/continue_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/continue_frag.frag
new file mode 100644
index 000000000..98b513745
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/continue_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ continue; // continue keyword allowed only inside the loops
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType10_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType10_frag.frag
new file mode 100644
index 000000000..1b426b05e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType10_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f;
+ float f; // redeclaration of a variable
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType11_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType11_frag.frag
new file mode 100644
index 000000000..ce87ce363
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType11_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int i = 08; // invalid octal number
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType12_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType12_frag.frag
new file mode 100644
index 000000000..7a673b578
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType12_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int i = 0xa8g; // invalid hexadecimal number
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType13_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType13_frag.frag
new file mode 100644
index 000000000..3a4e83ccc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType13_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int i = 1;
+ float f = 1.2;
+ float result = f * i; // auto promotion now allowed
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType19_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType19_frag.frag
new file mode 100644
index 000000000..bbfa81191
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType19_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D s;
+void main()
+{
+ int i = int(s); // conversion not allowed
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType1_frag.frag
new file mode 100644
index 000000000..0221fe6a5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType1_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ void v; // variable cannot be declared of the type void
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType2_frag.frag
new file mode 100644
index 000000000..b00b21227
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType2_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D samp1;
+uniform sampler2D samp2 = samp1; // uniforms are read only
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType3_frag.frag
new file mode 100644
index 000000000..86369cc91
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType3_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform int i = 1; // uniforms are read only
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType4_frag.frag
new file mode 100644
index 000000000..55f2fb653
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType4_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int i = 1.0; // automatic type conversion does not take place, float cannot be converted to int
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType5_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType5_frag.frag
new file mode 100644
index 000000000..398d0c87f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType5_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f = 1; // int cannot be converted to float, use constructor to do the conversion explicitly
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType6_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType6_frag.frag
new file mode 100644
index 000000000..e64906c08
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType6_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ const float f; // constants must be initialized
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType7_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType7_frag.frag
new file mode 100644
index 000000000..6e05081cf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType7_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float f;
+void main()
+{
+ f = 1.0; // uniforms are read only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType8_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType8_frag.frag
new file mode 100644
index 000000000..0a6ba7828
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType8_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying float f;
+void main()
+{
+ f = 1.0; // varyings cannot be written to in a fragment shader, they can be written to in a vertex shader
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType9_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType9_frag.frag
new file mode 100644
index 000000000..686685df3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType9_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying float f;
+void main()
+{
+ float flt = 1.0;
+ flt++;
+ f++; // varyings in a fragment shader are read only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/default.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/default.frag
new file mode 100644
index 000000000..e283e255b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/default.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main (void)
+{
+ gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/default.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/default.vert
new file mode 100644
index 000000000..fc46a6ecd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/default.vert
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+void main (void)
+{
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ gl_PointSize = 1.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dowhile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dowhile_frag.frag
new file mode 100644
index 000000000..59e7593f7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dowhile_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f;
+ do {
+ } while(f); // condition should be boolean
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec2_frag.frag
new file mode 100644
index 000000000..0297c4e93
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec2_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ dvec2 d; // dvec2 is not a valid datatype, reserved for future use
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec3_frag.frag
new file mode 100644
index 000000000..5973555bc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec3_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ dvec3 d; // dvec3 is not a valid datatype, reserved for future use
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec4_frag.frag
new file mode 100644
index 000000000..2cafc8b22
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec4_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ dvec4 d; // dvec4 is not a valid datatype, reserved for future use
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension2_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension2_V100_frag.frag
new file mode 100644
index 000000000..0d2e37dc7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension2_V100_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+#extension all : require // cannot use require or enable with all
+#extension all : enable // cannot use require or enable with all
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension3_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension3_V100_frag.frag
new file mode 100644
index 000000000..4e1783a01
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension3_V100_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+#extension foo : require // error extension not supported
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension5_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension5_V100_frag.frag
new file mode 100644
index 000000000..bf3aad332
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension5_V100_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+#extension all : ddisablee // error, behavior is not supported
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension6_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension6_V100_frag.frag
new file mode 100644
index 000000000..515844c4a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension6_V100_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+#extension // error name and behavior not specified
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension7_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension7_V100_frag.frag
new file mode 100644
index 000000000..9f1356d86
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension7_V100_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+#extension foo // ":" missing after extension name
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension8_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension8_V100_frag.frag
new file mode 100644
index 000000000..ae18218c9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension8_V100_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+#extension foo : // behavior not specified
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension9_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension9_V100_frag.frag
new file mode 100644
index 000000000..30f9d4c49
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension9_V100_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+#extension foo behavior // ":" missing after extension name
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float2_frag.frag
new file mode 100644
index 000000000..c40c998ca
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float2_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float2 f; // float2 is not a valid datatype
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float3_frag.frag
new file mode 100644
index 000000000..407b184e0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float3_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float3 f; // float3 is not a valid datatype
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float4_frag.frag
new file mode 100644
index 000000000..5ac6262a7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float4_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float4 f; // float4 is not a valid datatype
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly1_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly1_vert.vert
new file mode 100644
index 000000000..ffde417a1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly1_vert.vert
@@ -0,0 +1,29 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+ gl_FrontFacing = true; // can be used in fragment shader only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly2_vert.vert
new file mode 100644
index 000000000..f2c4289d8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly2_vert.vert
@@ -0,0 +1,29 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+ gl_FragCoord = vec4(1.0); // can be used in fragment shader only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly3_vert.vert
new file mode 100644
index 000000000..9ddc58dc8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly3_vert.vert
@@ -0,0 +1,29 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+ gl_FragColor = vec4(1.0); // can be used in fragment shader only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly4_vert.vert
new file mode 100644
index 000000000..1424f6201
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly4_vert.vert
@@ -0,0 +1,29 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+ discard; // can be used in fragment shader only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly_vert.vert
new file mode 100644
index 000000000..97c976a6b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly_vert.vert
@@ -0,0 +1,29 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+ gl_FragDepth = 1.0; // can be used in fragment shader only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function10_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function10_frag.frag
new file mode 100644
index 000000000..d6655a9c8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function10_frag.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void function(in int i);
+
+void main()
+{
+ float f;
+ // overloaded function not present
+ function(f);
+}
+
+void function(in int i)
+{
+ i = 3;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function1_frag.frag
new file mode 100644
index 000000000..e835cbe1f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function1_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void function(int i)
+{
+ return i; // void function cannot return a value
+}
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function2_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function2_V100_frag.frag
new file mode 100644
index 000000000..d2757c5c1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function2_V100_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void function(int i[]) // size of array must be specified
+{
+}
+
+void main()
+{
+ int i[2];
+ function(i);
+}
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function3_frag.frag
new file mode 100644
index 000000000..0da166e06
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function3_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void function(const int i)
+{
+ i = 3; // const value cant be modified
+}
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function4_frag.frag
new file mode 100644
index 000000000..5da8a903a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function4_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform int uniformInt;
+
+void function(out int i)
+{
+ i = 1;
+}
+
+void main()
+{
+ function(uniformInt); // out and inout parameters cannot be uniform since uniforms cannot be modified
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function6_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function6_frag.frag
new file mode 100644
index 000000000..7198c5e2e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function6_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void function(const out int i)
+{ // out parameters cannot be const
+ i = 3;
+}
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function7_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function7_frag.frag
new file mode 100644
index 000000000..b1209255d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function7_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void function(uniform int i)
+{ // uniform qualifier cannot be used with function parameters
+}
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function8_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function8_frag.frag
new file mode 100644
index 000000000..dc22b4ae2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function8_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void function(const inout int i)
+{ // inout parameters cannot be const
+ i = 3;
+}
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function9_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function9_frag.frag
new file mode 100644
index 000000000..cd3c23173
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function9_frag.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void function(inout int i);
+
+void main()
+{
+ int i;
+ function(i);
+}
+
+// function definition has different parameter qualifiers than function declaration
+void function(in int i)
+{
+ i = 3;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec2_frag.frag
new file mode 100644
index 000000000..8fc71311c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec2_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ hvec2 f; // hvec2 is not a valid datatype, reserved for future use
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec3_frag.frag
new file mode 100644
index 000000000..e7072b826
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec3_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ hvec3 f; // hvec3 is not a valid datatype, reserved for future use
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec4_frag.frag
new file mode 100644
index 000000000..ca70ea937
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec4_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ hvec4 f; // hvec4 is not a valid datatype, reserved for future use
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier1_frag.frag
new file mode 100644
index 000000000..d00a31894
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier1_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int 1i; // incorrect identifier name
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier2_frag.frag
new file mode 100644
index 000000000..84193c09d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier2_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int gl_int; // identifier name cannot begin with "gl_"
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier3_frag.frag
new file mode 100644
index 000000000..9ab484070
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier3_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int i;
+ x; // identifier x used without being declared
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/if1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/if1_frag.frag
new file mode 100644
index 000000000..ff1562404
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/if1_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int i;
+ if (i) // condition of if statement must be a boolean
+ i++;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/if2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/if2_frag.frag
new file mode 100644
index 000000000..152d4fe32
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/if2_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec2 v;
+ int i;
+ if (v) // vectors cannot be used as conditional expression for if statement
+ i++;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment1_frag.frag
new file mode 100644
index 000000000..838c05827
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment1_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct s {
+ int i;
+} s1;
+
+void main()
+{
+ s1.i++;
+ s1++; // structure cannot be incremented
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment2_frag.frag
new file mode 100644
index 000000000..029b06b39
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment2_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int i;
+ (i+i)++; // i+i is not an l-value
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment3_frag.frag
new file mode 100644
index 000000000..d98095856
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment3_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D sampler2d;
+
+void main()
+{
+ sampler2d++; // uniforms cannot be modified
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment4_frag.frag
new file mode 100644
index 000000000..ad1dc4501
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment4_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int i;
+ i++ = 5; // i++ is not an l-value
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment6_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment6_frag.frag
new file mode 100644
index 000000000..fffd54d13
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment6_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int i;
+ ++i++; // ++i++ is equivalent to ++(i++) which fails because i++ is not an lvalue. (++i)++; is legal.
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/input.run.txt
new file mode 100644
index 000000000..78dde7d62
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/input.run.txt
@@ -0,0 +1,24 @@
+# this file is auto-generated. DO NOT EDIT.
+build_001_to_008.html
+build_009_to_016.html
+build_017_to_024.html
+build_025_to_032.html
+build_033_to_040.html
+build_041_to_048.html
+build_049_to_056.html
+build_057_to_064.html
+build_065_to_072.html
+build_073_to_080.html
+build_081_to_088.html
+build_089_to_096.html
+build_097_to_104.html
+build_105_to_112.html
+build_113_to_120.html
+build_121_to_128.html
+build_129_to_136.html
+build_137_to_144.html
+build_145_to_152.html
+build_153_to_160.html
+build_161_to_168.html
+build_169_to_176.html
+build_177_to_178.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main1_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main1_vert.vert
new file mode 100644
index 000000000..617598ee5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main1_vert.vert
@@ -0,0 +1,28 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+main() // return type of main should be void
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main2_vert.vert
new file mode 100644
index 000000000..fcd49232f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main2_vert.vert
@@ -0,0 +1,29 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main(int i) // main function cannot take any parameters
+{
+ gl_Position = vec4(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main3_vert.vert
new file mode 100644
index 000000000..43b6cb72a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main3_vert.vert
@@ -0,0 +1,29 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+int main() // return type of main should be void
+{
+ return 1;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/matrix_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/matrix_V100_frag.frag
new file mode 100644
index 000000000..b5051acef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/matrix_V100_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ mat3 m;
+ mat4 m1 = mat4(m);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/normal_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/normal_vert.vert
new file mode 100644
index 000000000..517780e0e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/normal_vert.vert
@@ -0,0 +1,30 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Normal;
+void main()
+{
+ gtf_Normal = vec3(1.0,2.0,3.0); // cannot be modified an attribute
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser10_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser10_frag.frag
new file mode 100644
index 000000000..838c91603
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser10_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ 5 += 5; // l-value missing
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser1_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser1_vert.vert
new file mode 100644
index 000000000..756c58eaf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser1_vert.vert
@@ -0,0 +1,30 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+void main()
+{
+ int a // semicolon missing at the end of the statement
+ gl_Position = vec4(a);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser3_frag.frag
new file mode 100644
index 000000000..b088ce865
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser3_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f[3];
+ f[3] = 1.0; // index of array greater than the size of the array
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser4_frag.frag
new file mode 100644
index 000000000..83f5dd413
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser4_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ const int i = 5;
+ i++; // const cannot be modified
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser5_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser5_frag.frag
new file mode 100644
index 000000000..f6e5d3ebb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser5_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec2 v;
+ v.z = 1.2; // vec2 does not have a z component
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser6_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser6_frag.frag
new file mode 100644
index 000000000..53a6ace1d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser6_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f1,f2,f3;
+ f3 = f1 > f2; // f1 > f2 result in a bool that cannot be assigned to a float
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser7_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser7_frag.frag
new file mode 100644
index 000000000..bac24a4bf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser7_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ mat2 m1,m2;
+ bool b = m1 > m2; // greater-than operator can not operate on matrices, however, equal (==) and not equal (!=) operators can be used with matrices
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser8_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser8_frag.frag
new file mode 100644
index 000000000..796712885
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser8_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec2 v2;
+ vec3 v3;
+ bool b = v2 == v3; // equal operator cannot operator on vectors of different sizes
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser9_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser9_frag.frag
new file mode 100644
index 000000000..def43a751
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser9_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f1,f2;
+ bool b = f1 && f2; // &&, || and ^^ operate on a boolean expression only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess0_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess0_frag.frag
new file mode 100644
index 000000000..da74a926e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess0_frag.frag
@@ -0,0 +1,80 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+//test for else elif mismatch
+#define test(x,y) (x+y)
+
+void main(void){
+ int sum =0;
+ #define x 8
+ #endif
+ #if (x==8)
+ #undef x
+ #endif
+
+ #if 1
+ #undef x
+ #endif
+
+ #if 1
+ #define t4 4
+ #endif
+
+ sum=test(3,6)+t4;
+ #if 1
+ #if 1
+ #if 1
+ #if 1
+ #if 0
+ #undef test
+ #else
+ #if 1
+ #undef test
+ #endif
+ #if 0
+ #undef test
+ #else
+ #if 0
+ #undef test
+ #else
+ #if 1
+ #undef test
+ #else
+ #undef test
+ #else
+ #jdhgj
+ #endif
+ #endif
+ #endif
+ #endif
+ #endif
+ #endif
+ #endif
+ #endif
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess10_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess10_frag.frag
new file mode 100644
index 000000000..22c491f82
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess10_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+/* The program should terminate with an error message and not get into an
+ infinite loop */
+#ifdef name
+
+void main()
+{
+ gl_FragColor = vec4(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess1_frag.frag
new file mode 100644
index 000000000..e5d5a4546
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess1_frag.frag
@@ -0,0 +1,81 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+// tests for macro redifinition (t2) and the #if and #else nestings.
+// takes care of elif also.
+
+#define t1 (1+2)
+#define t2 2
+#define t2 3
+
+// testing the if depth
+#if (t1==3)
+ #define t3 3
+ #if defined t2
+ #define t4 4
+ #if defined(t3)
+ #define t5 5
+ #ifdef t5
+ #define t6 6
+ #ifndef t7
+ #define t7 7
+ #else
+ #define t8 8
+ #endif
+ #endif
+ #else
+ #ifndef t8
+ #define t8 8
+ #elif (t8==8)
+ #define t9 9
+ #else
+ #if defined t7
+ #define t9 9
+ #endif
+ #endif
+ #endif
+ #else
+ #define t10 10
+ #endif
+#endif
+
+
+#define t8 8
+#define t9 9
+#define t10 10
+
+void main(void)
+{
+ int sum=1 ;
+ sum = t1+t2;
+ sum = t3+t4;
+ sum = t5+t6;
+ sum = t7+t8;
+ sum = t9+t10;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess2_frag.frag
new file mode 100644
index 000000000..971095774
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess2_frag.frag
@@ -0,0 +1,77 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+// #line directive-- test cases.
+// chks for Invalid directives, all possible #line errors
+// Also checks the correct verions of #line dorective.
+
+#define t1 1
+#define t2 2
+
+#
+#
+#
+#
+#line 8
+#line ""
+#line 3 3
+
+#linekfj
+#line c c
+#line t1 t2
+#line 77 89
+#line 65.4
+#line message to the user
+#line
+#line345
+
+void main(void)
+{
+ int sum =1;
+ sum = __LINE__;
+ sum = __FILE__;
+ #line 4 5
+ sum = __LINE__;
+ sum = __FILE__;
+ #line 9
+ sum = __LINE__ + __FILE__ ;
+ sum = __FILE__;
+ #
+ #
+ sum = __VERSION__;
+ sum = sum + __LINE__ ;
+ #line 4 5
+ #line 5 8
+ sum = __LINE__;
+ sum = __FILE__;
+ sum = __VERSION__;
+
+}
+
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess3_frag.frag
new file mode 100644
index 000000000..bcecb1ee1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess3_frag.frag
@@ -0,0 +1,60 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+// simple macro expansions.
+// Tests for Too few macro arguments, too many macro arguments.
+// Macros with no arguments.
+
+#define t1 -1
+#define t2 2
+
+#define test -258
+#define test1 (test*test)
+#define test2(x) (x+test1)
+#define test3() (test2(8)*(test*test1))
+#define test4(x,y) (x+y)
+
+void main(void)
+{
+ int sum =0;
+ sum = test3();
+ sum = test3(3);
+
+ sum = test2(9);
+ sum = test2(9,8);
+
+ sum = test4;
+ sum = test2(8,5,78,9);
+ sum = sum + test1;
+ sum = 8+58+sum;
+ sum = sum +test;
+ sum = (t1+t2);
+ sum = test4(test3(),test2(test3()));
+ sum = test4(3,8,5);
+ sum = test4();
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess4_frag.frag
new file mode 100644
index 000000000..81f43cab5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess4_frag.frag
@@ -0,0 +1,77 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+// #error and #pragma directives -- test cases.
+// tests for errors in #pragma directive.
+
+#pragma optimize(on)
+#pragma debug(off)
+
+int foo(int);
+
+void main(void)
+{
+ int sum =0;
+ #error ;
+ #error 78
+ #error c
+ #error "message to the user "
+ #error message to the user
+ #error
+ #error
+ #define t1 1
+ sum = t1*t1;
+ foo(sum);
+
+}
+
+#pragma optimize(off)
+#pragma bind(on)
+#pragma pack(off)
+
+int foo(int test)
+{
+ int binding=0;
+ binding = test;
+ return binding;
+}
+
+#line 4
+#pragma
+#line 5 6
+#pragma optmimize on
+#pragma debug off
+#pragma debug(off
+#line 9
+#prgma bind(off)
+#pragma bind
+#pragma (on)
+#pragma on (on)
+#pragma optmize(on
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess6_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess6_frag.frag
new file mode 100644
index 000000000..0fc4b509a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess6_frag.frag
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+// operator precedence and some macro expansions.
+
+#define test (1+2)
+#define test1 (test*4)
+#define test2 (test1/test)
+//#define test3 (-1+2*3/4%test)
+#define test3 (-1+2*3/4)
+//#define test4 (test & test1 |test2)
+#define test4 (test)
+#define test5 (!8+~4+4-6)
+#define test6 (test1>>1)
+#define test7 (test1<<1)
+#define test8 (test2^6)
+#define test9 (test4 || test5 && test1)
+#define test10 (0)
+
+void main(void)
+{
+ int sum =0;
+ sum = test4;
+ sum = test3*test2+test1-test;
+// sum = test3/test6 + test4*test7 - test7 % test9;
+// sum = test3/test6 + test4*test7 - test7;
+ sum = test10*test5;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess7_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess7_frag.frag
new file mode 100644
index 000000000..14f9acd69
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess7_frag.frag
@@ -0,0 +1,68 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+// testing for char constants in #if and #elif
+// Also checking whether reserved words can be redefined.
+
+#define t1 c
+#define t2 d
+#define asm a
+
+ #if(t1==c)
+ #define t3 3
+ #elif(t1==d)
+ #define t4 4
+ #elif(t2==c)
+ #define t5 5
+ #endif
+
+ #ifndef t1
+ #define t7 7
+ #elif (t2==d)
+ #define t6 6
+ #endif
+
+ #if (t2=='d')
+ #define half 5
+ #else
+ #define half 8
+ #endif
+
+ #ifdef t22
+ #define x 5
+ #endif
+
+ void main(void)
+ {
+ int sum =0,a=9;
+
+ sum = half + sum;
+ sum = asm + a;
+
+ }
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/scoping1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/scoping1_frag.frag
new file mode 100644
index 000000000..d826522b5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/scoping1_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ bool b;
+ if (b)
+ {
+ int i = 1;
+ i++;
+ }
+ i++; // i is not declared in this scope
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/scoping2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/scoping2_frag.frag
new file mode 100644
index 000000000..ebb871e8b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/scoping2_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ {
+ int i = 1;
+ i++;
+ }
+ i++; // i is not declared in this scope
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct10_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct10_frag.frag
new file mode 100644
index 000000000..65dd3c133
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct10_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct s {
+ int i;
+} s1[2];
+
+void main()
+{
+ s1.i = 1; // s1 is an array. s1[0].i is correct to use
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct11_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct11_frag.frag
new file mode 100644
index 000000000..1ead02703
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct11_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct s {
+ int i;
+} s1;
+
+void main()
+{
+ s1 = -s1; // cannot calculate negative of a structure
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct1_frag.frag
new file mode 100644
index 000000000..613b4fc14
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct1_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct s {
+ int i;
+} uniform uniformStruct; // uniform keyword should be used before the keyword struct
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct2_frag.frag
new file mode 100644
index 000000000..031319ac0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct2_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct s {
+ int i = 1.0; // struct members cannot be initialized at the time of structure declaration
+} s1;
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct3_frag.frag
new file mode 100644
index 000000000..a53271af8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct3_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct s {
+ uniform int i; // structure members cannot be declared with const qualifier
+} s1;
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct4_frag.frag
new file mode 100644
index 000000000..14b9b662c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct4_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct s {
+ const int i = 1; // structure members cannot be declared with const qualifier
+} s1;
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct5_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct5_frag.frag
new file mode 100644
index 000000000..74a12af4a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct5_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform struct s {
+ int i;
+} s1;
+
+void main()
+{
+ s1.i = 1; // uniforms are read only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct6_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct6_frag.frag
new file mode 100644
index 000000000..937331496
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct6_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying struct s {
+ int i;
+} s1; // structures cannot be declared with varying qualifier
+
+void main()
+{
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct7_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct7_frag.frag
new file mode 100644
index 000000000..7f9b0818f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct7_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ struct s {
+ } s1; // structures have to be declared with atleast one member
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct8_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct8_frag.frag
new file mode 100644
index 000000000..c83f398e3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct8_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct s {
+ int i;
+} s1;
+
+struct ss {
+ int i;
+} s2;
+
+void main()
+{
+ s1 = s2; // two different structures cannot be assigned to each other
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct9_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct9_frag.frag
new file mode 100644
index 000000000..14babe347
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct9_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+const struct s {
+ int i;
+} s1 = s(1);
+
+void main()
+{
+ s1.i = 1; // const struct members cannot be modified
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle1_frag.frag
new file mode 100644
index 000000000..39dddcb29
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle1_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec2 v;
+ v.xy = 1.2; // swizzle needs two values, v.xy = vec2(1.2) is correct
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle2_frag.frag
new file mode 100644
index 000000000..8eb8162bd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle2_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec2 v;
+ v.xx = vec2(1,1); // x cannot be used twice in l-value
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle3_frag.frag
new file mode 100644
index 000000000..b8bdb5ef4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle3_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec2 v;
+ vec3 v3 = v.xyz; // v is a vec2 and does not have a z component
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/typecast_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/typecast_frag.frag
new file mode 100644
index 000000000..75cc93e5c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/typecast_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ vec4 v;
+ vec4 v1 = (vec4) v; // incorrect typecasting, vec4(v) is correct
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/uniform1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/uniform1_frag.frag
new file mode 100644
index 000000000..7ba746f65
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/uniform1_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct gtf_FogParameters {
+vec4 color;
+float density;
+float start;
+float end;
+float scale;
+};
+uniform gtf_FogParameters gtf_Fog;
+void main()
+{
+ gtf_Fog.density = 1.0; // cannot modify a uniform
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/uniform_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/uniform_frag.frag
new file mode 100644
index 000000000..125bf56dd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/uniform_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ uniform float foo; // uniforms can only be declared at a global scope
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying1_frag.frag
new file mode 100644
index 000000000..0938a024d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying1_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying float foo;
+
+void main()
+{
+ foo = 5.0; // varying cannot be written by a fragment shader
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying2_frag.frag
new file mode 100644
index 000000000..f52339615
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying2_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying int foo; // varyings cannot be int or bool
+
+void main()
+{
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying3_frag.frag
new file mode 100644
index 000000000..a93f9ae05
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying3_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 v = vec4(1,1,1,1);//gl_TexCoord[0]; // varyings cannot be initialized
+
+void main()
+{
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying_frag.frag
new file mode 100644
index 000000000..50a763055
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ varying float foo; // varyings can only be declared at a global scope
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vector_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vector_frag.frag
new file mode 100644
index 000000000..a88027ede
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vector_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ ivec4 v4;
+ v4 = v4 + 2.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/version2_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/version2_V100_frag.frag
new file mode 100644
index 000000000..6ed081378
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/version2_V100_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#pragma debug(on)
+#version 100 // error #version should be the first statement in the program
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+
+void main()
+{
+ gl_FragColor = vec4(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/version3_V100_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/version3_V100_frag.frag
new file mode 100644
index 000000000..fbe5c24d7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/version3_V100_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+/* This is a comment*/ int i; // This is a global decl
+#version 100 // error #version should be the first statement in the program
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+
+void main()
+{
+ gl_FragColor = vec4(1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertexOnly2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertexOnly2_frag.frag
new file mode 100644
index 000000000..0e4547d43
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertexOnly2_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ gl_Position = vec4(4.0); // can be used in vertex shader only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertexOnly_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertexOnly_frag.frag
new file mode 100644
index 000000000..cc44d2496
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertexOnly_frag.frag
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct gtf_PointParameters {
+float size;
+float sizeMin;
+float sizeMax;
+float fadeThresholdSize;
+float distanceConstantAttenuation;
+float distanceLinearAttenuation;
+float distanceQuadraticAttenuation;
+};
+uniform gtf_FogParameters gtf_Point;
+void main()
+{
+ gtf_PointSize = 4.0; // can be used in vertex shader only
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertex_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertex_vert.vert
new file mode 100644
index 000000000..e4b1f4474
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertex_vert.vert
@@ -0,0 +1,30 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+void main()
+{
+ gtf_Vertex = vec4(1.0,2.0,3.0, 4.0); // cannot modify an attribute
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while1_frag.frag
new file mode 100644
index 000000000..64894fa34
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while1_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ int i;
+ while(i) { // condition should be boolean
+ }
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while2_frag.frag
new file mode 100644
index 000000000..68df2b3bd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while2_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ while(float f = 5.0) { // cannot declare variables in condition
+ }
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while_frag.frag
new file mode 100644
index 000000000..d55d00194
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main()
+{
+ float f;
+ while(f) { // condition should be boolean
+ }
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/built_in_varying_array_out_of_bounds_001_to_001.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/built_in_varying_array_out_of_bounds_001_to_001.html
new file mode 100644
index 000000000..64553ccc3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/built_in_varying_array_out_of_bounds_001_to_001.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: built_in_varying_array_out_of_bounds_001_to_001.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "pattern": "build",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_Color_array_index_out_of_bounds_frag.frag"
+ },
+ "name": "gl_Color_array_index_out_of_bounds_frag.test.html",
+ "linkstat": false,
+ "compstat": false
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/gl_Color_array_index_out_of_bounds_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/gl_Color_array_index_out_of_bounds_frag.frag
new file mode 100644
index 000000000..38b05ae49
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/gl_Color_array_index_out_of_bounds_frag.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main(void)
+{
+ gl_FragColor = vec4(color[1], color[2], color[3], color[4]);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/input.run.txt
new file mode 100644
index 000000000..be6485a1f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+built_in_varying_array_out_of_bounds_001_to_001.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_001_to_006.html
new file mode 100644
index 000000000..407f8cac7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: ceil_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ceil_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ceil_float_frag_xvary.frag"
+ },
+ "name": "ceil_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ceil_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ceil_vec2_frag_xvary.frag"
+ },
+ "name": "ceil_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ceil_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ceil_vec3_frag_xvary.frag"
+ },
+ "name": "ceil_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "ceil_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "ceil_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ceil_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "ceil_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "ceil_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ceil_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "ceil_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "ceil_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ceil_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_frag_xvary.frag
new file mode 100644
index 000000000..dfb425e48
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4((ceil(c) + 10.0) / 20.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..56b73e785
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_frag_xvary_ref.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float ceil_ref(float x)
+{
+ if(x != floor(x)) x = floor(x) + 1.0;
+ return x;
+}
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4((ceil_ref(c) + 10.0) / 20.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_vert_xvary.vert
new file mode 100644
index 000000000..da5e9f800
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (gtf_Color.r - 0.5);
+ color = vec4((ceil(c) + 10.0) / 20.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..9872fd198
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_vert_xvary_ref.vert
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+float ceil_ref(float x)
+{
+ if(x != floor(x)) x = floor(x) + 1.0;
+ return x;
+}
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (gtf_Color.r - 0.5);
+ color = vec4((ceil_ref(c) + 10.0) / 20.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_frag_xvary.frag
new file mode 100644
index 000000000..836c69786
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4((ceil(c) + 10.0) / 20.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..4c624a57b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_frag_xvary_ref.frag
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+vec2 ceil_ref(vec2 x)
+{
+ if(x[0] != floor(x[0])) x[0] = floor(x[0]) + 1.0;
+ if(x[1] != floor(x[1])) x[1] = floor(x[1]) + 1.0;
+ return x;
+}
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4((ceil_ref(c) + 10.0) / 20.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_vert_xvary.vert
new file mode 100644
index 000000000..8240119c8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4((ceil(c) + 10.0) / 20.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..7483c22cc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_vert_xvary_ref.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+vec2 ceil_ref(vec2 x)
+{
+ if(x[0] != floor(x[0])) x[0] = floor(x[0]) + 1.0;
+ if(x[1] != floor(x[1])) x[1] = floor(x[1]) + 1.0;
+ return x;
+}
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4((ceil_ref(c) + 10.0) / 20.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_frag_xvary.frag
new file mode 100644
index 000000000..45d026666
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4((ceil(c) + 10.0) / 20.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..652be10fc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_frag_xvary_ref.frag
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+vec3 ceil_ref(vec3 x)
+{
+ if(x[0] != floor(x[0])) x[0] = floor(x[0]) + 1.0;
+ if(x[1] != floor(x[1])) x[1] = floor(x[1]) + 1.0;
+ if(x[2] != floor(x[2])) x[2] = floor(x[2]) + 1.0;
+ return x;
+}
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4((ceil_ref(c) + 10.0) / 20.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_vert_xvary.vert
new file mode 100644
index 000000000..e7a321345
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4((ceil(c) + 10.0) / 20.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..1bb4b8092
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_vert_xvary_ref.vert
@@ -0,0 +1,44 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+vec3 ceil_ref(vec3 x)
+{
+ if(x[0] != floor(x[0])) x[0] = floor(x[0]) + 1.0;
+ if(x[1] != floor(x[1])) x[1] = floor(x[1]) + 1.0;
+ if(x[2] != floor(x[2])) x[2] = floor(x[2]) + 1.0;
+ return x;
+}
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4((ceil_ref(c) + 10.0) / 20.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/input.run.txt
new file mode 100644
index 000000000..ed1a87ffa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+ceil_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_001_to_006.html
new file mode 100644
index 000000000..3d9d913b7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: clamp_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "clamp_float_frag_xvary_yconstquarter_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "clamp_float_frag_xvary_yconstquarter.frag"
+ },
+ "name": "clamp_float_frag_xvary_yconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "clamp_vec2_frag_xvary_yconstquarter_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "clamp_vec2_frag_xvary_yconstquarter.frag"
+ },
+ "name": "clamp_vec2_frag_xvary_yconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "clamp_vec3_frag_xvary_yconstquarter_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "clamp_vec3_frag_xvary_yconstquarter.frag"
+ },
+ "name": "clamp_vec3_frag_xvary_yconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "clamp_float_vert_xvary_yconstquarter_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "clamp_float_vert_xvary_yconstquarter.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "clamp_float_vert_xvary_yconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "clamp_vec2_vert_xvary_yconstquarter_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "clamp_vec2_vert_xvary_yconstquarter.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "clamp_vec2_vert_xvary_yconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "clamp_vec3_vert_xvary_yconstquarter_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "clamp_vec3_vert_xvary_yconstquarter.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "clamp_vec3_vert_xvary_yconstquarter.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_frag_xvary_yconstquarter.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_frag_xvary_yconstquarter.frag
new file mode 100644
index 000000000..2c32377d2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_frag_xvary_yconstquarter.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.25;
+ const float max_c = 0.75;
+ float c = color.r;
+ gl_FragColor = vec4(clamp(c, min_c, max_c), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_frag_xvary_yconstquarter_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_frag_xvary_yconstquarter_ref.frag
new file mode 100644
index 000000000..2b1e5a340
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_frag_xvary_yconstquarter_ref.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.25;
+ const float max_c = 0.75;
+ float c = color.r;
+ if(c > max_c) c = max_c;
+ if(c < min_c) c = min_c;
+
+ gl_FragColor = vec4(c, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_vert_xvary_yconstquarter.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_vert_xvary_yconstquarter.vert
new file mode 100644
index 000000000..68aa1a4b6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_vert_xvary_yconstquarter.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.25;
+ const float max_c = 0.75;
+ float c = gtf_Color.r;
+ color = vec4(clamp(c, min_c, max_c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_vert_xvary_yconstquarter_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_vert_xvary_yconstquarter_ref.vert
new file mode 100644
index 000000000..bc6d8c00e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_vert_xvary_yconstquarter_ref.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.25;
+ const float max_c = 0.75;
+ float c = gtf_Color.r;
+ if(c > max_c) c = max_c;
+ if(c < min_c) c = min_c;
+
+ color = vec4(c, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_frag_xvary_yconstquarter.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_frag_xvary_yconstquarter.frag
new file mode 100644
index 000000000..e912dd375
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_frag_xvary_yconstquarter.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 min_c = vec2(0.25, 0.25);
+ const vec2 max_c = vec2(0.75, 0.75);
+ vec2 c = color.rg;
+ gl_FragColor = vec4(clamp(c, min_c, max_c), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_frag_xvary_yconstquarter_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_frag_xvary_yconstquarter_ref.frag
new file mode 100644
index 000000000..54face3fe
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_frag_xvary_yconstquarter_ref.frag
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 min_c = vec2(0.25, 0.25);
+ const vec2 max_c = vec2(0.75, 0.75);
+ vec2 c = color.rg;
+ if(c[0] < min_c[0]) c[0] = min_c[0];
+ if(c[1] < min_c[1]) c[1] = min_c[1];
+ if(c[0] > max_c[0]) c[0] = max_c[0];
+ if(c[1] > max_c[1]) c[1] = max_c[1];
+
+ gl_FragColor = vec4(c, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_vert_xvary_yconstquarter.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_vert_xvary_yconstquarter.vert
new file mode 100644
index 000000000..17474f371
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_vert_xvary_yconstquarter.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.25;
+ const float max_c = 0.75;
+ vec2 c = gtf_Color.rg;
+ color = vec4(clamp(c, min_c, max_c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_vert_xvary_yconstquarter_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_vert_xvary_yconstquarter_ref.vert
new file mode 100644
index 000000000..e566319c9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_vert_xvary_yconstquarter_ref.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.25;
+ const float max_c = 0.75;
+ vec2 c = gtf_Color.rg;
+ if(c[0] > max_c) c[0] = max_c;
+ if(c[0] < min_c) c[0] = min_c;
+ if(c[1] > max_c) c[1] = max_c;
+ if(c[1] < min_c) c[1] = min_c;
+
+ color = vec4(c, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_frag_xvary_yconstquarter.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_frag_xvary_yconstquarter.frag
new file mode 100644
index 000000000..c294c26bb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_frag_xvary_yconstquarter.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 min_c = vec3(0.25, 0.25, 0.25);
+ const vec3 max_c = vec3(0.75, 0.75, 0.75);
+ vec3 c = color.rgb;
+ gl_FragColor = vec4(clamp(c, min_c, max_c), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_frag_xvary_yconstquarter_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_frag_xvary_yconstquarter_ref.frag
new file mode 100644
index 000000000..e09f795b3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_frag_xvary_yconstquarter_ref.frag
@@ -0,0 +1,44 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 min_c = vec3(0.25, 0.25, 0.25);
+ const vec3 max_c = vec3(0.75, 0.75, 0.75);
+ vec3 c = color.rgb;
+ if(c[0] < min_c[0]) c[0] = min_c[0];
+ if(c[1] < min_c[1]) c[1] = min_c[1];
+ if(c[2] < min_c[2]) c[2] = min_c[2];
+ if(c[0] > max_c[0]) c[0] = max_c[0];
+ if(c[1] > max_c[1]) c[1] = max_c[1];
+ if(c[2] > max_c[2]) c[2] = max_c[2];
+
+ gl_FragColor = vec4(c, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_vert_xvary_yconstquarter.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_vert_xvary_yconstquarter.vert
new file mode 100644
index 000000000..50c14ffc5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_vert_xvary_yconstquarter.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.25;
+ const float max_c = 0.75;
+ vec3 c = gtf_Color.rgb;
+ color = vec4(clamp(c, min_c, max_c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_vert_xvary_yconstquarter_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_vert_xvary_yconstquarter_ref.vert
new file mode 100644
index 000000000..6ba4f0d42
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_vert_xvary_yconstquarter_ref.vert
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.25;
+ const float max_c = 0.75;
+ vec3 c = gtf_Color.rgb;
+ if(c[0] > max_c) c[0] = max_c;
+ if(c[0] < min_c) c[0] = min_c;
+ if(c[1] > max_c) c[1] = max_c;
+ if(c[1] < min_c) c[1] = min_c;
+ if(c[2] > max_c) c[2] = max_c;
+ if(c[2] < min_c) c[2] = min_c;
+
+ color = vec4(c, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/input.run.txt
new file mode 100644
index 000000000..2fafa275a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+clamp_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_001_to_008.html
new file mode 100644
index 000000000..7a1d7bb3b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_001_to_008.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: control_flow_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "for_break_frag.frag"
+ },
+ "name": "for_break_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "for_break_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "for_break_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "for_continue_frag.frag"
+ },
+ "name": "for_continue_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "for_continue_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "for_continue_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "for_nested_break_frag.frag"
+ },
+ "name": "for_nested_break_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "for_nested_break_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "for_nested_break_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "for_nested_continue_frag.frag"
+ },
+ "name": "for_nested_continue_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "for_nested_continue_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "for_nested_continue_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_009_to_010.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_009_to_010.html
new file mode 100644
index 000000000..379720486
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_009_to_010.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: control_flow_009_to_010.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "nested_if_else_frag.frag"
+ },
+ "name": "nested_if_else_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "nested_if_else_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "nested_if_else_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_break_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_break_frag.frag
new file mode 100644
index 000000000..ff23a7859
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_break_frag.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int count = 0;
+ for(int i=0;i<5;i++)
+ {
+ count++;
+ if(count == 3)
+ break;
+ }
+
+ float gray;
+ if( count == 3)
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_break_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_break_vert.vert
new file mode 100644
index 000000000..84a517d94
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_break_vert.vert
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int count = 0;
+ for(int i=0;i<45;i++)
+ {
+ count++;
+ if(count == 29)
+ break;
+ }
+ float gray;
+ if( count == 29)
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_continue_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_continue_frag.frag
new file mode 100644
index 000000000..df501385e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_continue_frag.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int count=0;
+ int val=0;
+
+ for(int i=0;i<10;i++)
+ {
+ count++;
+ if(count == 5)
+ continue;
+ else
+ val += count;
+ }
+
+ float gray;
+ if( val == 50)
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_continue_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_continue_vert.vert
new file mode 100644
index 000000000..219932612
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_continue_vert.vert
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int count=0;
+ int val=0;
+ for(int i=0;i<10;i++)
+ {
+ count++;
+ if(count == 5)
+ continue;
+ else
+ val += count;
+ }
+
+
+ float gray;
+ if( val == 50)
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_break_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_break_frag.frag
new file mode 100644
index 000000000..dc0cdb59a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_break_frag.frag
@@ -0,0 +1,52 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int count1 = 0, count2 = 0;
+ for(int i=0;i<4;i++)
+ {
+ count1++;
+ count2 = 0;
+ for(int j=0;j<4;j++)
+ {
+ count2++;
+ if(count2 == 3)
+ break;
+ }
+ if(count1 == 2)
+ break;
+ }
+ float gray;
+ if( (count1 == 2) && (count2 == 3))
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_break_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_break_vert.vert
new file mode 100644
index 000000000..47491be11
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_break_vert.vert
@@ -0,0 +1,52 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int count1 = 0, count2 = 0;
+ for(int i=0;i<45;i++)
+ {
+ count1++;
+ count2 = 0;
+ for(int j=0;j<45;j++)
+ {
+ count2++;
+ if(count2 == 29)
+ break;
+ }
+ if(count1 == 29)
+ break;
+ }
+ float gray;
+ if( (count1 == 29) && (count2 == 29))
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_continue_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_continue_frag.frag
new file mode 100644
index 000000000..9185696ac
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_continue_frag.frag
@@ -0,0 +1,61 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int count1 = 0, count2 = 0;
+ int val1 = 0, val2 = 0;
+ for(int i=0;i<4;i++)
+ {
+ count1++;
+ count2 = 0;
+ for(int j=0;j<4;j++)
+ {
+ count2++;
+ if(count2 == 2)
+ continue;
+ else
+ val2 += count2;
+
+ }
+
+
+ if(count1 == 2)
+ continue;
+ else
+ val1 += count1;
+
+ }
+ float gray;
+ if( (val1 == 8) && (val2 == 32) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_continue_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_continue_vert.vert
new file mode 100644
index 000000000..14fb0b7d2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_continue_vert.vert
@@ -0,0 +1,61 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int count1 = 0, count2 = 0;
+ int val1 = 0, val2 = 0;
+ for(int i=0;i<10;i++)
+ {
+ count1++;
+ count2 = 0;
+ for(int j=0;j<10;j++)
+ {
+ count2++;
+ if(count2 == 5)
+ continue;
+ else
+ val2 += count2;
+
+ }
+
+
+ if(count1 == 5)
+ continue;
+ else
+ val1 += count1;
+
+ }
+ float gray;
+ if( (val1 == 50) && (val2 == 500) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/input.run.txt
new file mode 100644
index 000000000..fddcaa48a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/input.run.txt
@@ -0,0 +1,3 @@
+# this file is auto-generated. DO NOT EDIT.
+control_flow_001_to_008.html
+control_flow_009_to_010.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/nested_if_else_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/nested_if_else_frag.frag
new file mode 100644
index 000000000..31e409734
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/nested_if_else_frag.frag
@@ -0,0 +1,57 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int setval = 30;
+
+ if(--setval!=29)
+ if( (setval+=11) == 40)
+ if(setval/4 == 11)
+ setval = 11;
+ else if(setval/4 == 10)
+ if(setval-3 == 37)
+ setval=12;
+ else setval = 9;
+ else setval = 10;
+ else setval = 30;
+ else if(setval == 29)
+ if((setval+=19) != 48)
+ setval = 13;
+ else if((setval+=19) == 29)
+ setval = 28;
+ else setval = 53;
+ else setval = 32;
+ float gray;
+ if( setval == 53 )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/nested_if_else_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/nested_if_else_vert.vert
new file mode 100644
index 000000000..aa3787d69
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/nested_if_else_vert.vert
@@ -0,0 +1,57 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int setval = 30;
+
+ if(--setval!=29)
+ if( (setval+=11) == 40)
+ if(setval/4 == 11)
+ setval = 11;
+ else if(setval/4 == 10)
+ if(setval-3 == 37)
+ setval=12;
+ else setval = 9;
+ else setval = 10;
+ else setval = 30;
+ else if(setval == 29)
+ if((setval+=19) != 48)
+ setval = 13;
+ else if((setval+=19) == 29)
+ setval = 28;
+ else setval = 53;
+ else setval = 32;
+ float gray;
+ if( setval == 53 )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_001_to_006.html
new file mode 100644
index 000000000..b28bbaad9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: cos_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "cos_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "cos_float_frag_xvary.frag"
+ },
+ "name": "cos_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "cos_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "cos_vec2_frag_xvary.frag"
+ },
+ "name": "cos_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "cos_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "cos_vec3_frag_xvary.frag"
+ },
+ "name": "cos_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "cos_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "cos_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "cos_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "cos_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "cos_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "cos_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "cos_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "cos_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "cos_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_frag_xvary.frag
new file mode 100644
index 000000000..4cef9e2e2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ gl_FragColor = vec4(0.5 * cos(2.0 * M_PI * color.r) + 0.5, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..a15106d29
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_frag_xvary_ref.frag
@@ -0,0 +1,70 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * M_PI * ( fract(abs(color.r)) - 0.5 );
+ float sign = 1.0;
+ float cos_c = -1.0;
+ float fact_even = 1.0;
+ float fact_odd = 1.0;
+ float sum;
+
+ // At this point c is in the range [-PI, PI)
+
+ // Taylor-Maclaurin series expansion for cosine
+ //
+ // Apply the property that pow(a, b + c) = pow(a, b) * pow(a, c)
+ // and the property that 1.0/(a*b) = 1.0/a * 1.0/b
+ // to make sure no register ever overflows the range (-16384, +16384)
+ // mandated for mediump variables.
+
+ for(int i = 2; i <= 10; i += 2)
+ {
+ // fact_even will hold at most the value 3840.
+ fact_even *= float(i);
+
+ // fact_odd will always be smaller than fact_even
+ fact_odd *= float(i-1);
+
+ // pow(c, float(i/2)) takes at most the value pow(PI, 5), which is approx. 306
+ // abs(sum) is at most PI/2.0
+ sum = sign * pow(abs(c), float(i/2))/fact_even;
+
+ // abs(sum/fact_odd) is at most PI/2.0
+ // cos_c is always bound in the range [-1.0, 1.0)
+ cos_c += pow(abs(c), float(i/2))*(sum/fact_odd);
+
+ sign = -sign;
+ }
+
+ gl_FragColor = vec4(0.5 * cos_c + 0.5, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_vert_xvary.vert
new file mode 100644
index 000000000..ff1bf21de
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ color = vec4(0.5 * cos(2.0 * M_PI * gtf_Color.r) + 0.5, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..70a32fea4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_vert_xvary_ref.vert
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * M_PI * gtf_Color.r;
+ float sign = -1.0;
+ float cos_c = 1.0;
+ float fact = 1.0;
+
+ // Taylor-Maclaurin series expansion for cosine
+ for(int i = 2; i <= 20; i += 2)
+ {
+ fact *= float(i)*float(i-1);
+ cos_c += sign*pow(c, float(i))/fact;
+ sign = -sign;
+ }
+
+ color = vec4(0.5 * cos_c + 0.5, 0.0, 0.0, 1.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_frag_xvary.frag
new file mode 100644
index 000000000..303bcd985
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ gl_FragColor = vec4(0.5 * cos(2.0 * M_PI * color.rg) + 0.5, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..782ba2115
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_frag_xvary_ref.frag
@@ -0,0 +1,74 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * M_PI * ( fract(abs(color.rg)) - 0.5 );
+ float sign = 1.0;
+ vec2 cos_c = vec2(-1.0, -1.0);
+ float fact_even = 1.0;
+ float fact_odd = 1.0;
+ vec2 sum;
+ vec2 exp;
+
+ // At this point c is in the range [-PI, PI)
+
+ // Taylor-Maclaurin series expansion for cosine
+ //
+ // Apply the property that pow(a, b + c) = pow(a, b) * pow(a, c)
+ // and the property that 1.0/(a*b) = 1.0/a * 1.0/b
+ // to make sure no register ever overflows the range (-16384, +16384)
+ // mandated for mediump variables.
+
+ for(int i = 2; i <= 10; i += 2)
+ {
+ // fact_even will hold at most the value 3840.
+ fact_even *= float(i);
+
+ // fact_odd will always be smaller than fact_even
+ fact_odd *= float(i-1);
+
+ // exp is at most (5,5)
+ exp = vec2(float(i/2), float(i/2));
+
+ // pow(c, exp) takes at most the value pow(PI, 5), which is approx. 306
+ // abs(sum) is at most PI/2.0
+ sum = sign * pow(abs(c), exp)/fact_even;
+
+ // abs(sum/fact_odd) is at most PI/2.0
+ // cos_c is always bound in the range [-1.0, 1.0)
+ cos_c += pow(abs(c), exp)*(sum/fact_odd);
+
+ sign = -sign;
+ }
+
+ gl_FragColor = vec4(0.5 * cos_c + 0.5, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_vert_xvary.vert
new file mode 100644
index 000000000..6c9daf513
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ color = vec4(0.5 * cos(2.0 * M_PI * gtf_Color.rg) + 0.5, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..aba8af4bb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_vert_xvary_ref.vert
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * M_PI * gtf_Color.rg;
+ float sign = -1.0;
+ vec2 cos_c = vec2(1.0, 1.0);
+ float fact = 1.0;
+
+ // Taylor-Maclaurin series expansion for cosine
+ for(int i = 2; i <= 20; i += 2)
+ {
+ fact *= float(i)*float(i-1);
+ cos_c += sign*pow(c, vec2(float(i), float(i)))/fact;
+ sign = -sign;
+ }
+
+ color = vec4(0.5 * cos_c + 0.5, 0.0, 1.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_frag_xvary.frag
new file mode 100644
index 000000000..2470106a7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ gl_FragColor = vec4(0.5 * cos(2.0 * M_PI * color.rgb) + 0.5, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..b7e149de2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_frag_xvary_ref.frag
@@ -0,0 +1,74 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * M_PI * ( fract(abs(color.rgb)) - 0.5 );
+ float sign = 1.0;
+ vec3 cos_c = vec3(-1.0, -1.0, -1.0);
+ float fact_even = 1.0;
+ float fact_odd = 1.0;
+ vec3 sum;
+ vec3 exp;
+
+ // At this point c is in the range [-PI, PI)
+
+ // Taylor-Maclaurin series expansion for cosine
+ //
+ // Apply the property that pow(a, b + c) = pow(a, b) * pow(a, c)
+ // and the property that 1.0/(a*b) = 1.0/a * 1.0/b
+ // to make sure no register ever overflows the range (-16384, +16384)
+ // mandated for mediump variables.
+
+ for(int i = 2; i <= 10; i += 2)
+ {
+ // fact_even will hold at most the value 3840.
+ fact_even *= float(i);
+
+ // fact_odd will always be smaller than fact_even
+ fact_odd *= float(i-1);
+
+ // exp is at most (5,5,5)
+ exp = vec3(float(i/2), float(i/2), float(i/2));
+
+ // pow(c, exp) takes at most the value pow(PI, 5), which is approx. 306
+ // abs(sum) is at most PI/2.0
+ sum = sign * pow(abs(c), exp)/fact_even;
+
+ // abs(sum/fact_odd) is at most PI/2.0
+ // cos_c is always bound in the range [-1.0, 1.0)
+ cos_c += pow(abs(c), exp)*(sum/fact_odd);
+
+ sign = -sign;
+ }
+
+ gl_FragColor = vec4(0.5 * cos_c + 0.5, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_vert_xvary.vert
new file mode 100644
index 000000000..bde69506c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ color = vec4(0.5 * cos(2.0 * M_PI * gtf_Color.rgb) + 0.5, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..cd8f9d837
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_vert_xvary_ref.vert
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * M_PI * gtf_Color.rgb;
+ float sign = -1.0;
+ vec3 cos_c = vec3(1.0,1.0,1.0);
+ float fact = 1.0;
+
+ // Taylor-Maclaurin series expansion for cosine
+ for(int i = 2; i <= 20; i += 2)
+ {
+ fact *= float(i)*float(i-1);
+ cos_c += sign*pow(c, vec3(float(i),float(i),float(i)))/fact;
+ sign = -sign;
+ }
+
+ color = vec4(0.5 * cos_c + 0.5, 1.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/input.run.txt
new file mode 100644
index 000000000..64f23d8c3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+cos_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_001_to_002.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_001_to_002.html
new file mode 100644
index 000000000..2529ae4cd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_001_to_002.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: cross_001_to_002.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "cross_vec3_frag_xvaryyconst_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "cross_vec3_frag_xvaryyconst.frag"
+ },
+ "name": "cross_vec3_frag_xvaryyconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "cross_vec3_vert_xvaryyconst_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "cross_vec3_vert_xvaryyconst.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "cross_vec3_vert_xvaryyconst.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_frag_xvaryyconst.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_frag_xvaryyconst.frag
new file mode 100644
index 000000000..3baaed544
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_frag_xvaryyconst.frag
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = vec3(1.0, 0.0, 0.0);
+
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ gl_FragColor = vec4((cross(v1, v2) + 1.0) / 2.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_frag_xvaryyconst_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_frag_xvaryyconst_ref.frag
new file mode 100644
index 000000000..7d1f21613
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_frag_xvaryyconst_ref.frag
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = vec3(1.0, 0.0, 0.0);
+ vec3 v3;
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+ v3.x = v1.y * v2.z - v2.y * v1.z;
+ v3.y = v2.x * v1.z - v1.x * v2.z;
+ v3.z = v1.x * v2.y - v2.x * v1.y;
+ gl_FragColor = vec4((v3 + 1.0) / 2.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_vert_xvaryyconst.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_vert_xvaryyconst.vert
new file mode 100644
index 000000000..6a3345f28
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_vert_xvaryyconst.vert
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = vec3(1.0, 0.0, 0.0);
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+ color = vec4((cross(v1, v2) + 1.0) / 2.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_vert_xvaryyconst_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_vert_xvaryyconst_ref.vert
new file mode 100644
index 000000000..7680ae035
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_vert_xvaryyconst_ref.vert
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = vec3(1.0, 0.0, 0.0);
+ vec3 v3;
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+ v3.x = v1.y * v2.z - v2.y * v1.z;
+ v3.y = v2.x * v1.z - v1.x * v2.z;
+ v3.z = v1.x * v2.y - v2.x * v1.y;
+ color = vec4((v3 + 1.0) / 2.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/input.run.txt
new file mode 100644
index 000000000..4ce9794db
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+cross_001_to_002.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default.frag
new file mode 100644
index 000000000..e9d460fb2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default.vert
new file mode 100644
index 000000000..72e83fd03
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ gl_PointSize = 1.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_001_to_001.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_001_to_001.html
new file mode 100644
index 000000000..5dc9a9004
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_001_to_001.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: default_001_to_001.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "default.vert",
+ "fragmentShader": "default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "default.vert",
+ "fragmentShader": "default.frag"
+ },
+ "name": "default.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_textured.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_textured.frag
new file mode 100644
index 000000000..8db3c6954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_textured.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D gtf_Texture0;
+varying vec4 color;
+varying vec4 gtf_TexCoord[1];
+
+void main (void)
+{
+ gl_FragColor = texture2D(gtf_Texture0, gtf_TexCoord[0].xy);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_textured.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_textured.vert
new file mode 100644
index 000000000..1b5b7831a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_textured.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 gtf_TexCoord[1];
+attribute vec4 gtf_MultiTexCoord0;
+varying vec4 color;
+
+void main (void)
+{
+ color = gtf_Color;
+ gtf_TexCoord[0] = gtf_MultiTexCoord0;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ gl_PointSize = 1.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/expected.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/expected.frag
new file mode 100644
index 000000000..3d543f343
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/expected.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform vec4 result;
+
+void main (void)
+{
+ gl_FragColor = result;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/input.run.txt
new file mode 100644
index 000000000..44c03e906
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+default_001_to_001.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_001_to_006.html
new file mode 100644
index 000000000..5a72e9475
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: degrees_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "degrees_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "degrees_float_frag_xvary.frag"
+ },
+ "name": "degrees_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "degrees_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "degrees_vec2_frag_xvary.frag"
+ },
+ "name": "degrees_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "degrees_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "degrees_vec3_frag_xvary.frag"
+ },
+ "name": "degrees_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "degrees_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "degrees_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "degrees_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "degrees_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "degrees_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "degrees_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "degrees_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "degrees_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "degrees_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_frag_xvary.frag
new file mode 100644
index 000000000..52d2e724a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * M_PI * 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(degrees(c) / (2.0 * 360.0) + 0.5, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..b3675b045
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_frag_xvary_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * M_PI * 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4((c * 180.0 / M_PI) / (2.0 * 360.0) + 0.5, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_vert_xvary.vert
new file mode 100644
index 000000000..69b026d7d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * M_PI * 2.0 * (gtf_Color.r - 0.5);
+ color = vec4(degrees(c) / (2.0 * 360.0) + 0.5, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..4b919b44b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_vert_xvary_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * M_PI * 2.0 * (gtf_Color.r - 0.5);
+ color = vec4((c * 180.0 / M_PI) / (2.0 * 360.0) + 0.5, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_frag_xvary.frag
new file mode 100644
index 000000000..3c01fb83e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * M_PI * 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(degrees(c) / (2.0 * 360.0) + 0.5, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..0706159c0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_frag_xvary_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * M_PI * 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4((c * 180.0 / M_PI) / (2.0 * 360.0) + 0.5, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_vert_xvary.vert
new file mode 100644
index 000000000..e7c59c300
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * M_PI * 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(degrees(c) / (2.0 * 360.0) + 0.5, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..f2d52d129
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_vert_xvary_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * M_PI * 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4((c * 180.0 / M_PI) / (2.0 * 360.0) + 0.5, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_frag_xvary.frag
new file mode 100644
index 000000000..48c5cb1de
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * M_PI * 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(degrees(c) / (2.0 * 360.0) + 0.5, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..e970bd141
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_frag_xvary_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * M_PI * 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4((c * 180.0 / M_PI) / (2.0 * 360.0) + 0.5, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_vert_xvary.vert
new file mode 100644
index 000000000..520f0bb65
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * M_PI * 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(degrees(c) / (2.0 * 360.0) + 0.5, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..ef8d0e4ab
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_vert_xvary_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * M_PI * 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4((c * 180.0 / M_PI) / (2.0 * 360.0) + 0.5, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/input.run.txt
new file mode 100644
index 000000000..caa0c110d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+degrees_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_001_to_002.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_001_to_002.html
new file mode 100644
index 000000000..effeffc2c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_001_to_002.html
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: discard_001_to_002.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "discard_frag.frag"
+ },
+ "name": "discard_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "discard_cond_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "discard_cond_frag.frag"
+ },
+ "name": "discard_cond_frag.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_cond_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_cond_frag.frag
new file mode 100644
index 000000000..bcb251232
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_cond_frag.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ bool toDiscard = false;
+ if(color.r > 0.75) toDiscard = true;
+ else if(color.g > 0.75) toDiscard = true;
+ else if(color.b > 0.75) toDiscard = true;
+
+ if (toDiscard) discard;
+
+ gl_FragColor = color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_cond_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_cond_frag_ref.frag
new file mode 100644
index 000000000..05bb08a03
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_cond_frag_ref.frag
@@ -0,0 +1,44 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ if(color.r > 0.75 || color.g > 0.75 || color.b > 0.75)
+ {
+ /* The background color is black by default.
+ * Setting the fragment color to it simulates a discarded fragment.
+ */
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
+ }
+ else
+ {
+ gl_FragColor = color;
+ }
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_frag.frag
new file mode 100644
index 000000000..6420e95bf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = color;
+ discard;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/input.run.txt
new file mode 100644
index 000000000..ff9bfa993
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+discard_001_to_002.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_001_to_006.html
new file mode 100644
index 000000000..597bf5fd4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: distance_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "distance_float_frag_xvaryyhalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "distance_float_frag_xvaryyhalf.frag"
+ },
+ "name": "distance_float_frag_xvaryyhalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "distance_vec2_frag_xvaryyhalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "distance_vec2_frag_xvaryyhalf.frag"
+ },
+ "name": "distance_vec2_frag_xvaryyhalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "distance_vec3_frag_xvaryyhalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "distance_vec3_frag_xvaryyhalf.frag"
+ },
+ "name": "distance_vec3_frag_xvaryyhalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "distance_float_vert_xvaryyhalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "distance_float_vert_xvaryyhalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "distance_float_vert_xvaryyhalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "distance_vec2_vert_xvaryyhalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "distance_vec2_vert_xvaryyhalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "distance_vec2_vert_xvaryyhalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "distance_vec3_vert_xvaryyhalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "distance_vec3_vert_xvaryyhalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "distance_vec3_vert_xvaryyhalf.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf.frag
new file mode 100644
index 000000000..90d38ddcf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(distance(color.r, 0.5)), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf_ref.frag
new file mode 100644
index 000000000..d5c87c09e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf_ref.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(sqrt(pow(abs(color.r - 0.5), 2.0))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf.vert
new file mode 100644
index 000000000..574bf00c3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(distance(gtf_Color.r, 0.5)), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf_ref.vert
new file mode 100644
index 000000000..694c7d1f7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf_ref.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(sqrt(pow(abs(gtf_Color.r - 0.5), 2.0))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf.frag
new file mode 100644
index 000000000..c39308d1e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(distance(color.rg, vec2(0.5))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf_ref.frag
new file mode 100644
index 000000000..61e180032
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf_ref.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(sqrt(pow(abs(color.r - 0.5), 2.0) + pow(abs(color.g - 0.5), 2.0))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf.vert
new file mode 100644
index 000000000..9807d91fe
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(distance(gtf_Color.rg, vec2(0.5))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf_ref.vert
new file mode 100644
index 000000000..f70d7a78c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf_ref.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(sqrt(pow(abs(gtf_Color.r - 0.5), 2.0) + pow(abs(gtf_Color.g - 0.5), 2.0))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf.frag
new file mode 100644
index 000000000..c356d3424
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(distance(color.rgb, vec3(0.5))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf_ref.frag
new file mode 100644
index 000000000..b016b64db
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf_ref.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(sqrt(pow(abs(color.r - 0.5), 2.0) + pow(abs(color.g - 0.5), 2.0) + pow(abs(color.b - 0.5), 2.0))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf.vert
new file mode 100644
index 000000000..f0ce5c4bd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(distance(gtf_Color.rgb, vec3(0.5))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf_ref.vert
new file mode 100644
index 000000000..7fdd7f986
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf_ref.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(sqrt(pow(abs(gtf_Color.r - 0.5), 2.0) + pow(abs(gtf_Color.g - 0.5), 2.0) + pow(abs(gtf_Color.b - 0.5), 2.0))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/input.run.txt
new file mode 100644
index 000000000..bfbce99ed
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+distance_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_001_to_006.html
new file mode 100644
index 000000000..40d5fc161
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: dot_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dot_float_frag_xvaryyone_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dot_float_frag_xvaryyone.frag"
+ },
+ "name": "dot_float_frag_xvaryyone.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dot_vec2_frag_xvaryyhalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dot_vec2_frag_xvaryyhalf.frag"
+ },
+ "name": "dot_vec2_frag_xvaryyhalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dot_vec3_frag_xvaryythird_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "dot_vec3_frag_xvaryythird.frag"
+ },
+ "name": "dot_vec3_frag_xvaryythird.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "dot_float_vert_xvaryyone_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "dot_float_vert_xvaryyone.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "dot_float_vert_xvaryyone.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "dot_vec2_vert_xvaryyhalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "dot_vec2_vert_xvaryyhalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "dot_vec2_vert_xvaryyhalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "dot_vec3_vert_xvaryythird_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "dot_vec3_vert_xvaryythird.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "dot_vec3_vert_xvaryythird.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_frag_xvaryyone.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_frag_xvaryyone.frag
new file mode 100644
index 000000000..4dfef129c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_frag_xvaryyone.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(dot(color.r, 1.0)), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_frag_xvaryyone_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_frag_xvaryyone_ref.frag
new file mode 100644
index 000000000..1d8b5594d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_frag_xvaryyone_ref.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(color.r), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_vert_xvaryyone.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_vert_xvaryyone.vert
new file mode 100644
index 000000000..d1df51840
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_vert_xvaryyone.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(dot(gtf_Color.r, 1.0)), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_vert_xvaryyone_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_vert_xvaryyone_ref.vert
new file mode 100644
index 000000000..3d37b84fd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_vert_xvaryyone_ref.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(gtf_Color.r), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf.frag
new file mode 100644
index 000000000..dc4389716
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(dot(color.rg, vec2(0.5))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf_ref.frag
new file mode 100644
index 000000000..515e49651
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf_ref.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(color.r + color.g) * 0.5, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf.vert
new file mode 100644
index 000000000..48cc60154
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(dot(gtf_Color.rg, vec2(0.5))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf_ref.vert
new file mode 100644
index 000000000..d5e6df67b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf_ref.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(gtf_Color.r + gtf_Color.g) * 0.5, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird.frag
new file mode 100644
index 000000000..55205c284
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(dot(color.rgb, vec3(0.3333))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird_ref.frag
new file mode 100644
index 000000000..cc4a934fb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird_ref.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(color.r + color.g + color.b) * 0.3333, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird.vert
new file mode 100644
index 000000000..69493de3e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(dot(gtf_Color.rgb, vec3(0.3333))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird_ref.vert
new file mode 100644
index 000000000..5fc4c8805
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird_ref.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(gtf_Color.r + gtf_Color.g + gtf_Color.b) * 0.3333, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/input.run.txt
new file mode 100644
index 000000000..e87547fd3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+dot_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_001_to_008.html
new file mode 100644
index 000000000..8949e8144
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: equal_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equal_vec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equal_vec2_frag.frag"
+ },
+ "name": "equal_vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "equal_vec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "equal_vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "equal_vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equal_vec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equal_vec3_frag.frag"
+ },
+ "name": "equal_vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "equal_vec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "equal_vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "equal_vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equal_ivec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equal_ivec2_frag.frag"
+ },
+ "name": "equal_ivec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "equal_ivec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "equal_ivec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "equal_ivec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equal_ivec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equal_ivec3_frag.frag"
+ },
+ "name": "equal_ivec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "equal_ivec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "equal_ivec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "equal_ivec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_009_to_012.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_009_to_012.html
new file mode 100644
index 000000000..d231c1373
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_009_to_012.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: equal_009_to_012.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equal_bvec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equal_bvec2_frag.frag"
+ },
+ "name": "equal_bvec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "equal_bvec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "equal_bvec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "equal_bvec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equal_bvec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equal_bvec3_frag.frag"
+ },
+ "name": "equal_bvec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "equal_bvec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "equal_bvec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "equal_bvec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_frag.frag
new file mode 100644
index 000000000..045692d15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(1.5 * color.rg); // 1/3 true, 2/3 false
+ vec2 result = vec2(equal(bvec2(c), bvec2(true)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_frag_ref.frag
new file mode 100644
index 000000000..ebcac6654
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_frag_ref.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+bvec2 eq(in bvec2 a, in bvec2 b)
+{
+ bvec2 result;
+ if(a[0] == b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] == b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(1.5 * color.rg); // 1/3 true, 2/3 false
+ vec2 result = vec2(eq(bvec2(c), bvec2(true)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_vert.vert
new file mode 100644
index 000000000..024e181bb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(1.5 * gtf_Color.rg); // 1/3 true, 2/3 false
+ vec2 result = vec2(equal(bvec2(c), bvec2(true)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_vert_ref.vert
new file mode 100644
index 000000000..216909a18
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 eq(in bvec2 a, in bvec2 b)
+{
+ bvec2 result;
+ if(a[0] == b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] == b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(1.5 * gtf_Color.rg); // 1/3 true, 2/3 false
+ vec2 result = vec2(eq(bvec2(c), bvec2(true)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_frag.frag
new file mode 100644
index 000000000..0ccb925a7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(1.5 * color.rgb); // 1/3 true, 2/3 false
+ vec3 result = vec3(equal(bvec3(c), bvec3(true)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_frag_ref.frag
new file mode 100644
index 000000000..0a1b9c8d8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 eq(in bvec3 a, in bvec3 b)
+{
+ bvec3 result;
+ if(a[0] == b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] == b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] == b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(1.5 * color.rgb); // 1/3 true, 2/3 false
+ vec3 result = vec3(eq(bvec3(c), bvec3(true)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_vert.vert
new file mode 100644
index 000000000..de9b3e3cb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(1.5 * gtf_Color.rgb); // 1/3 true, 2/3 false
+ vec3 result = vec3(equal(bvec3(c), bvec3(true)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_vert_ref.vert
new file mode 100644
index 000000000..7501623cb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 eq(in bvec3 a, in bvec3 b)
+{
+ bvec3 result;
+ if(a[0] == b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] == b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] == b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(1.5 * gtf_Color.rgb); // 1/3 true, 2/3 false
+ vec3 result = vec3(eq(bvec3(c), bvec3(true)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_frag.frag
new file mode 100644
index 000000000..ce609e4f1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(equal(ivec2(c), ivec2(0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_frag_ref.frag
new file mode 100644
index 000000000..37007e784
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_frag_ref.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec2 eq(in ivec2 a, in ivec2 b)
+{
+ bvec2 result;
+ if(a[0] == b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] == b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(eq(ivec2(c), ivec2(0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_vert.vert
new file mode 100644
index 000000000..893a9a162
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(equal(ivec2(c), ivec2(0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_vert_ref.vert
new file mode 100644
index 000000000..ae12fe24f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 eq(in ivec2 a, in ivec2 b)
+{
+ bvec2 result;
+ if(a[0] == b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] == b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(eq(ivec2(c), ivec2(0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_frag.frag
new file mode 100644
index 000000000..43975b302
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(equal(ivec3(c), ivec3(0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_frag_ref.frag
new file mode 100644
index 000000000..6b20fd91a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 eq(in ivec3 a, in ivec3 b)
+{
+ bvec3 result;
+ if(a[0] == b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] == b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] == b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(eq(ivec3(c), ivec3(0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_vert.vert
new file mode 100644
index 000000000..717b03e9f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(equal(ivec3(c), ivec3(0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_vert_ref.vert
new file mode 100644
index 000000000..e7d43e501
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 eq(in ivec3 a, in ivec3 b)
+{
+ bvec3 result;
+ if(a[0] == b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] == b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] == b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(eq(ivec3(c), ivec3(0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_frag.frag
new file mode 100644
index 000000000..432eb4b6c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(equal(c, vec2(0.0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_frag_ref.frag
new file mode 100644
index 000000000..858da69cf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_frag_ref.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+bvec2 eq(in vec2 a, in vec2 b)
+{
+ bvec2 result;
+ if(a[0] == b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] == b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(eq(c, vec2(0.0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_vert.vert
new file mode 100644
index 000000000..efb11fc95
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(equal(c, vec2(0.0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_vert_ref.vert
new file mode 100644
index 000000000..4b72078dc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 eq(in vec2 a, in vec2 b)
+{
+ bvec2 result;
+ if(a[0] == b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] == b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(eq(c, vec2(0.0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_frag.frag
new file mode 100644
index 000000000..00de9eead
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(equal(c, vec3(0.0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_frag_ref.frag
new file mode 100644
index 000000000..3d9a2151a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 eq(in vec3 a, in vec3 b)
+{
+ bvec3 result;
+ if(a[0] == b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] == b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] == b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(eq(c, vec3(0.0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_vert.vert
new file mode 100644
index 000000000..b7b75c56c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(equal(c, vec3(0.0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_vert_ref.vert
new file mode 100644
index 000000000..df3f3e2e9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 eq(in vec3 a, in vec3 b)
+{
+ bvec3 result;
+ if(a[0] == b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] == b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] == b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(eq(c, vec3(0.0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/input.run.txt
new file mode 100644
index 000000000..cd4a81eb5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/input.run.txt
@@ -0,0 +1,3 @@
+# this file is auto-generated. DO NOT EDIT.
+equal_001_to_008.html
+equal_009_to_012.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_001_to_008.html
new file mode 100644
index 000000000..7ee6ec4f2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: exp_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp_float_frag_xvary.frag"
+ },
+ "name": "exp_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp_vec2_frag_xvary.frag"
+ },
+ "name": "exp_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp_vec3_frag_xvary.frag"
+ },
+ "name": "exp_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp_float_frag_xvaryneg_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp_float_frag_xvaryneg.frag"
+ },
+ "name": "exp_float_frag_xvaryneg.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp_vec2_frag_xvaryneg_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp_vec2_frag_xvaryneg.frag"
+ },
+ "name": "exp_vec2_frag_xvaryneg.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp_vec3_frag_xvaryneg_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp_vec3_frag_xvaryneg.frag"
+ },
+ "name": "exp_vec3_frag_xvaryneg.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "exp_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "exp_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "exp_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "exp_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "exp_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "exp_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_009_to_012.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_009_to_012.html
new file mode 100644
index 000000000..3a2549715
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_009_to_012.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: exp_009_to_012.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "exp_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "exp_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "exp_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "exp_float_vert_xvaryneg_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "exp_float_vert_xvaryneg.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "exp_float_vert_xvaryneg.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "exp_vec2_vert_xvaryneg_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "exp_vec2_vert_xvaryneg.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "exp_vec2_vert_xvaryneg.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "exp_vec3_vert_xvaryneg_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "exp_vec3_vert_xvaryneg.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "exp_vec3_vert_xvaryneg.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvary.frag
new file mode 100644
index 000000000..86ed7588c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float exp3 = 20.0855;
+ float c = color.r;
+ gl_FragColor = vec4(exp(3.0 * c) / exp3, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..f13fca97d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvary_ref.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float exp1 = 2.7183;
+ const float exp3 = 20.0855;
+ float c = color.r;
+ gl_FragColor = vec4(pow(exp1, 3.0 * c) / exp3, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvaryneg.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvaryneg.frag
new file mode 100644
index 000000000..785a46471
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvaryneg.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = -color.r;
+ gl_FragColor = vec4(exp(3.0 * c), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvaryneg_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvaryneg_ref.frag
new file mode 100644
index 000000000..08503fa51
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvaryneg_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float exp1 = 2.7183;
+ float c = color.r;
+ gl_FragColor = vec4(1.0 / pow(exp1, 3.0 * c), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvary.vert
new file mode 100644
index 000000000..df41faff3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float exp3 = 20.0855;
+ float c = gtf_Color.r;
+ color = vec4(exp(3.0 * c) / exp3, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..f83a25bb8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvary_ref.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float exp1 = 2.7183;
+ const float exp3 = 20.0855;
+ float c = gtf_Color.r;
+ color = vec4(pow(exp1, 3.0 * c) / exp3, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvaryneg.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvaryneg.vert
new file mode 100644
index 000000000..7d1f08a6b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvaryneg.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = -gtf_Color.r;
+ color = vec4(exp(3.0 * c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvaryneg_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvaryneg_ref.vert
new file mode 100644
index 000000000..b429ff8ff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvaryneg_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float exp1 = 2.7183;
+ float c = gtf_Color.r;
+ color = vec4(1.0 / pow(exp1, 3.0 * c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvary.frag
new file mode 100644
index 000000000..be85cb373
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float exp3 = 20.0855;
+ vec2 c = color.rg;
+ gl_FragColor = vec4(exp(3.0 * c) / exp3, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..9b11c7672
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvary_ref.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float exp1 = 2.7183;
+ const float exp3 = 20.0855;
+ vec2 c = color.rg;
+ gl_FragColor = vec4(pow(vec2(exp1), 3.0 * c) / exp3, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvaryneg.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvaryneg.frag
new file mode 100644
index 000000000..5a81055ee
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvaryneg.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = -color.rg;
+ gl_FragColor = vec4(exp(3.0 * c), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvaryneg_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvaryneg_ref.frag
new file mode 100644
index 000000000..ddfeae7f8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvaryneg_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float exp1 = 2.7183;
+ vec2 c = color.rg;
+ gl_FragColor = vec4(1.0 / pow(vec2(exp1), 3.0 * c), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvary.vert
new file mode 100644
index 000000000..c22d89ed3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float exp3 = 20.0855;
+ vec2 c = gtf_Color.rg;
+ color = vec4(exp(3.0 * c) / exp3, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..47a68f504
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvary_ref.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float exp1 = 2.7183;
+ const float exp3 = 20.0855;
+ vec2 c = gtf_Color.rg;
+ color = vec4(pow(vec2(exp1), 3.0 * c) / exp3, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvaryneg.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvaryneg.vert
new file mode 100644
index 000000000..aae926d6c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvaryneg.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = -gtf_Color.rg;
+ color = vec4(exp(3.0 * c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvaryneg_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvaryneg_ref.vert
new file mode 100644
index 000000000..900695648
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvaryneg_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float exp1 = 2.7183;
+ vec2 c = gtf_Color.rg;
+ color = vec4(1.0 / pow(vec2(exp1), 3.0 * c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvary.frag
new file mode 100644
index 000000000..446532a2e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float exp3 = 20.0855;
+ vec3 c = color.rgb;
+ gl_FragColor = vec4(exp(3.0 * c) / exp3, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..b481b7dcd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvary_ref.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float exp1 = 2.7183;
+ const float exp3 = 20.0855;
+ vec3 c = color.rgb;
+ gl_FragColor = vec4(pow(vec3(exp1), 3.0 * c) / exp3, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvaryneg.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvaryneg.frag
new file mode 100644
index 000000000..a836e8786
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvaryneg.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = -color.rgb;
+ gl_FragColor = vec4(exp(3.0 * c), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvaryneg_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvaryneg_ref.frag
new file mode 100644
index 000000000..e710a7973
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvaryneg_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float exp1 = 2.7183;
+ vec3 c = color.rgb;
+ gl_FragColor = vec4(1.0 / pow(vec3(exp1), 3.0 * c), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvary.vert
new file mode 100644
index 000000000..b1056c28a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float exp3 = 20.0855;
+ vec3 c = gtf_Color.rgb;
+ color = vec4(exp(3.0 * c) / exp3, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..f1385688c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvary_ref.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float exp1 = 2.7183;
+ const float exp3 = 20.0855;
+ vec3 c = gtf_Color.rgb;
+ color = vec4(pow(vec3(exp1), 3.0 * c) / exp3, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvaryneg.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvaryneg.vert
new file mode 100644
index 000000000..d6c6c5644
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvaryneg.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = -gtf_Color.rgb;
+ color = vec4(exp(3.0 * c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvaryneg_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvaryneg_ref.vert
new file mode 100644
index 000000000..f361d9feb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvaryneg_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float exp1 = 2.7183;
+ vec3 c = gtf_Color.rgb;
+ color = vec4(1.0 / pow(vec3(exp1), 3.0 * c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/input.run.txt
new file mode 100644
index 000000000..4f56a2b32
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/input.run.txt
@@ -0,0 +1,3 @@
+# this file is auto-generated. DO NOT EDIT.
+exp_001_to_008.html
+exp_009_to_012.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_001_to_008.html
new file mode 100644
index 000000000..390e55e7c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: exp2_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp2_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp2_float_frag_xvary.frag"
+ },
+ "name": "exp2_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp2_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp2_vec2_frag_xvary.frag"
+ },
+ "name": "exp2_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp2_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp2_vec3_frag_xvary.frag"
+ },
+ "name": "exp2_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp2_float_frag_xvaryneg_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp2_float_frag_xvaryneg.frag"
+ },
+ "name": "exp2_float_frag_xvaryneg.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp2_vec2_frag_xvaryneg_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp2_vec2_frag_xvaryneg.frag"
+ },
+ "name": "exp2_vec2_frag_xvaryneg.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp2_vec3_frag_xvaryneg_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "exp2_vec3_frag_xvaryneg.frag"
+ },
+ "name": "exp2_vec3_frag_xvaryneg.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "exp2_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "exp2_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "exp2_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "exp2_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "exp2_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "exp2_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_009_to_012.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_009_to_012.html
new file mode 100644
index 000000000..6c5285c8c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_009_to_012.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: exp2_009_to_012.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "exp2_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "exp2_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "exp2_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "exp2_float_vert_xvaryneg_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "exp2_float_vert_xvaryneg.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "exp2_float_vert_xvaryneg.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "exp2_vec2_vert_xvaryneg_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "exp2_vec2_vert_xvaryneg.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "exp2_vec2_vert_xvaryneg.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "exp2_vec3_vert_xvaryneg_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "exp2_vec3_vert_xvaryneg.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "exp2_vec3_vert_xvaryneg.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvary.frag
new file mode 100644
index 000000000..922a733df
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = color.r;
+ gl_FragColor = vec4(exp2(5.0 * c) / 32.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..88a6eae8e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = color.r;
+ gl_FragColor = vec4(pow(2.0, 5.0 * c) / 32.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvaryneg.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvaryneg.frag
new file mode 100644
index 000000000..914026405
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvaryneg.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = -color.r;
+ gl_FragColor = vec4(exp2(5.0 * c), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvaryneg_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvaryneg_ref.frag
new file mode 100644
index 000000000..d8167046f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvaryneg_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = color.r;
+ gl_FragColor = vec4(1.0 / pow(2.0, 5.0 * c), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvary.vert
new file mode 100644
index 000000000..c3b914833
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = gtf_Color.r;
+ color = vec4(exp2(5.0 * c) / 32.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..69898a603
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = gtf_Color.r;
+ color = vec4(pow(2.0, 5.0 * c) / 32.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvaryneg.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvaryneg.vert
new file mode 100644
index 000000000..8955e3cfb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvaryneg.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = -gtf_Color.r;
+ color = vec4(exp2(5.0 * c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvaryneg_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvaryneg_ref.vert
new file mode 100644
index 000000000..2fc614e5a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvaryneg_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = gtf_Color.r;
+ color = vec4(1.0 / pow(2.0, 5.0 * c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvary.frag
new file mode 100644
index 000000000..8af82a79b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = color.rg;
+ gl_FragColor = vec4(exp2(5.0 * c) / 32.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..77c44ff3d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = color.rg;
+ gl_FragColor = vec4(pow(vec2(2.0), 5.0 * c) / 32.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvaryneg.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvaryneg.frag
new file mode 100644
index 000000000..b7805bead
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvaryneg.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = -color.rg;
+ gl_FragColor = vec4(exp2(5.0 * c), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvaryneg_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvaryneg_ref.frag
new file mode 100644
index 000000000..ddfaea250
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvaryneg_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = color.rg;
+ gl_FragColor = vec4(1.0 / pow(vec2(2.0), 5.0 * c), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvary.vert
new file mode 100644
index 000000000..9903e6692
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = gtf_Color.rg;
+ color = vec4(exp2(5.0 * c) / 32.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..da02403b2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = gtf_Color.rg;
+ color = vec4(pow(vec2(2.0), 5.0 * c) / 32.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvaryneg.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvaryneg.vert
new file mode 100644
index 000000000..b94b23dd3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvaryneg.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = -gtf_Color.rg;
+ color = vec4(exp2(5.0 * c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvaryneg_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvaryneg_ref.vert
new file mode 100644
index 000000000..8284a474e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvaryneg_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = gtf_Color.rg;
+ color = vec4(1.0 / pow(vec2(2.0), 5.0 * c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvary.frag
new file mode 100644
index 000000000..1f289ce15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = color.rgb;
+ gl_FragColor = vec4(exp2(5.0 * c) / 32.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..b75546900
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = color.rgb;
+ gl_FragColor = vec4(pow(vec3(2.0), 5.0 * c) / 32.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvaryneg.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvaryneg.frag
new file mode 100644
index 000000000..c401e57d8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvaryneg.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = -color.rgb;
+ gl_FragColor = vec4(exp2(5.0 * c), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvaryneg_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvaryneg_ref.frag
new file mode 100644
index 000000000..6f945903d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvaryneg_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = color.rgb;
+ gl_FragColor = vec4(1.0 / pow(vec3(2.0), 5.0 * c), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvary.vert
new file mode 100644
index 000000000..d59cb3ef5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = gtf_Color.rgb;
+ color = vec4(exp2(5.0 * c) / 32.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..3e8cc48a0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = gtf_Color.rgb;
+ color = vec4(pow(vec3(2.0), 5.0 * c) / 32.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvaryneg.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvaryneg.vert
new file mode 100644
index 000000000..4d154bc17
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvaryneg.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = -gtf_Color.rgb;
+ color = vec4(exp2(5.0 * c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvaryneg_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvaryneg_ref.vert
new file mode 100644
index 000000000..b0bc7818d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvaryneg_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = gtf_Color.rgb;
+ color = vec4(1.0 / pow(vec3(2.0), 5.0 * c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/input.run.txt
new file mode 100644
index 000000000..f893cd413
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/input.run.txt
@@ -0,0 +1,3 @@
+# this file is auto-generated. DO NOT EDIT.
+exp2_001_to_008.html
+exp2_009_to_012.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_001_to_006.html
new file mode 100644
index 000000000..98d93954f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: faceforward_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "faceforward_float_frag_nvaryiconst_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "faceforward_float_frag_nvaryiconst.frag"
+ },
+ "name": "faceforward_float_frag_nvaryiconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "faceforward_float_vert_nvaryiconst_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "faceforward_float_vert_nvaryiconst.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "faceforward_float_vert_nvaryiconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "faceforward_vec2_frag_nvaryiconst_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "faceforward_vec2_frag_nvaryiconst.frag"
+ },
+ "name": "faceforward_vec2_frag_nvaryiconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "faceforward_vec2_vert_nvaryiconst_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "faceforward_vec2_vert_nvaryiconst.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "faceforward_vec2_vert_nvaryiconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "faceforward_vec3_frag_nvaryiconst_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "faceforward_vec3_frag_nvaryiconst.frag"
+ },
+ "name": "faceforward_vec3_frag_nvaryiconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "faceforward_vec3_vert_nvaryiconst_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "faceforward_vec3_vert_nvaryiconst.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "faceforward_vec3_vert_nvaryiconst.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_frag_nvaryiconst.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_frag_nvaryiconst.frag
new file mode 100644
index 000000000..07ef6fbf0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_frag_nvaryiconst.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ float v1 = (color.g * 2.0) - 1.0;
+ float v2 = (color.b * 2.0) - 1.0;
+
+ gl_FragColor = vec4((faceforward(v1, v2, v1) + 1.0) / 2.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_frag_nvaryiconst_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_frag_nvaryiconst_ref.frag
new file mode 100644
index 000000000..5b5b2fd3e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_frag_nvaryiconst_ref.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ float v1 = (color.g * 2.0) - 1.0;
+ float v2 = (color.b * 2.0) - 1.0;
+
+ if(dot(v1, v2) >= 0.0) v1 *= -1.0;
+ gl_FragColor = vec4((v1 + 1.0) / 2.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_vert_nvaryiconst.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_vert_nvaryiconst.vert
new file mode 100644
index 000000000..77d5d796e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_vert_nvaryiconst.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ float v1 = (gtf_Color.g * 2.0) - 1.0;
+ float v2 = (gtf_Color.b * 2.0) - 1.0;
+
+ color = vec4((faceforward(v1, v2, v1) + 1.0) / 2.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_vert_nvaryiconst_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_vert_nvaryiconst_ref.vert
new file mode 100644
index 000000000..0e1d365b3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_vert_nvaryiconst_ref.vert
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ float v1 = (gtf_Color.g * 2.0) - 1.0;
+ float v2 = (gtf_Color.b * 2.0) - 1.0;
+
+ if(dot(v1, v2) >= 0.0) v1 *= -1.0;
+ color = vec4((v1 + 1.0) / 2.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_frag_nvaryiconst.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_frag_nvaryiconst.frag
new file mode 100644
index 000000000..ec0f1c2f3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_frag_nvaryiconst.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec2 v1;
+ vec2 v2 = normalize(vec2(1.0, 1.0));
+
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+
+ gl_FragColor = vec4((faceforward(v1, v2, v1) + 1.0) / 2.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_frag_nvaryiconst_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_frag_nvaryiconst_ref.frag
new file mode 100644
index 000000000..a50f45485
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_frag_nvaryiconst_ref.frag
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec2 v1;
+ vec2 v2 = normalize(vec2(1.0, 1.0));
+
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+
+ if(dot(v1, v2) >= 0.0) v1 *= -1.0;
+ gl_FragColor = vec4((v1 + 1.0) / 2.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_vert_nvaryiconst.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_vert_nvaryiconst.vert
new file mode 100644
index 000000000..80d186c97
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_vert_nvaryiconst.vert
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec2 v1;
+ vec2 v2 = normalize(vec2(1.0, 1.0));
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+
+ color = vec4((faceforward(v1, v2, v1) + 1.0) / 2.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_vert_nvaryiconst_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_vert_nvaryiconst_ref.vert
new file mode 100644
index 000000000..41a04ef60
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_vert_nvaryiconst_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec2 v1;
+ vec2 v2 = normalize(vec2(1.0, 1.0));
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+
+ if(dot(v1, v2) >= 0.0) v1 *= -1.0;
+ color = vec4((v1 + 1.0) / 2.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_frag_nvaryiconst.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_frag_nvaryiconst.frag
new file mode 100644
index 000000000..5db1d0fc5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_frag_nvaryiconst.frag
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = normalize(vec3(1.0, 1.0, 1.0));
+
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ gl_FragColor = vec4((faceforward(v1, v2, v1) + 1.0) / 2.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_frag_nvaryiconst_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_frag_nvaryiconst_ref.frag
new file mode 100644
index 000000000..fb68855f7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_frag_nvaryiconst_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = normalize(vec3(1.0, 1.0, 1.0));
+
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ if(dot(v1, v2) >= 0.0) v1 *= -1.0;
+ gl_FragColor = vec4((v1 + 1.0) / 2.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_vert_nvaryiconst.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_vert_nvaryiconst.vert
new file mode 100644
index 000000000..a745681dd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_vert_nvaryiconst.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = normalize(vec3(1.0, 1.0, 1.0));
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ color = vec4((faceforward(v1, v2, v1) + 1.0) / 2.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_vert_nvaryiconst_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_vert_nvaryiconst_ref.vert
new file mode 100644
index 000000000..d08a74620
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_vert_nvaryiconst_ref.vert
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = normalize(vec3(1.0, 1.0, 1.0));
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ if(dot(v1, v2) >= 0.0) v1 *= -1.0;
+ color = vec4((v1 + 1.0) / 2.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/input.run.txt
new file mode 100644
index 000000000..4107e6397
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+faceforward_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_001_to_006.html
new file mode 100644
index 000000000..cfda6296a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: floor_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "floor_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "floor_float_frag_xvary.frag"
+ },
+ "name": "floor_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "floor_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "floor_vec2_frag_xvary.frag"
+ },
+ "name": "floor_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "floor_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "floor_vec3_frag_xvary.frag"
+ },
+ "name": "floor_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "floor_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "floor_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "floor_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "floor_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "floor_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "floor_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "floor_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "floor_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "floor_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_frag_xvary.frag
new file mode 100644
index 000000000..3f9188418
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4((floor(c) + 10.0) / 20.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..11ec5e6e2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_frag_xvary_ref.frag
@@ -0,0 +1,44 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float floor_ref(float x)
+{
+ if(x >= 0.0)
+ x = float(int(x));
+ else
+ x = float(int(x) - 1);
+ return x;
+}
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4((floor_ref(c) + 10.0) / 20.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_vert_xvary.vert
new file mode 100644
index 000000000..1ed8d39c6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (gtf_Color.r - 0.5);
+ color = vec4((floor(c) + 10.0) / 20.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..5be14322e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_vert_xvary_ref.vert
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+float floor_ref(float x)
+{
+ if(x >= 0.0)
+ x = float(int(x));
+ else
+ x = float(int(x) - 1);
+ return x;
+}
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (gtf_Color.r - 0.5);
+ color = vec4((floor_ref(c) + 10.0) / 20.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_frag_xvary.frag
new file mode 100644
index 000000000..1a56a4fcf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4((floor(c) + 10.0) / 20.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..f8aba8d5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_frag_xvary_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+vec2 floor_ref(vec2 x)
+{
+ if(x[0] >= 0.0)
+ x[0] = float(int(x[0]));
+ else
+ x[0] = float(int(x[0]) - 1);
+ if(x[1] >= 0.0)
+ x[1] = float(int(x[1]));
+ else
+ x[1] = float(int(x[1]) - 1);
+ return x;
+}
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4((floor_ref(c) + 10.0) / 20.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_vert_xvary.vert
new file mode 100644
index 000000000..c977d879b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4((floor(c) + 10.0) / 20.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..232d5fee3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_vert_xvary_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+vec2 floor_ref(vec2 x)
+{
+ if(x[0] >= 0.0)
+ x[0] = float(int(x[0]));
+ else
+ x[0] = float(int(x[0]) - 1);
+ if(x[1] >= 0.0)
+ x[1] = float(int(x[1]));
+ else
+ x[1] = float(int(x[1]) - 1);
+ return x;
+}
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4((floor_ref(c) + 10.0) / 20.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_frag_xvary.frag
new file mode 100644
index 000000000..bb7f72018
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4((floor(c) + 10.0) / 20.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..1209631ef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_frag_xvary_ref.frag
@@ -0,0 +1,52 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+vec3 floor_ref(vec3 x)
+{
+ if(x[0] >= 0.0)
+ x[0] = float(int(x[0]));
+ else
+ x[0] = float(int(x[0]) - 1);
+ if(x[1] >= 0.0)
+ x[1] = float(int(x[1]));
+ else
+ x[1] = float(int(x[1]) - 1);
+ if(x[2] >= 0.0)
+ x[2] = float(int(x[2]));
+ else
+ x[2] = float(int(x[2]) - 1);
+ return x;
+}
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4((floor_ref(c) + 10.0) / 20.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_vert_xvary.vert
new file mode 100644
index 000000000..febeb930c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4((floor(c) + 10.0) / 20.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..247aa1aa3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_vert_xvary_ref.vert
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+vec3 floor_ref(vec3 x)
+{
+ if(x[0] >= 0.0)
+ x[0] = float(int(x[0]));
+ else
+ x[0] = float(int(x[0]) - 1);
+ if(x[1] >= 0.0)
+ x[1] = float(int(x[1]));
+ else
+ x[1] = float(int(x[1]) - 1);
+ if(x[2] >= 0.0)
+ x[2] = float(int(x[2]));
+ else
+ x[2] = float(int(x[2]) - 1);
+ return x;
+}
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4((floor_ref(c) + 10.0) / 20.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/input.run.txt
new file mode 100644
index 000000000..337787db8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+floor_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_001_to_006.html
new file mode 100644
index 000000000..3c38469b4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: fract_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "fract_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "fract_float_frag_xvary.frag"
+ },
+ "name": "fract_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "fract_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "fract_vec2_frag_xvary.frag"
+ },
+ "name": "fract_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "fract_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "fract_vec3_frag_xvary.frag"
+ },
+ "name": "fract_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "fract_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "fract_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "fract_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "fract_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "fract_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "fract_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "fract_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "fract_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "fract_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_frag_xvary.frag
new file mode 100644
index 000000000..8ad6c92f9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (color.r - 0.5);
+ c = abs(fract(c) - 0.5) * 2.0;
+ gl_FragColor = vec4(c, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..2105d7fcd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_frag_xvary_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (color.r - 0.5);
+ c = abs((c - floor(c)) - 0.5) * 2.0;
+ gl_FragColor = vec4(c, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_vert_xvary.vert
new file mode 100644
index 000000000..8724037ff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (gtf_Color.r - 0.5);
+ c = abs(fract(c) - 0.5) * 2.0;
+ color = vec4(c, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..773fd7904
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_vert_xvary_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (gtf_Color.r - 0.5);
+ c = abs((c - floor(c)) - 0.5) * 2.0;
+ color = vec4(c, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_frag_xvary.frag
new file mode 100644
index 000000000..6d9e3fa0b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (color.rg - 0.5);
+ c = abs(fract(c) - 0.5) * 2.0;
+ gl_FragColor = vec4(c, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..222b2e96f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_frag_xvary_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (color.rg - 0.5);
+ c = abs((c - floor(c)) - 0.5) * 2.0;
+ gl_FragColor = vec4(c, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_vert_xvary.vert
new file mode 100644
index 000000000..bb8acce36
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (gtf_Color.rg - 0.5);
+ c = abs(fract(c) - 0.5) * 2.0;
+ color = vec4(c, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..31546ff4a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_vert_xvary_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (gtf_Color.rg - 0.5);
+ c = abs((c - floor(c)) - 0.5) * 2.0;
+ color = vec4(c, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_frag_xvary.frag
new file mode 100644
index 000000000..bf409a7a0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (color.rgb - 0.5);
+ c = abs(fract(c) - 0.5) * 2.0;
+ gl_FragColor = vec4(c, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..8a6842303
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_frag_xvary_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (color.rgb - 0.5);
+ c = abs((c - floor(c)) - 0.5) * 2.0;
+ gl_FragColor = vec4(c, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_vert_xvary.vert
new file mode 100644
index 000000000..2d83b0348
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ c = abs(fract(c) - 0.5) * 2.0;
+ color = vec4(c, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..5092c8533
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_vert_xvary_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ c = abs((c - floor(c)) - 0.5) * 2.0;
+ color = vec4(c, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/input.run.txt
new file mode 100644
index 000000000..74ccc68b5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+fract_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/array_float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/array_float_frag.frag
new file mode 100644
index 000000000..f92c81a01
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/array_float_frag.frag
@@ -0,0 +1,102 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+
+
+void qualifiers(in float a[4], out float b[4], inout float c[4], const in float d[4], float e[4])
+{
+ b[0] = a[0];
+ c[0] += d[0];
+ a[0] += 1.0;
+ e[0] += 1.0;
+
+ b[1] = a[1];
+ c[1] += d[1];
+ a[1] += 1.0;
+ e[1] += 1.0;
+
+ b[2] = a[2];
+ c[2] += d[2];
+ a[2] += 1.0;
+ e[2] += 1.0;
+
+ b[3] = a[3];
+ c[3] += d[3];
+ a[3] += 1.0;
+ e[3] += 1.0;
+}
+
+
+
+void main (void)
+{
+ float a[4];
+ float b[4];
+ float c[4];
+ float d[4];
+ float e[4];
+ float q = 0.0;
+ float q2 = 0.0;
+
+ a[0] = 1.0;
+ b[0] = 2.0;
+ c[0] = 3.0;
+ d[0] = 4.0;
+ e[0] = 1.0;
+
+ a[1] = 1.0;
+ b[1] = 2.0;
+ c[1] = 3.0;
+ d[1] = 4.0;
+ e[1] = 1.0;
+
+ a[2] = 1.0;
+ b[2] = 2.0;
+ c[2] = 3.0;
+ d[2] = 4.0;
+ e[2] = 1.0;
+
+ a[3] = 1.0;
+ b[3] = 2.0;
+ c[3] = 3.0;
+ d[3] = 4.0;
+ e[3] = 1.0;
+
+ qualifiers(a, b, c, d, e);
+
+ // randomly test a value
+ if(a[0] == 1.0) q += 1.0;
+ if(b[1] == 1.0) q += 2.0;
+ if(c[2] == 7.0) q += 4.0;
+ if(d[3] == 4.0) q2 += 1.0;
+ if(e[0] == 1.0) q2 += 2.0;
+
+ gl_FragColor = vec4(vec2(q / 7.0, q2 / 3.0), 1.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/array_float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/array_float_vert.vert
new file mode 100644
index 000000000..671012944
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/array_float_vert.vert
@@ -0,0 +1,103 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+
+
+void qualifiers(in float a[4], out float b[4], inout float c[4], const in float d[4], float e[4])
+{
+ b[0] = a[0];
+ c[0] += d[0];
+ a[0] += 1.0;
+ e[0] += 1.0;
+
+ b[1] = a[1];
+ c[1] += d[1];
+ a[1] += 1.0;
+ e[1] += 1.0;
+
+ b[2] = a[2];
+ c[2] += d[2];
+ a[2] += 1.0;
+ e[2] += 1.0;
+
+ b[3] = a[3];
+ c[3] += d[3];
+ a[3] += 1.0;
+ e[3] += 1.0;
+}
+
+
+
+
+void main (void)
+{
+ float a[4];
+ float b[4];
+ float c[4];
+ float d[4];
+ float e[4];
+ float q = 0.0;
+ float q2 = 0.0;
+
+ a[0] = 1.0;
+ b[0] = 2.0;
+ c[0] = 3.0;
+ d[0] = 4.0;
+ e[0] = 1.0;
+
+ a[1] = 1.0;
+ b[1] = 2.0;
+ c[1] = 3.0;
+ d[1] = 4.0;
+ e[1] = 1.0;
+
+ a[2] = 1.0;
+ b[2] = 2.0;
+ c[2] = 3.0;
+ d[2] = 4.0;
+ e[2] = 1.0;
+
+ a[3] = 1.0;
+ b[3] = 2.0;
+ c[3] = 3.0;
+ d[3] = 4.0;
+ e[3] = 1.0;
+
+ qualifiers(a, b, c, d, e);
+
+ // randomly test a value
+ if(a[0] == 1.0) q += 1.0;
+ if(b[1] == 1.0) q += 2.0;
+ if(c[2] == 7.0) q += 4.0;
+ if(d[3] == 4.0) q2 += 1.0;
+ if(e[0] == 1.0) q2 += 2.0;
+
+ color = vec4(vec2(q / 7.0, q2 / 3.0), 1.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_array_frag.frag
new file mode 100644
index 000000000..6ba41dea0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_array_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+bool function(bool par[3]);
+bool is_all(const in bool array[3], const in bool value);
+void set_all(out bool array[3], const in bool value);
+
+void main (void)
+{
+ bool par[3];
+ bool ret = false;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, true);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(is_all(par, true) && ret)
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+bool function(bool par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, true))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return true;
+ }
+ else
+ return false;
+}
+
+bool is_all(const in bool array[3], const in bool value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bool array[3], const in bool value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_array_vert.vert
new file mode 100644
index 000000000..3d643b152
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_array_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+bool function(bool par[3]);
+bool is_all(const in bool array[3], const in bool value);
+void set_all(out bool array[3], const in bool value);
+
+void main (void)
+{
+ bool par[3];
+ bool ret = false;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, true);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(is_all(par, true) && ret)
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+bool function(bool par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, true))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return true;
+ }
+ else
+ return false;
+}
+
+bool is_all(const in bool array[3], const in bool value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bool array[3], const in bool value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_frag.frag
new file mode 100644
index 000000000..900dbd263
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_frag.frag
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+bool function(bool par);
+
+void main (void)
+{
+ bool par = true;
+ bool ret = false;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(par && ret)
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+bool function(bool par)
+{
+ // Return the value of the parameter.
+ if(par)
+ {
+ // Test parameter qualifier (default is "in").
+ par = false;
+
+ return true;
+ }
+ else
+ return false;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_vert.vert
new file mode 100644
index 000000000..bbf763e94
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_vert.vert
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+bool function(bool par);
+
+void main (void)
+{
+ bool par = true;
+ bool ret = false;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(par && ret)
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+bool function(bool par)
+{
+ // Return the value of the parameter.
+ if(par)
+ {
+ // Test parameter qualifier (default is "in").
+ par = false;
+
+ return true;
+ }
+ else
+ return false;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_array_frag.frag
new file mode 100644
index 000000000..1d08ca5e0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_array_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+bool function(in bool par[3]);
+bool is_all(const in bool array[3], const in bool value);
+void set_all(out bool array[3], const in bool value);
+
+void main (void)
+{
+ bool par[3];
+ bool ret = false;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, true);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(is_all(par, true) && ret)
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+bool function(in bool par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, true))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return true;
+ }
+ else
+ return false;
+}
+
+bool is_all(const in bool array[3], const in bool value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bool array[3], const in bool value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_array_vert.vert
new file mode 100644
index 000000000..f8b3ec065
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_array_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+bool function(in bool par[3]);
+bool is_all(const in bool array[3], const in bool value);
+void set_all(out bool array[3], const in bool value);
+
+void main (void)
+{
+ bool par[3];
+ bool ret = false;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, true);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(is_all(par, true) && ret)
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+bool function(in bool par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, true))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return true;
+ }
+ else
+ return false;
+}
+
+bool is_all(const in bool array[3], const in bool value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bool array[3], const in bool value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_empty_frag.frag
new file mode 100644
index 000000000..bfc49e26f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_empty_frag.frag
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+bool function(in bool par);
+
+void main (void)
+{
+ bool par = true;
+ bool ret = false;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(par && ret)
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+bool function(in bool par)
+{
+ // Return the value of the parameter.
+ if(par)
+ {
+ // Test parameter qualifier (default is "in").
+ par = false;
+
+ return true;
+ }
+ else
+ return false;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_empty_vert.vert
new file mode 100644
index 000000000..a2d51b77d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_empty_vert.vert
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+bool function(in bool par);
+
+void main (void)
+{
+ bool par = true;
+ bool ret = false;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(par && ret)
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+bool function(in bool par)
+{
+ // Return the value of the parameter.
+ if(par)
+ {
+ // Test parameter qualifier (default is "in").
+ par = false;
+
+ return true;
+ }
+ else
+ return false;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_array_frag.frag
new file mode 100644
index 000000000..51adf2723
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_array_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+bool function(inout bool par[3]);
+bool is_all(const in bool array[3], const in bool value);
+void set_all(out bool array[3], const in bool value);
+
+void main (void)
+{
+ bool par[3];
+ bool ret = false;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, true);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, false) && ret)
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+bool function(inout bool par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, true))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return true;
+ }
+ else
+ return false;
+}
+
+bool is_all(const in bool array[3], const in bool value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bool array[3], const in bool value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_array_vert.vert
new file mode 100644
index 000000000..43429dc94
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_array_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+bool function(inout bool par[3]);
+bool is_all(const in bool array[3], const in bool value);
+void set_all(out bool array[3], const in bool value);
+
+void main (void)
+{
+ bool par[3];
+ bool ret = false;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, true);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, false) && ret)
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+bool function(inout bool par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, true))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return true;
+ }
+ else
+ return false;
+}
+
+bool is_all(const in bool array[3], const in bool value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bool array[3], const in bool value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_frag.frag
new file mode 100644
index 000000000..af091de6b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_frag.frag
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+bool function(inout bool par);
+
+void main (void)
+{
+ bool par = true;
+ bool ret = false;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(!par && ret)
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+bool function(inout bool par)
+{
+ // Return the value of the parameter.
+ if(par)
+ {
+ // Test parameter qualifier (default is "in").
+ par = false;
+
+ return true;
+ }
+ else
+ return false;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_vert.vert
new file mode 100644
index 000000000..41552dfee
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_vert.vert
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+bool function(inout bool par);
+
+void main (void)
+{
+ bool par = true;
+ bool ret = false;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(!par && ret)
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+bool function(inout bool par)
+{
+ // Return the value of the parameter.
+ if(par)
+ {
+ // Test parameter qualifier (default is "in").
+ par = false;
+
+ return true;
+ }
+ else
+ return false;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_array_frag.frag
new file mode 100644
index 000000000..10df063d0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_array_frag.frag
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+bool function(out bool par[3]);
+bool is_all(const in bool array[3], const in bool value);
+void set_all(out bool array[3], const in bool value);
+
+void main (void)
+{
+ bool par[3];
+ bool ret = false;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, true);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, false) && ret)
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+bool function(out bool par[3])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return true;
+}
+
+bool is_all(const in bool array[3], const in bool value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bool array[3], const in bool value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_array_vert.vert
new file mode 100644
index 000000000..85615ac68
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_array_vert.vert
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+bool function(out bool par[3]);
+bool is_all(const in bool array[3], const in bool value);
+void set_all(out bool array[3], const in bool value);
+
+void main (void)
+{
+ bool par[3];
+ bool ret = false;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, true);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, false) && ret)
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+bool function(out bool par[3])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return true;
+}
+
+bool is_all(const in bool array[3], const in bool value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bool array[3], const in bool value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_empty_frag.frag
new file mode 100644
index 000000000..0a67173a2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_empty_frag.frag
@@ -0,0 +1,59 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+bool function(out bool par);
+
+void main (void)
+{
+ bool par = true;
+ bool ret = false;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(!par && ret)
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+bool function(out bool par)
+{
+ // Test parameter qualifier (default is "in").
+ par = false;
+
+ return true;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_empty_vert.vert
new file mode 100644
index 000000000..92a46a908
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_empty_vert.vert
@@ -0,0 +1,59 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+bool function(out bool par);
+
+void main (void)
+{
+ bool par = true;
+ bool ret = false;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(!par && ret)
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+bool function(out bool par)
+{
+ // Test parameter qualifier (default is "in").
+ par = false;
+
+ return true;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_frag.frag
new file mode 100644
index 000000000..f8a77b898
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_frag.frag
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+bvec4 function(bvec4 par[3]);
+bool is_all(const in bvec4 par, const in bool value);
+bool is_all(const in bvec4 array[3], const in bvec4 value);
+void set_all(out bvec4 array[3], const in bvec4 value);
+
+void main (void)
+{
+ bvec4 par[3];
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, bvec4(true, true, true, true));
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(is_all(par, bvec4(true, true, true, true)) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+bvec4 function(bvec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, bvec4(true, true, true, true)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, bvec4(false, false, false, false));
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in bvec4 array[3], const in bvec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 array[3], const in bvec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_vert.vert
new file mode 100644
index 000000000..0dbbca022
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_vert.vert
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+bvec4 function(bvec4 par[3]);
+bool is_all(const in bvec4 par, const in bool value);
+bool is_all(const in bvec4 array[3], const in bvec4 value);
+void set_all(out bvec4 array[3], const in bvec4 value);
+
+void main (void)
+{
+ bvec4 par[3];
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, bvec4(true, true, true, true));
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(is_all(par, bvec4(true, true, true, true)) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+bvec4 function(bvec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, bvec4(true, true, true, true)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, bvec4(false, false, false, false));
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in bvec4 array[3], const in bvec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 array[3], const in bvec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_frag.frag
new file mode 100644
index 000000000..d2f5c7e29
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+bvec4 function(bvec4 par);
+bool is_all(const in bvec4 par, const in bool value);
+void set_all(out bvec4 par, const in bool value);
+
+void main (void)
+{
+ bvec4 par = bvec4(true, true, true, true);
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(is_all(par, true) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+bvec4 function(bvec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, true))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 par, const in bool value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_vert.vert
new file mode 100644
index 000000000..e3354f23b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+bvec4 function(bvec4 par);
+bool is_all(const in bvec4 par, const in bool value);
+void set_all(out bvec4 par, const in bool value);
+
+void main (void)
+{
+ bvec4 par = bvec4(true, true, true, true);
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(is_all(par, true) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+bvec4 function(bvec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, true))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 par, const in bool value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_frag.frag
new file mode 100644
index 000000000..f4479e680
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_frag.frag
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+bvec4 function(in bvec4 par[3]);
+bool is_all(const in bvec4 par, const in bool value);
+bool is_all(const in bvec4 array[3], const in bvec4 value);
+void set_all(out bvec4 array[3], const in bvec4 value);
+
+void main (void)
+{
+ bvec4 par[3];
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, bvec4(true, true, true, true));
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(is_all(par, bvec4(true, true, true, true)) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+bvec4 function(in bvec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, bvec4(true, true, true, true)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, bvec4(false, false, false, false));
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in bvec4 array[3], const in bvec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 array[3], const in bvec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_vert.vert
new file mode 100644
index 000000000..ae5dde803
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_vert.vert
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+bvec4 function(in bvec4 par[3]);
+bool is_all(const in bvec4 par, const in bool value);
+bool is_all(const in bvec4 array[3], const in bvec4 value);
+void set_all(out bvec4 array[3], const in bvec4 value);
+
+void main (void)
+{
+ bvec4 par[3];
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, bvec4(true, true, true, true));
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(is_all(par, bvec4(true, true, true, true)) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+bvec4 function(in bvec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, bvec4(true, true, true, true)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, bvec4(false, false, false, false));
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in bvec4 array[3], const in bvec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 array[3], const in bvec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_frag.frag
new file mode 100644
index 000000000..a13cee3ab
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+bvec4 function(in bvec4 par);
+bool is_all(const in bvec4 par, const in bool value);
+void set_all(out bvec4 par, const in bool value);
+
+void main (void)
+{
+ bvec4 par = bvec4(true, true, true, true);
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(is_all(par, true) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+bvec4 function(in bvec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, true))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 par, const in bool value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_vert.vert
new file mode 100644
index 000000000..b919bf6b8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+bvec4 function(in bvec4 par);
+bool is_all(const in bvec4 par, const in bool value);
+void set_all(out bvec4 par, const in bool value);
+
+void main (void)
+{
+ bvec4 par = bvec4(true, true, true, true);
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return true.
+ if(is_all(par, true) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+bvec4 function(in bvec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, true))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 par, const in bool value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_frag.frag
new file mode 100644
index 000000000..e61a00534
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_frag.frag
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+bvec4 function(inout bvec4 par[3]);
+bool is_all(const in bvec4 par, const in bool value);
+bool is_all(const in bvec4 array[3], const in bvec4 value);
+void set_all(out bvec4 array[3], const in bvec4 value);
+
+void main (void)
+{
+ bvec4 par[3];
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, bvec4(true, true, true, true));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, bvec4(false, false, false, false)) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+bvec4 function(inout bvec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, bvec4(true, true, true, true)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, bvec4(false, false, false, false));
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in bvec4 array[3], const in bvec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 array[3], const in bvec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_vert.vert
new file mode 100644
index 000000000..710ff576a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_vert.vert
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+bvec4 function(inout bvec4 par[3]);
+bool is_all(const in bvec4 par, const in bool value);
+bool is_all(const in bvec4 array[3], const in bvec4 value);
+void set_all(out bvec4 array[3], const in bvec4 value);
+
+void main (void)
+{
+ bvec4 par[3];
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, bvec4(true, true, true, true));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, bvec4(false, false, false, false)) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+bvec4 function(inout bvec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, bvec4(true, true, true, true)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, bvec4(false, false, false, false));
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in bvec4 array[3], const in bvec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 array[3], const in bvec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_frag.frag
new file mode 100644
index 000000000..5a114e9be
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_frag.frag
@@ -0,0 +1,129 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+bvec4 function(inout bvec4 par[10]);
+bool is_all(const in bvec4 par, const in bool value);
+bool is_all(const in bvec4 array[10], const in bvec4 value);
+void set_all(out bvec4 array[10], const in bvec4 value);
+
+void main (void)
+{
+ bvec4 par[10];
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, bvec4(true, true, true, true));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, bvec4(false, false, false, false)) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+bvec4 function(inout bvec4 par[10])
+{
+ // Return the value of the array.
+ if(is_all(par, bvec4(true, true, true, true)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, bvec4(false, false, false, false));
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in bvec4 array[10], const in bvec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+ if(array[3] != value)
+ ret = false;
+ if(array[4] != value)
+ ret = false;
+ if(array[5] != value)
+ ret = false;
+ if(array[6] != value)
+ ret = false;
+ if(array[7] != value)
+ ret = false;
+ if(array[8] != value)
+ ret = false;
+ if(array[9] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 array[10], const in bvec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+ array[3] = value;
+ array[4] = value;
+ array[5] = value;
+ array[6] = value;
+ array[7] = value;
+ array[8] = value;
+ array[9] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_vert.vert
new file mode 100644
index 000000000..92f5db9a4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_vert.vert
@@ -0,0 +1,129 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+bvec4 function(inout bvec4 par[10]);
+bool is_all(const in bvec4 par, const in bool value);
+bool is_all(const in bvec4 array[10], const in bvec4 value);
+void set_all(out bvec4 array[10], const in bvec4 value);
+
+void main (void)
+{
+ bvec4 par[10];
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, bvec4(true, true, true, true));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, bvec4(false, false, false, false)) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+bvec4 function(inout bvec4 par[10])
+{
+ // Return the value of the array.
+ if(is_all(par, bvec4(true, true, true, true)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, bvec4(false, false, false, false));
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in bvec4 array[10], const in bvec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+ if(array[3] != value)
+ ret = false;
+ if(array[4] != value)
+ ret = false;
+ if(array[5] != value)
+ ret = false;
+ if(array[6] != value)
+ ret = false;
+ if(array[7] != value)
+ ret = false;
+ if(array[8] != value)
+ ret = false;
+ if(array[9] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 array[10], const in bvec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+ array[3] = value;
+ array[4] = value;
+ array[5] = value;
+ array[6] = value;
+ array[7] = value;
+ array[8] = value;
+ array[9] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_frag.frag
new file mode 100644
index 000000000..e1f4a1f91
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+bvec4 function(inout bvec4 par);
+bool is_all(const in bvec4 par, const in bool value);
+void set_all(out bvec4 par, const in bool value);
+
+void main (void)
+{
+ bvec4 par = bvec4(true, true, true, true);
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, false) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+bvec4 function(inout bvec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, true))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 par, const in bool value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_vert.vert
new file mode 100644
index 000000000..4f8820bc4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+bvec4 function(inout bvec4 par);
+bool is_all(const in bvec4 par, const in bool value);
+void set_all(out bvec4 par, const in bool value);
+
+void main (void)
+{
+ bvec4 par = bvec4(true, true, true, true);
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, false) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+bvec4 function(inout bvec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, true))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return bvec4(true, true, true, true);
+ }
+ else
+ return bvec4(false, false, false, false);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 par, const in bool value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_frag.frag
new file mode 100644
index 000000000..e3f50a63f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_frag.frag
@@ -0,0 +1,102 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+bvec4 function(out bvec4 par[3]);
+bool is_all(const in bvec4 par, const in bool value);
+bool is_all(const in bvec4 array[3], const in bvec4 value);
+void set_all(out bvec4 array[3], const in bvec4 value);
+
+void main (void)
+{
+ bvec4 par[3];
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, bvec4(true, true, true, true));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, bvec4(false, false, false, false)) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+bvec4 function(out bvec4 par[3])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, bvec4(false, false, false, false));
+
+ return bvec4(true, true, true, true);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in bvec4 array[3], const in bvec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 array[3], const in bvec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_vert.vert
new file mode 100644
index 000000000..b64a447b1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_vert.vert
@@ -0,0 +1,102 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+bvec4 function(out bvec4 par[3]);
+bool is_all(const in bvec4 par, const in bool value);
+bool is_all(const in bvec4 array[3], const in bvec4 value);
+void set_all(out bvec4 array[3], const in bvec4 value);
+
+void main (void)
+{
+ bvec4 par[3];
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to true.
+ set_all(par, bvec4(true, true, true, true));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, bvec4(false, false, false, false)) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+bvec4 function(out bvec4 par[3])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, bvec4(false, false, false, false));
+
+ return bvec4(true, true, true, true);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in bvec4 array[3], const in bvec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 array[3], const in bvec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_frag.frag
new file mode 100644
index 000000000..1f9236200
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_frag.frag
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+bvec4 function(out bvec4 par);
+bool is_all(const in bvec4 par, const in bool value);
+void set_all(out bvec4 par, const in bool value);
+
+void main (void)
+{
+ bvec4 par = bvec4(true, true, true, true);
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, false) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+bvec4 function(out bvec4 par)
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return bvec4(true, true, true, true);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 par, const in bool value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_vert.vert
new file mode 100644
index 000000000..99c318fe7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_vert.vert
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+bvec4 function(out bvec4 par);
+bool is_all(const in bvec4 par, const in bool value);
+void set_all(out bvec4 par, const in bool value);
+
+void main (void)
+{
+ bvec4 par = bvec4(true, true, true, true);
+ bvec4 ret = bvec4(false, false, false, false);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return true.
+ if(is_all(par, false) && is_all(ret, true))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+bvec4 function(out bvec4 par)
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, false);
+
+ return bvec4(true, true, true, true);
+}
+
+bool is_all(const in bvec4 par, const in bool value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out bvec4 par, const in bool value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_array_frag.frag
new file mode 100644
index 000000000..b3a130eec
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_array_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+float function(float par[3]);
+bool is_all(const in float array[3], const in float value);
+void set_all(out float array[3], const in float value);
+
+void main (void)
+{
+ float par[3];
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, 1.0);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, 1.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+float function(float par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return 1.0;
+ }
+ else
+ return 0.0;
+}
+
+bool is_all(const in float array[3], const in float value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out float array[3], const in float value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_array_vert.vert
new file mode 100644
index 000000000..4763c1ad8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_array_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+float function(float par[3]);
+bool is_all(const in float array[3], const in float value);
+void set_all(out float array[3], const in float value);
+
+void main (void)
+{
+ float par[3];
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, 1.0);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, 1.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+float function(float par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return 1.0;
+ }
+ else
+ return 0.0;
+}
+
+bool is_all(const in float array[3], const in float value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out float array[3], const in float value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_empty_frag.frag
new file mode 100644
index 000000000..51d735717
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_empty_frag.frag
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+float function(float par);
+
+void main (void)
+{
+ float par = 1.0;
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if((par == 1.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+float function(float par)
+{
+ // Return the value of the parameter.
+ if(par == 1.0)
+ {
+ // Test parameter qualifier (default is "in").
+ par = 0.0;
+
+ return 1.0;
+ }
+ else
+ return 0.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_empty_vert.vert
new file mode 100644
index 000000000..f41995b3e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_empty_vert.vert
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+float function(float par);
+
+void main (void)
+{
+ float par = 1.0;
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if((par == 1.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+float function(float par)
+{
+ // Return the value of the parameter.
+ if(par == 1.0)
+ {
+ // Test parameter qualifier (default is "in").
+ par = 0.0;
+
+ return 1.0;
+ }
+ else
+ return 0.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_array_frag.frag
new file mode 100644
index 000000000..33e0ab611
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_array_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+float function(in float par[3]);
+bool is_all(const in float array[3], const in float value);
+void set_all(out float array[3], const in float value);
+
+void main (void)
+{
+ float par[3];
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, 1.0);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, 1.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+float function(in float par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return 1.0;
+ }
+ else
+ return 0.0;
+}
+
+bool is_all(const in float array[3], const in float value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out float array[3], const in float value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_array_vert.vert
new file mode 100644
index 000000000..a685e7345
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_array_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+float function(in float par[3]);
+bool is_all(const in float array[3], const in float value);
+void set_all(out float array[3], const in float value);
+
+void main (void)
+{
+ float par[3];
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, 1.0);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, 1.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+float function(in float par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return 1.0;
+ }
+ else
+ return 0.0;
+}
+
+bool is_all(const in float array[3], const in float value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out float array[3], const in float value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_empty_frag.frag
new file mode 100644
index 000000000..09870afe5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_empty_frag.frag
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+float function(in float par);
+
+void main (void)
+{
+ float par = 1.0;
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if((par == 1.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+float function(in float par)
+{
+ // Return the value of the parameter.
+ if(par == 1.0)
+ {
+ // Test parameter qualifier (default is "in").
+ par = 0.0;
+
+ return 1.0;
+ }
+ else
+ return 0.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_empty_vert.vert
new file mode 100644
index 000000000..f1f47f303
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_empty_vert.vert
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+float function(in float par);
+
+void main (void)
+{
+ float par = 1.0;
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if((par == 1.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+float function(in float par)
+{
+ // Return the value of the parameter.
+ if(par == 1.0)
+ {
+ // Test parameter qualifier (default is "in").
+ par = 0.0;
+
+ return 1.0;
+ }
+ else
+ return 0.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_array_frag.frag
new file mode 100644
index 000000000..fd0fa1096
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_array_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+float function(inout float par[3]);
+bool is_all(const in float array[3], const in float value);
+void set_all(out float array[3], const in float value);
+
+void main (void)
+{
+ float par[3];
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, 1.0);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, 0.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+float function(inout float par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return 1.0;
+ }
+ else
+ return 0.0;
+}
+
+bool is_all(const in float array[3], const in float value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out float array[3], const in float value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_array_vert.vert
new file mode 100644
index 000000000..d4c82f266
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_array_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+float function(inout float par[3]);
+bool is_all(const in float array[3], const in float value);
+void set_all(out float array[3], const in float value);
+
+void main (void)
+{
+ float par[3];
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, 1.0);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, 0.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+float function(inout float par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return 1.0;
+ }
+ else
+ return 0.0;
+}
+
+bool is_all(const in float array[3], const in float value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out float array[3], const in float value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_empty_frag.frag
new file mode 100644
index 000000000..ce0d3d0c5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_empty_frag.frag
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+float function(inout float par);
+
+void main (void)
+{
+ float par = 1.0;
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if((par == 0.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+float function(inout float par)
+{
+ // Return the value of the parameter.
+ if(par == 1.0)
+ {
+ // Test parameter qualifier (default is "in").
+ par = 0.0;
+
+ return 1.0;
+ }
+ else
+ return 0.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_empty_vert.vert
new file mode 100644
index 000000000..04d063561
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_empty_vert.vert
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+float function(inout float par);
+
+void main (void)
+{
+ float par = 1.0;
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if((par == 0.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+float function(inout float par)
+{
+ // Return the value of the parameter.
+ if(par == 1.0)
+ {
+ // Test parameter qualifier (default is "in").
+ par = 0.0;
+
+ return 1.0;
+ }
+ else
+ return 0.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_array_frag.frag
new file mode 100644
index 000000000..3df819493
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_array_frag.frag
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+float function(out float par[3]);
+bool is_all(const in float array[3], const in float value);
+void set_all(out float array[3], const in float value);
+
+void main (void)
+{
+ float par[3];
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, 1.0);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, 0.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+float function(out float par[3])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return 1.0;
+}
+
+bool is_all(const in float array[3], const in float value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out float array[3], const in float value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_array_vert.vert
new file mode 100644
index 000000000..212f4e846
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_array_vert.vert
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+float function(out float par[3]);
+bool is_all(const in float array[3], const in float value);
+void set_all(out float array[3], const in float value);
+
+void main (void)
+{
+ float par[3];
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, 1.0);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, 0.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+float function(out float par[3])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return 1.0;
+}
+
+bool is_all(const in float array[3], const in float value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out float array[3], const in float value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_empty_frag.frag
new file mode 100644
index 000000000..c0aafb071
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_empty_frag.frag
@@ -0,0 +1,59 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+float function(out float par);
+
+void main (void)
+{
+ float par = 1.0;
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if((par == 0.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+float function(out float par)
+{
+ // Test parameter qualifier (default is "in").
+ par = 0.0;
+
+ return 1.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_empty_vert.vert
new file mode 100644
index 000000000..48837c9f3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_empty_vert.vert
@@ -0,0 +1,59 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+float function(out float par);
+
+void main (void)
+{
+ float par = 1.0;
+ float ret = 0.0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if((par == 0.0) && (ret == 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+float function(out float par)
+{
+ // Test parameter qualifier (default is "in").
+ par = 0.0;
+
+ return 1.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_001_to_008.html
new file mode 100644
index 000000000..ba8d2295f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_001_to_008.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "qualifiers_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "qualifiers_float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "qualifiers_float_frag.frag"
+ },
+ "name": "qualifiers_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "qualifiers_struct_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "qualifiers_struct_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "qualifiers_struct_frag.frag"
+ },
+ "name": "qualifiers_struct_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "array_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "array_float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array_float_frag.frag"
+ },
+ "name": "array_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "void_empty_empty_void_empty_frag.frag"
+ },
+ "name": "void_empty_empty_void_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "void_empty_empty_void_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "void_empty_empty_void_empty_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_009_to_016.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_009_to_016.html
new file mode 100644
index 000000000..e6fe96576
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_009_to_016.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_009_to_016.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bool_empty_empty_bool_empty_frag.frag"
+ },
+ "name": "bool_empty_empty_bool_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bool_empty_empty_bool_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bool_empty_empty_bool_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bool_empty_empty_bool_array_frag.frag"
+ },
+ "name": "bool_empty_empty_bool_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bool_empty_empty_bool_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bool_empty_empty_bool_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bool_empty_in_bool_empty_frag.frag"
+ },
+ "name": "bool_empty_in_bool_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bool_empty_in_bool_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bool_empty_in_bool_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bool_empty_in_bool_array_frag.frag"
+ },
+ "name": "bool_empty_in_bool_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bool_empty_in_bool_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bool_empty_in_bool_array_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_017_to_024.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_017_to_024.html
new file mode 100644
index 000000000..cf8316008
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_017_to_024.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_017_to_024.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bool_empty_inout_bool_empty_frag.frag"
+ },
+ "name": "bool_empty_inout_bool_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bool_empty_inout_bool_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bool_empty_inout_bool_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bool_empty_inout_bool_array_frag.frag"
+ },
+ "name": "bool_empty_inout_bool_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bool_empty_inout_bool_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bool_empty_inout_bool_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bool_empty_out_bool_empty_frag.frag"
+ },
+ "name": "bool_empty_out_bool_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bool_empty_out_bool_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bool_empty_out_bool_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bool_empty_out_bool_array_frag.frag"
+ },
+ "name": "bool_empty_out_bool_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bool_empty_out_bool_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bool_empty_out_bool_array_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html
new file mode 100644
index 000000000..0aa1e4a7b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_025_to_032.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "int_empty_empty_int_empty_frag.frag"
+ },
+ "name": "int_empty_empty_int_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "int_empty_empty_int_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "int_empty_empty_int_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "int_empty_empty_int_array_frag.frag"
+ },
+ "name": "int_empty_empty_int_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "int_empty_empty_int_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "int_empty_empty_int_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "int_empty_in_int_empty_frag.frag"
+ },
+ "name": "int_empty_in_int_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "int_empty_in_int_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "int_empty_in_int_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "int_empty_in_int_array_frag.frag"
+ },
+ "name": "int_empty_in_int_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "int_empty_in_int_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "int_empty_in_int_array_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_033_to_040.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_033_to_040.html
new file mode 100644
index 000000000..7aec3eb9c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_033_to_040.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_033_to_040.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "int_empty_inout_int_empty_frag.frag"
+ },
+ "name": "int_empty_inout_int_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "int_empty_inout_int_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "int_empty_inout_int_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "int_empty_inout_int_array_frag.frag"
+ },
+ "name": "int_empty_inout_int_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "int_empty_inout_int_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "int_empty_inout_int_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "int_empty_out_int_empty_frag.frag"
+ },
+ "name": "int_empty_out_int_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "int_empty_out_int_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "int_empty_out_int_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "int_empty_out_int_array_frag.frag"
+ },
+ "name": "int_empty_out_int_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "int_empty_out_int_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "int_empty_out_int_array_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_041_to_048.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_041_to_048.html
new file mode 100644
index 000000000..85fe75d5b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_041_to_048.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_041_to_048.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "float_empty_empty_float_empty_frag.frag"
+ },
+ "name": "float_empty_empty_float_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "float_empty_empty_float_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "float_empty_empty_float_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "float_empty_empty_float_array_frag.frag"
+ },
+ "name": "float_empty_empty_float_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "float_empty_empty_float_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "float_empty_empty_float_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "float_empty_in_float_empty_frag.frag"
+ },
+ "name": "float_empty_in_float_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "float_empty_in_float_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "float_empty_in_float_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "float_empty_in_float_array_frag.frag"
+ },
+ "name": "float_empty_in_float_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "float_empty_in_float_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "float_empty_in_float_array_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html
new file mode 100644
index 000000000..499c0df41
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_049_to_056.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "float_empty_inout_float_empty_frag.frag"
+ },
+ "name": "float_empty_inout_float_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "float_empty_inout_float_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "float_empty_inout_float_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "float_empty_inout_float_array_frag.frag"
+ },
+ "name": "float_empty_inout_float_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "float_empty_inout_float_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "float_empty_inout_float_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "float_empty_out_float_empty_frag.frag"
+ },
+ "name": "float_empty_out_float_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "float_empty_out_float_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "float_empty_out_float_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "float_empty_out_float_array_frag.frag"
+ },
+ "name": "float_empty_out_float_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "float_empty_out_float_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "float_empty_out_float_array_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_057_to_064.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_057_to_064.html
new file mode 100644
index 000000000..f796f65b5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_057_to_064.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_057_to_064.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bvec4_empty_empty_bvec4_empty_frag.frag"
+ },
+ "name": "bvec4_empty_empty_bvec4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bvec4_empty_empty_bvec4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bvec4_empty_empty_bvec4_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bvec4_empty_empty_bvec4_array_frag.frag"
+ },
+ "name": "bvec4_empty_empty_bvec4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bvec4_empty_empty_bvec4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bvec4_empty_empty_bvec4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bvec4_empty_in_bvec4_empty_frag.frag"
+ },
+ "name": "bvec4_empty_in_bvec4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bvec4_empty_in_bvec4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bvec4_empty_in_bvec4_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bvec4_empty_in_bvec4_array_frag.frag"
+ },
+ "name": "bvec4_empty_in_bvec4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bvec4_empty_in_bvec4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bvec4_empty_in_bvec4_array_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_065_to_072.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_065_to_072.html
new file mode 100644
index 000000000..c1039bd40
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_065_to_072.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_065_to_072.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bvec4_empty_inout_bvec4_empty_frag.frag"
+ },
+ "name": "bvec4_empty_inout_bvec4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bvec4_empty_inout_bvec4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bvec4_empty_inout_bvec4_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bvec4_empty_inout_bvec4_array_frag.frag"
+ },
+ "name": "bvec4_empty_inout_bvec4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bvec4_empty_inout_bvec4_bigarray_frag.frag"
+ },
+ "name": "bvec4_empty_inout_bvec4_bigarray_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bvec4_empty_inout_bvec4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bvec4_empty_inout_bvec4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bvec4_empty_inout_bvec4_bigarray_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bvec4_empty_inout_bvec4_bigarray_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bvec4_empty_out_bvec4_empty_frag.frag"
+ },
+ "name": "bvec4_empty_out_bvec4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bvec4_empty_out_bvec4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bvec4_empty_out_bvec4_empty_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_073_to_080.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_073_to_080.html
new file mode 100644
index 000000000..cd6ecefa5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_073_to_080.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_073_to_080.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bvec4_empty_out_bvec4_array_frag.frag"
+ },
+ "name": "bvec4_empty_out_bvec4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bvec4_empty_out_bvec4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bvec4_empty_out_bvec4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ivec4_empty_empty_ivec4_empty_frag.frag"
+ },
+ "name": "ivec4_empty_empty_ivec4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "ivec4_empty_empty_ivec4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ivec4_empty_empty_ivec4_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ivec4_empty_empty_ivec4_array_frag.frag"
+ },
+ "name": "ivec4_empty_empty_ivec4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "ivec4_empty_empty_ivec4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ivec4_empty_empty_ivec4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ivec4_empty_in_ivec4_empty_frag.frag"
+ },
+ "name": "ivec4_empty_in_ivec4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "ivec4_empty_in_ivec4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ivec4_empty_in_ivec4_empty_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_081_to_088.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_081_to_088.html
new file mode 100644
index 000000000..4acf196d8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_081_to_088.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_081_to_088.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ivec4_empty_in_ivec4_array_frag.frag"
+ },
+ "name": "ivec4_empty_in_ivec4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "ivec4_empty_in_ivec4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ivec4_empty_in_ivec4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ivec4_empty_inout_ivec4_empty_frag.frag"
+ },
+ "name": "ivec4_empty_inout_ivec4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "ivec4_empty_inout_ivec4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ivec4_empty_inout_ivec4_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ivec4_empty_inout_ivec4_array_frag.frag"
+ },
+ "name": "ivec4_empty_inout_ivec4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ivec4_empty_inout_ivec4_bigarray_frag.frag"
+ },
+ "name": "ivec4_empty_inout_ivec4_bigarray_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "ivec4_empty_inout_ivec4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ivec4_empty_inout_ivec4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "ivec4_empty_inout_ivec4_bigarray_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ivec4_empty_inout_ivec4_bigarray_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_089_to_096.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_089_to_096.html
new file mode 100644
index 000000000..4ab869922
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_089_to_096.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_089_to_096.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ivec4_empty_out_ivec4_empty_frag.frag"
+ },
+ "name": "ivec4_empty_out_ivec4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "ivec4_empty_out_ivec4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ivec4_empty_out_ivec4_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ivec4_empty_out_ivec4_array_frag.frag"
+ },
+ "name": "ivec4_empty_out_ivec4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "ivec4_empty_out_ivec4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ivec4_empty_out_ivec4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_empty_empty_vec4_empty_frag.frag"
+ },
+ "name": "vec4_empty_empty_vec4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec4_empty_empty_vec4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_empty_empty_vec4_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_empty_empty_vec4_array_frag.frag"
+ },
+ "name": "vec4_empty_empty_vec4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec4_empty_empty_vec4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_empty_empty_vec4_array_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_097_to_104.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_097_to_104.html
new file mode 100644
index 000000000..c7adfdc6c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_097_to_104.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_097_to_104.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_empty_in_vec4_empty_frag.frag"
+ },
+ "name": "vec4_empty_in_vec4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec4_empty_in_vec4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_empty_in_vec4_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_empty_in_vec4_array_frag.frag"
+ },
+ "name": "vec4_empty_in_vec4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec4_empty_in_vec4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_empty_in_vec4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_empty_inout_vec4_empty_frag.frag"
+ },
+ "name": "vec4_empty_inout_vec4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec4_empty_inout_vec4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_empty_inout_vec4_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_empty_inout_vec4_array_frag.frag"
+ },
+ "name": "vec4_empty_inout_vec4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_empty_inout_vec4_bigarray_frag.frag"
+ },
+ "name": "vec4_empty_inout_vec4_bigarray_frag.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_105_to_112.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_105_to_112.html
new file mode 100644
index 000000000..bcffe3b3a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_105_to_112.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_105_to_112.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec4_empty_inout_vec4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_empty_inout_vec4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec4_empty_inout_vec4_bigarray_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_empty_inout_vec4_bigarray_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_empty_out_vec4_empty_frag.frag"
+ },
+ "name": "vec4_empty_out_vec4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec4_empty_out_vec4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_empty_out_vec4_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_empty_out_vec4_array_frag.frag"
+ },
+ "name": "vec4_empty_out_vec4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec4_empty_out_vec4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_empty_out_vec4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat4_empty_empty_mat4_empty_frag.frag"
+ },
+ "name": "mat4_empty_empty_mat4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat4_empty_empty_mat4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat4_empty_empty_mat4_empty_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_113_to_120.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_113_to_120.html
new file mode 100644
index 000000000..90f9f7bcb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_113_to_120.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_113_to_120.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat4_empty_empty_mat4_array_frag.frag"
+ },
+ "name": "mat4_empty_empty_mat4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat4_empty_empty_mat4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat4_empty_empty_mat4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat4_empty_in_mat4_empty_frag.frag"
+ },
+ "name": "mat4_empty_in_mat4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat4_empty_in_mat4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat4_empty_in_mat4_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat4_empty_in_mat4_array_frag.frag"
+ },
+ "name": "mat4_empty_in_mat4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat4_empty_in_mat4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat4_empty_in_mat4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat4_empty_inout_mat4_empty_frag.frag"
+ },
+ "name": "mat4_empty_inout_mat4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat4_empty_inout_mat4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat4_empty_inout_mat4_empty_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_121_to_126.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_121_to_126.html
new file mode 100644
index 000000000..1c80683fd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_121_to_126.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: functions_121_to_126.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat4_empty_inout_mat4_array_frag.frag"
+ },
+ "name": "mat4_empty_inout_mat4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat4_empty_inout_mat4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat4_empty_inout_mat4_array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat4_empty_out_mat4_empty_frag.frag"
+ },
+ "name": "mat4_empty_out_mat4_empty_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat4_empty_out_mat4_empty_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat4_empty_out_mat4_empty_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat4_empty_out_mat4_array_frag.frag"
+ },
+ "name": "mat4_empty_out_mat4_array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat4_empty_out_mat4_array_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat4_empty_out_mat4_array_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/input.run.txt
new file mode 100644
index 000000000..00b4fa8fa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/input.run.txt
@@ -0,0 +1,17 @@
+# this file is auto-generated. DO NOT EDIT.
+functions_001_to_008.html
+functions_009_to_016.html
+functions_017_to_024.html
+functions_025_to_032.html
+functions_033_to_040.html
+functions_041_to_048.html
+functions_049_to_056.html
+functions_057_to_064.html
+functions_065_to_072.html
+functions_073_to_080.html
+functions_081_to_088.html
+functions_089_to_096.html
+functions_097_to_104.html
+functions_105_to_112.html
+functions_113_to_120.html
+functions_121_to_126.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_array_frag.frag
new file mode 100644
index 000000000..59a502afe
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_array_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+int function(int par[3]);
+bool is_all(const in int array[3], const in int value);
+void set_all(out int array[3], const in int value);
+
+void main (void)
+{
+ int par[3];
+ int ret = 0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, 1);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if(is_all(par, 1) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+int function(int par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, 1))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return 1;
+ }
+ else
+ return 0;
+}
+
+bool is_all(const in int array[3], const in int value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out int array[3], const in int value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_array_vert.vert
new file mode 100644
index 000000000..8b9e0417d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_array_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+int function(int par[3]);
+bool is_all(const in int array[3], const in int value);
+void set_all(out int array[3], const in int value);
+
+void main (void)
+{
+ int par[3];
+ int ret = 0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, 1);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if(is_all(par, 1) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+int function(int par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, 1))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return 1;
+ }
+ else
+ return 0;
+}
+
+bool is_all(const in int array[3], const in int value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out int array[3], const in int value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_empty_frag.frag
new file mode 100644
index 000000000..3f9fc4438
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_empty_frag.frag
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+int function(int par);
+
+void main (void)
+{
+ int par = 1;
+ int ret = 0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if((par == 1) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+int function(int par)
+{
+ // Return the value of the parameter.
+ if(par == 1)
+ {
+ // Test parameter qualifier (default is "in").
+ par = 0;
+
+ return 1;
+ }
+ else
+ return 0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_empty_vert.vert
new file mode 100644
index 000000000..73e895d7f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_empty_vert.vert
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+int function(int par);
+
+void main (void)
+{
+ int par = 1;
+ int ret = 0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if((par == 1) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+int function(int par)
+{
+ // Return the value of the parameter.
+ if(par == 1)
+ {
+ // Test parameter qualifier (default is "in").
+ par = 0;
+
+ return 1;
+ }
+ else
+ return 0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_array_frag.frag
new file mode 100644
index 000000000..b9e2910bc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_array_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+int function(in int par[3]);
+bool is_all(const in int array[3], const in int value);
+void set_all(out int array[3], const in int value);
+
+void main (void)
+{
+ int par[3];
+ int ret = 0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, 1);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if(is_all(par, 1) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+int function(in int par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, 1))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return 1;
+ }
+ else
+ return 0;
+}
+
+bool is_all(const in int array[3], const in int value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out int array[3], const in int value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_array_vert.vert
new file mode 100644
index 000000000..3d807a18e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_array_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+int function(in int par[3]);
+bool is_all(const in int array[3], const in int value);
+void set_all(out int array[3], const in int value);
+
+void main (void)
+{
+ int par[3];
+ int ret = 0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, 1);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if(is_all(par, 1) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+int function(in int par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, 1))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return 1;
+ }
+ else
+ return 0;
+}
+
+bool is_all(const in int array[3], const in int value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out int array[3], const in int value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_empty_frag.frag
new file mode 100644
index 000000000..4be3d649c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_empty_frag.frag
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+int function(in int par);
+
+void main (void)
+{
+ int par = 1;
+ int ret = 0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if((par == 1) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+int function(in int par)
+{
+ // Return the value of the parameter.
+ if(par == 1)
+ {
+ // Test parameter qualifier (default is "in").
+ par = 0;
+
+ return 1;
+ }
+ else
+ return 0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_empty_vert.vert
new file mode 100644
index 000000000..020d79492
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_empty_vert.vert
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+int function(in int par);
+
+void main (void)
+{
+ int par = 1;
+ int ret = 0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if((par == 1) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+int function(in int par)
+{
+ // Return the value of the parameter.
+ if(par == 1)
+ {
+ // Test parameter qualifier (default is "in").
+ par = 0;
+
+ return 1;
+ }
+ else
+ return 0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_array_frag.frag
new file mode 100644
index 000000000..91d71268d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_array_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+int function(inout int par[3]);
+bool is_all(const in int array[3], const in int value);
+void set_all(out int array[3], const in int value);
+
+void main (void)
+{
+ int par[3];
+ int ret = 0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, 1);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, 0) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+int function(inout int par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, 1))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return 1;
+ }
+ else
+ return 0;
+}
+
+bool is_all(const in int array[3], const in int value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out int array[3], const in int value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_array_vert.vert
new file mode 100644
index 000000000..efaf9f449
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_array_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+int function(inout int par[3]);
+bool is_all(const in int array[3], const in int value);
+void set_all(out int array[3], const in int value);
+
+void main (void)
+{
+ int par[3];
+ int ret = 0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, 1);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, 0) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+int function(inout int par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, 1))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return 1;
+ }
+ else
+ return 0;
+}
+
+bool is_all(const in int array[3], const in int value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out int array[3], const in int value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_empty_frag.frag
new file mode 100644
index 000000000..e2780c41c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_empty_frag.frag
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+int function(inout int par);
+
+void main (void)
+{
+ int par = 1;
+ int ret = 0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if((par == 0) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+int function(inout int par)
+{
+ // Return the value of the parameter.
+ if(par == 1)
+ {
+ // Test parameter qualifier (default is "in").
+ par = 0;
+
+ return 1;
+ }
+ else
+ return 0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_empty_vert.vert
new file mode 100644
index 000000000..e252ac4cf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_empty_vert.vert
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+int function(inout int par);
+
+void main (void)
+{
+ int par = 1;
+ int ret = 0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if((par == 0) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+int function(inout int par)
+{
+ // Return the value of the parameter.
+ if(par == 1)
+ {
+ // Test parameter qualifier (default is "in").
+ par = 0;
+
+ return 1;
+ }
+ else
+ return 0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_array_frag.frag
new file mode 100644
index 000000000..a46c860f8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_array_frag.frag
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+int function(out int par[3]);
+bool is_all(const in int array[3], const in int value);
+void set_all(out int array[3], const in int value);
+
+void main (void)
+{
+ int par[3];
+ int ret = 0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, 1);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, 0) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+int function(out int par[3])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return 1;
+}
+
+bool is_all(const in int array[3], const in int value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out int array[3], const in int value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_array_vert.vert
new file mode 100644
index 000000000..5dd10b833
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_array_vert.vert
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+int function(out int par[3]);
+bool is_all(const in int array[3], const in int value);
+void set_all(out int array[3], const in int value);
+
+void main (void)
+{
+ int par[3];
+ int ret = 0;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, 1);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, 0) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+int function(out int par[3])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return 1;
+}
+
+bool is_all(const in int array[3], const in int value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out int array[3], const in int value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_empty_frag.frag
new file mode 100644
index 000000000..822948a2d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_empty_frag.frag
@@ -0,0 +1,59 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+int function(out int par);
+
+void main (void)
+{
+ int par = 1;
+ int ret = 0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if((par == 0) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+int function(out int par)
+{
+ // Test parameter qualifier (default is "in").
+ par = 0;
+
+ return 1;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_empty_vert.vert
new file mode 100644
index 000000000..6a5d0b85c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_empty_vert.vert
@@ -0,0 +1,59 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+int function(out int par);
+
+void main (void)
+{
+ int par = 1;
+ int ret = 0;
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if((par == 0) && (ret == 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+int function(out int par)
+{
+ // Test parameter qualifier (default is "in").
+ par = 0;
+
+ return 1;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_frag.frag
new file mode 100644
index 000000000..1ee72fd7f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_frag.frag
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+ivec4 function(ivec4 par[3]);
+bool is_all(const in ivec4 par, const in int value);
+bool is_all(const in ivec4 array[3], const in ivec4 value);
+void set_all(out ivec4 array[3], const in ivec4 value);
+
+void main (void)
+{
+ ivec4 par[3];
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, ivec4(1, 1, 1, 1));
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if(is_all(par, ivec4(1, 1, 1, 1)) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+ivec4 function(ivec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, ivec4(1, 1, 1, 1)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, ivec4(0, 0, 0, 0));
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in ivec4 array[3], const in ivec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 array[3], const in ivec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_vert.vert
new file mode 100644
index 000000000..82be12d55
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_vert.vert
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+ivec4 function(ivec4 par[3]);
+bool is_all(const in ivec4 par, const in int value);
+bool is_all(const in ivec4 array[3], const in ivec4 value);
+void set_all(out ivec4 array[3], const in ivec4 value);
+
+void main (void)
+{
+ ivec4 par[3];
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, ivec4(1, 1, 1, 1));
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if(is_all(par, ivec4(1, 1, 1, 1)) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+ivec4 function(ivec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, ivec4(1, 1, 1, 1)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, ivec4(0, 0, 0, 0));
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in ivec4 array[3], const in ivec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 array[3], const in ivec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_frag.frag
new file mode 100644
index 000000000..1a66f95e7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+ivec4 function(ivec4 par);
+bool is_all(const in ivec4 par, const in int value);
+void set_all(out ivec4 par, const in int value);
+
+void main (void)
+{
+ ivec4 par = ivec4(1, 1, 1, 1);
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if(is_all(par, 1) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+ivec4 function(ivec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 par, const in int value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_vert.vert
new file mode 100644
index 000000000..3680ca051
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+ivec4 function(ivec4 par);
+bool is_all(const in ivec4 par, const in int value);
+void set_all(out ivec4 par, const in int value);
+
+void main (void)
+{
+ ivec4 par = ivec4(1, 1, 1, 1);
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if(is_all(par, 1) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+ivec4 function(ivec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 par, const in int value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_frag.frag
new file mode 100644
index 000000000..7aa71b48a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_frag.frag
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+ivec4 function(in ivec4 par[3]);
+bool is_all(const in ivec4 par, const in int value);
+bool is_all(const in ivec4 array[3], const in ivec4 value);
+void set_all(out ivec4 array[3], const in ivec4 value);
+
+void main (void)
+{
+ ivec4 par[3];
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, ivec4(1, 1, 1, 1));
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if(is_all(par, ivec4(1, 1, 1, 1)) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+ivec4 function(in ivec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, ivec4(1, 1, 1, 1)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, ivec4(0, 0, 0, 0));
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in ivec4 array[3], const in ivec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 array[3], const in ivec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_vert.vert
new file mode 100644
index 000000000..df24cc8ff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_vert.vert
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+ivec4 function(in ivec4 par[3]);
+bool is_all(const in ivec4 par, const in int value);
+bool is_all(const in ivec4 array[3], const in ivec4 value);
+void set_all(out ivec4 array[3], const in ivec4 value);
+
+void main (void)
+{
+ ivec4 par[3];
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, ivec4(1, 1, 1, 1));
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if(is_all(par, ivec4(1, 1, 1, 1)) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+ivec4 function(in ivec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, ivec4(1, 1, 1, 1)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, ivec4(0, 0, 0, 0));
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in ivec4 array[3], const in ivec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 array[3], const in ivec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_frag.frag
new file mode 100644
index 000000000..bc6c03adc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+ivec4 function(in ivec4 par);
+bool is_all(const in ivec4 par, const in int value);
+void set_all(out ivec4 par, const in int value);
+
+void main (void)
+{
+ ivec4 par = ivec4(1, 1, 1, 1);
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if(is_all(par, 1) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+ivec4 function(in ivec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 par, const in int value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_vert.vert
new file mode 100644
index 000000000..1f0e3cd2b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+ivec4 function(in ivec4 par);
+bool is_all(const in ivec4 par, const in int value);
+void set_all(out ivec4 par, const in int value);
+
+void main (void)
+{
+ ivec4 par = ivec4(1, 1, 1, 1);
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.
+ if(is_all(par, 1) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+ivec4 function(in ivec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 par, const in int value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_frag.frag
new file mode 100644
index 000000000..4aae9eebf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_frag.frag
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+ivec4 function(inout ivec4 par[3]);
+bool is_all(const in ivec4 par, const in int value);
+bool is_all(const in ivec4 array[3], const in ivec4 value);
+void set_all(out ivec4 array[3], const in ivec4 value);
+
+void main (void)
+{
+ ivec4 par[3];
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, ivec4(1, 1, 1, 1));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, ivec4(0, 0, 0, 0)) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+ivec4 function(inout ivec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, ivec4(1, 1, 1, 1)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, ivec4(0, 0, 0, 0));
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in ivec4 array[3], const in ivec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 array[3], const in ivec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_vert.vert
new file mode 100644
index 000000000..069dae62c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_vert.vert
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+ivec4 function(inout ivec4 par[3]);
+bool is_all(const in ivec4 par, const in int value);
+bool is_all(const in ivec4 array[3], const in ivec4 value);
+void set_all(out ivec4 array[3], const in ivec4 value);
+
+void main (void)
+{
+ ivec4 par[3];
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, ivec4(1, 1, 1, 1));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, ivec4(0, 0, 0, 0)) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+ivec4 function(inout ivec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, ivec4(1, 1, 1, 1)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, ivec4(0, 0, 0, 0));
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in ivec4 array[3], const in ivec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 array[3], const in ivec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_frag.frag
new file mode 100644
index 000000000..d2f509df7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_frag.frag
@@ -0,0 +1,129 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+ivec4 function(inout ivec4 par[10]);
+bool is_all(const in ivec4 par, const in int value);
+bool is_all(const in ivec4 array[10], const in ivec4 value);
+void set_all(out ivec4 array[10], const in ivec4 value);
+
+void main (void)
+{
+ ivec4 par[10];
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, ivec4(1, 1, 1, 1));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, ivec4(0, 0, 0, 0)) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+ivec4 function(inout ivec4 par[10])
+{
+ // Return the value of the array.
+ if(is_all(par, ivec4(1, 1, 1, 1)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, ivec4(0, 0, 0, 0));
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in ivec4 array[10], const in ivec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+ if(array[3] != value)
+ ret = false;
+ if(array[4] != value)
+ ret = false;
+ if(array[5] != value)
+ ret = false;
+ if(array[6] != value)
+ ret = false;
+ if(array[7] != value)
+ ret = false;
+ if(array[8] != value)
+ ret = false;
+ if(array[9] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 array[10], const in ivec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+ array[3] = value;
+ array[4] = value;
+ array[5] = value;
+ array[6] = value;
+ array[7] = value;
+ array[8] = value;
+ array[9] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_vert.vert
new file mode 100644
index 000000000..0c69946a1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_vert.vert
@@ -0,0 +1,129 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+ivec4 function(inout ivec4 par[10]);
+bool is_all(const in ivec4 par, const in int value);
+bool is_all(const in ivec4 array[10], const in ivec4 value);
+void set_all(out ivec4 array[10], const in ivec4 value);
+
+void main (void)
+{
+ ivec4 par[10];
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, ivec4(1, 1, 1, 1));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, ivec4(0, 0, 0, 0)) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+ivec4 function(inout ivec4 par[10])
+{
+ // Return the value of the array.
+ if(is_all(par, ivec4(1, 1, 1, 1)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, ivec4(0, 0, 0, 0));
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in ivec4 array[10], const in ivec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+ if(array[3] != value)
+ ret = false;
+ if(array[4] != value)
+ ret = false;
+ if(array[5] != value)
+ ret = false;
+ if(array[6] != value)
+ ret = false;
+ if(array[7] != value)
+ ret = false;
+ if(array[8] != value)
+ ret = false;
+ if(array[9] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 array[10], const in ivec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+ array[3] = value;
+ array[4] = value;
+ array[5] = value;
+ array[6] = value;
+ array[7] = value;
+ array[8] = value;
+ array[9] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_frag.frag
new file mode 100644
index 000000000..aa75e3262
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+ivec4 function(inout ivec4 par);
+bool is_all(const in ivec4 par, const in int value);
+void set_all(out ivec4 par, const in int value);
+
+void main (void)
+{
+ ivec4 par = ivec4(1, 1, 1, 1);
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, 0) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+ivec4 function(inout ivec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 par, const in int value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_vert.vert
new file mode 100644
index 000000000..40e9db60c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+ivec4 function(inout ivec4 par);
+bool is_all(const in ivec4 par, const in int value);
+void set_all(out ivec4 par, const in int value);
+
+void main (void)
+{
+ ivec4 par = ivec4(1, 1, 1, 1);
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, 0) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+ivec4 function(inout ivec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return ivec4(1, 1, 1, 1);
+ }
+ else
+ return ivec4(0, 0, 0, 0);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 par, const in int value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_frag.frag
new file mode 100644
index 000000000..88ec4b637
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_frag.frag
@@ -0,0 +1,102 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+ivec4 function(out ivec4 par[3]);
+bool is_all(const in ivec4 par, const in int value);
+bool is_all(const in ivec4 array[3], const in ivec4 value);
+void set_all(out ivec4 array[3], const in ivec4 value);
+
+void main (void)
+{
+ ivec4 par[3];
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, ivec4(1, 1, 1, 1));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, ivec4(0, 0, 0, 0)) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+ivec4 function(out ivec4 par[3])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, ivec4(0, 0, 0, 0));
+
+ return ivec4(1, 1, 1, 1);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in ivec4 array[3], const in ivec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 array[3], const in ivec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_vert.vert
new file mode 100644
index 000000000..c33908198
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_vert.vert
@@ -0,0 +1,102 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+ivec4 function(out ivec4 par[3]);
+bool is_all(const in ivec4 par, const in int value);
+bool is_all(const in ivec4 array[3], const in ivec4 value);
+void set_all(out ivec4 array[3], const in ivec4 value);
+
+void main (void)
+{
+ ivec4 par[3];
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.
+ set_all(par, ivec4(1, 1, 1, 1));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, ivec4(0, 0, 0, 0)) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+ivec4 function(out ivec4 par[3])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, ivec4(0, 0, 0, 0));
+
+ return ivec4(1, 1, 1, 1);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in ivec4 array[3], const in ivec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 array[3], const in ivec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_frag.frag
new file mode 100644
index 000000000..9886a204f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_frag.frag
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+ivec4 function(out ivec4 par);
+bool is_all(const in ivec4 par, const in int value);
+void set_all(out ivec4 par, const in int value);
+
+void main (void)
+{
+ ivec4 par = ivec4(1, 1, 1, 1);
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, 0) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+ivec4 function(out ivec4 par)
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return ivec4(1, 1, 1, 1);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 par, const in int value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_vert.vert
new file mode 100644
index 000000000..1e376e399
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_vert.vert
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+ivec4 function(out ivec4 par);
+bool is_all(const in ivec4 par, const in int value);
+void set_all(out ivec4 par, const in int value);
+
+void main (void)
+{
+ ivec4 par = ivec4(1, 1, 1, 1);
+ ivec4 ret = ivec4(0, 0, 0, 0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.
+ if(is_all(par, 0) && is_all(ret, 1))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+ivec4 function(out ivec4 par)
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0);
+
+ return ivec4(1, 1, 1, 1);
+}
+
+bool is_all(const in ivec4 par, const in int value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out ivec4 par, const in int value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_frag.frag
new file mode 100644
index 000000000..77743dde1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_frag.frag
@@ -0,0 +1,141 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+const mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+// Function declarations.
+mat4 function(mat4 par[2]);
+bool is_all(const in mat4 par, const in float value);
+bool is_all(const in mat4 array[2], const in mat4 value);
+void set_all(out mat4 array[2], const in mat4 value);
+
+void main (void)
+{
+ mat4 par[2];
+ mat4 ret = mat_zeros;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, mat_ones);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, mat_ones) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+mat4 function(mat4 par[2])
+{
+ // Return the value of the array.
+ if(is_all(par, mat_ones))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, mat_zeros);
+
+ return mat_ones;
+ }
+ else
+ return mat_zeros;
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in mat4 array[2], const in mat4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 array[2], const in mat4 value)
+{
+ array[0] = value;
+ array[1] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_vert.vert
new file mode 100644
index 000000000..45a997b17
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_vert.vert
@@ -0,0 +1,141 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+const mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+// Function declarations.
+mat4 function(mat4 par[2]);
+bool is_all(const in mat4 par, const in float value);
+bool is_all(const in mat4 array[2], const in mat4 value);
+void set_all(out mat4 array[2], const in mat4 value);
+
+void main (void)
+{
+ mat4 par[2];
+ mat4 ret = mat_zeros;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, mat_ones);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, mat_ones) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+mat4 function(mat4 par[2])
+{
+ // Return the value of the array.
+ if(is_all(par, mat_ones))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, mat_zeros);
+
+ return mat_ones;
+ }
+ else
+ return mat_zeros;
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in mat4 array[2], const in mat4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 array[2], const in mat4 value)
+{
+ array[0] = value;
+ array[1] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_frag.frag
new file mode 100644
index 000000000..6e1c87dfc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_frag.frag
@@ -0,0 +1,145 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+mat4 function(mat4 par);
+bool is_all(const in mat4 par, const in float value);
+void set_all(out mat4 par, const in float value);
+
+void main (void)
+{
+ mat4 par = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ mat4 ret = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, 1.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+mat4 function(mat4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 par, const in float value)
+{
+ par[0][0] = value;
+ par[0][1] = value;
+ par[0][2] = value;
+ par[0][3] = value;
+
+ par[1][0] = value;
+ par[1][1] = value;
+ par[1][2] = value;
+ par[1][3] = value;
+
+ par[2][0] = value;
+ par[2][1] = value;
+ par[2][2] = value;
+ par[2][3] = value;
+
+ par[3][0] = value;
+ par[3][1] = value;
+ par[3][2] = value;
+ par[3][3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_vert.vert
new file mode 100644
index 000000000..2f607b71a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_vert.vert
@@ -0,0 +1,145 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+mat4 function(mat4 par);
+bool is_all(const in mat4 par, const in float value);
+void set_all(out mat4 par, const in float value);
+
+void main (void)
+{
+ mat4 par = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ mat4 ret = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, 1.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+mat4 function(mat4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 par, const in float value)
+{
+ par[0][0] = value;
+ par[0][1] = value;
+ par[0][2] = value;
+ par[0][3] = value;
+
+ par[1][0] = value;
+ par[1][1] = value;
+ par[1][2] = value;
+ par[1][3] = value;
+
+ par[2][0] = value;
+ par[2][1] = value;
+ par[2][2] = value;
+ par[2][3] = value;
+
+ par[3][0] = value;
+ par[3][1] = value;
+ par[3][2] = value;
+ par[3][3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_frag.frag
new file mode 100644
index 000000000..c29074351
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_frag.frag
@@ -0,0 +1,141 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+const mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+// Function declarations.
+mat4 function(in mat4 par[2]);
+bool is_all(const in mat4 par, const in float value);
+bool is_all(const in mat4 array[2], const in mat4 value);
+void set_all(out mat4 array[2], const in mat4 value);
+
+void main (void)
+{
+ mat4 par[2];
+ mat4 ret = mat_zeros;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, mat_ones);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, mat_ones) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+mat4 function(in mat4 par[2])
+{
+ // Return the value of the array.
+ if(is_all(par, mat_ones))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, mat_zeros);
+
+ return mat_ones;
+ }
+ else
+ return mat_zeros;
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in mat4 array[2], const in mat4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 array[2], const in mat4 value)
+{
+ array[0] = value;
+ array[1] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_vert.vert
new file mode 100644
index 000000000..2230711d8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_vert.vert
@@ -0,0 +1,141 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+const mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+// Function declarations.
+mat4 function(in mat4 par[2]);
+bool is_all(const in mat4 par, const in float value);
+bool is_all(const in mat4 array[2], const in mat4 value);
+void set_all(out mat4 array[2], const in mat4 value);
+
+void main (void)
+{
+ mat4 par[2];
+ mat4 ret = mat_zeros;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, mat_ones);
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, mat_ones) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+mat4 function(in mat4 par[2])
+{
+ // Return the value of the array.
+ if(is_all(par, mat_ones))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, mat_zeros);
+
+ return mat_ones;
+ }
+ else
+ return mat_zeros;
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in mat4 array[2], const in mat4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 array[2], const in mat4 value)
+{
+ array[0] = value;
+ array[1] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_frag.frag
new file mode 100644
index 000000000..7c1839ced
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_frag.frag
@@ -0,0 +1,145 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+mat4 function(in mat4 par);
+bool is_all(const in mat4 par, const in float value);
+void set_all(out mat4 par, const in float value);
+
+void main (void)
+{
+ mat4 par = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ mat4 ret = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, 1.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+mat4 function(in mat4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 par, const in float value)
+{
+ par[0][0] = value;
+ par[0][1] = value;
+ par[0][2] = value;
+ par[0][3] = value;
+
+ par[1][0] = value;
+ par[1][1] = value;
+ par[1][2] = value;
+ par[1][3] = value;
+
+ par[2][0] = value;
+ par[2][1] = value;
+ par[2][2] = value;
+ par[2][3] = value;
+
+ par[3][0] = value;
+ par[3][1] = value;
+ par[3][2] = value;
+ par[3][3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_vert.vert
new file mode 100644
index 000000000..3d78bbad9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_vert.vert
@@ -0,0 +1,145 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+mat4 function(in mat4 par);
+bool is_all(const in mat4 par, const in float value);
+void set_all(out mat4 par, const in float value);
+
+void main (void)
+{
+ mat4 par = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ mat4 ret = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, 1.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+mat4 function(in mat4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 par, const in float value)
+{
+ par[0][0] = value;
+ par[0][1] = value;
+ par[0][2] = value;
+ par[0][3] = value;
+
+ par[1][0] = value;
+ par[1][1] = value;
+ par[1][2] = value;
+ par[1][3] = value;
+
+ par[2][0] = value;
+ par[2][1] = value;
+ par[2][2] = value;
+ par[2][3] = value;
+
+ par[3][0] = value;
+ par[3][1] = value;
+ par[3][2] = value;
+ par[3][3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_frag.frag
new file mode 100644
index 000000000..9c75370b3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_frag.frag
@@ -0,0 +1,141 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+const mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+// Function declarations.
+mat4 function(inout mat4 par[2]);
+bool is_all(const in mat4 par, const in float value);
+bool is_all(const in mat4 array[2], const in mat4 value);
+void set_all(out mat4 array[2], const in mat4 value);
+
+void main (void)
+{
+ mat4 par[2];
+ mat4 ret = mat_zeros;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, mat_ones);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, mat_zeros) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+mat4 function(inout mat4 par[2])
+{
+ // Return the value of the array.
+ if(is_all(par, mat_ones))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, mat_zeros);
+
+ return mat_ones;
+ }
+ else
+ return mat_zeros;
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in mat4 array[2], const in mat4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 array[2], const in mat4 value)
+{
+ array[0] = value;
+ array[1] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_vert.vert
new file mode 100644
index 000000000..6b86b8755
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_vert.vert
@@ -0,0 +1,141 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+const mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+// Function declarations.
+mat4 function(inout mat4 par[2]);
+bool is_all(const in mat4 par, const in float value);
+bool is_all(const in mat4 array[2], const in mat4 value);
+void set_all(out mat4 array[2], const in mat4 value);
+
+void main (void)
+{
+ mat4 par[2];
+ mat4 ret = mat_zeros;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, mat_ones);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, mat_zeros) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+mat4 function(inout mat4 par[2])
+{
+ // Return the value of the array.
+ if(is_all(par, mat_ones))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, mat_zeros);
+
+ return mat_ones;
+ }
+ else
+ return mat_zeros;
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in mat4 array[2], const in mat4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 array[2], const in mat4 value)
+{
+ array[0] = value;
+ array[1] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_frag.frag
new file mode 100644
index 000000000..469c839cb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_frag.frag
@@ -0,0 +1,145 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+mat4 function(inout mat4 par);
+bool is_all(const in mat4 par, const in float value);
+void set_all(out mat4 par, const in float value);
+
+void main (void)
+{
+ mat4 par = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ mat4 ret = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, 0.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+mat4 function(inout mat4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 par, const in float value)
+{
+ par[0][0] = value;
+ par[0][1] = value;
+ par[0][2] = value;
+ par[0][3] = value;
+
+ par[1][0] = value;
+ par[1][1] = value;
+ par[1][2] = value;
+ par[1][3] = value;
+
+ par[2][0] = value;
+ par[2][1] = value;
+ par[2][2] = value;
+ par[2][3] = value;
+
+ par[3][0] = value;
+ par[3][1] = value;
+ par[3][2] = value;
+ par[3][3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_vert.vert
new file mode 100644
index 000000000..485c1f4b3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_vert.vert
@@ -0,0 +1,145 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+mat4 function(inout mat4 par);
+bool is_all(const in mat4 par, const in float value);
+void set_all(out mat4 par, const in float value);
+
+void main (void)
+{
+ mat4 par = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ mat4 ret = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, 0.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+mat4 function(inout mat4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 par, const in float value)
+{
+ par[0][0] = value;
+ par[0][1] = value;
+ par[0][2] = value;
+ par[0][3] = value;
+
+ par[1][0] = value;
+ par[1][1] = value;
+ par[1][2] = value;
+ par[1][3] = value;
+
+ par[2][0] = value;
+ par[2][1] = value;
+ par[2][2] = value;
+ par[2][3] = value;
+
+ par[3][0] = value;
+ par[3][1] = value;
+ par[3][2] = value;
+ par[3][3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_frag.frag
new file mode 100644
index 000000000..ba6c49a50
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_frag.frag
@@ -0,0 +1,135 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+const mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+// Function declarations.
+mat4 function(out mat4 par[2]);
+bool is_all(const in mat4 par, const in float value);
+bool is_all(const in mat4 array[2], const in mat4 value);
+void set_all(out mat4 array[2], const in mat4 value);
+
+void main (void)
+{
+ mat4 par[2];
+ mat4 ret = mat_zeros;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, mat_ones);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, mat_zeros) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+mat4 function(out mat4 par[2])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, mat_zeros);
+
+ return mat_ones;
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in mat4 array[2], const in mat4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 array[2], const in mat4 value)
+{
+ array[0] = value;
+ array[1] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_vert.vert
new file mode 100644
index 000000000..a0dde5223
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_vert.vert
@@ -0,0 +1,135 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+const mat4 mat_ones = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+const mat4 mat_zeros = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+// Function declarations.
+mat4 function(out mat4 par[2]);
+bool is_all(const in mat4 par, const in float value);
+bool is_all(const in mat4 array[2], const in mat4 value);
+void set_all(out mat4 array[2], const in mat4 value);
+
+void main (void)
+{
+ mat4 par[2];
+ mat4 ret = mat_zeros;
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, mat_ones);
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, mat_zeros) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+mat4 function(out mat4 par[2])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, mat_zeros);
+
+ return mat_ones;
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in mat4 array[2], const in mat4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 array[2], const in mat4 value)
+{
+ array[0] = value;
+ array[1] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_frag.frag
new file mode 100644
index 000000000..a3396fccd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_frag.frag
@@ -0,0 +1,136 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+mat4 function(out mat4 par);
+bool is_all(const in mat4 par, const in float value);
+void set_all(out mat4 par, const in float value);
+
+void main (void)
+{
+ mat4 par = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ mat4 ret = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, 0.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+mat4 function(out mat4 par)
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 par, const in float value)
+{
+ par[0][0] = value;
+ par[0][1] = value;
+ par[0][2] = value;
+ par[0][3] = value;
+
+ par[1][0] = value;
+ par[1][1] = value;
+ par[1][2] = value;
+ par[1][3] = value;
+
+ par[2][0] = value;
+ par[2][1] = value;
+ par[2][2] = value;
+ par[2][3] = value;
+
+ par[3][0] = value;
+ par[3][1] = value;
+ par[3][2] = value;
+ par[3][3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_vert.vert
new file mode 100644
index 000000000..832f1c334
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_vert.vert
@@ -0,0 +1,136 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+mat4 function(out mat4 par);
+bool is_all(const in mat4 par, const in float value);
+void set_all(out mat4 par, const in float value);
+
+void main (void)
+{
+ mat4 par = mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+ mat4 ret = mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, 0.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+mat4 function(out mat4 par)
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return mat4(1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0);
+}
+
+bool is_all(const in mat4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0][0] != value)
+ ret = false;
+ if(par[0][1] != value)
+ ret = false;
+ if(par[0][2] != value)
+ ret = false;
+ if(par[0][3] != value)
+ ret = false;
+
+ if(par[1][0] != value)
+ ret = false;
+ if(par[1][1] != value)
+ ret = false;
+ if(par[1][2] != value)
+ ret = false;
+ if(par[1][3] != value)
+ ret = false;
+
+ if(par[2][0] != value)
+ ret = false;
+ if(par[2][1] != value)
+ ret = false;
+ if(par[2][2] != value)
+ ret = false;
+ if(par[2][3] != value)
+ ret = false;
+
+ if(par[3][0] != value)
+ ret = false;
+ if(par[3][1] != value)
+ ret = false;
+ if(par[3][2] != value)
+ ret = false;
+ if(par[3][3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out mat4 par, const in float value)
+{
+ par[0][0] = value;
+ par[0][1] = value;
+ par[0][2] = value;
+ par[0][3] = value;
+
+ par[1][0] = value;
+ par[1][1] = value;
+ par[1][2] = value;
+ par[1][3] = value;
+
+ par[2][0] = value;
+ par[2][1] = value;
+ par[2][2] = value;
+ par[2][3] = value;
+
+ par[3][0] = value;
+ par[3][1] = value;
+ par[3][2] = value;
+ par[3][3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_float_frag.frag
new file mode 100644
index 000000000..2328826d6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_float_frag.frag
@@ -0,0 +1,59 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+
+
+float qualifiers(in float a, out float b, inout float c, const in float d, float e)
+{
+ b = a;
+ c += d;
+ a += 1.0;
+ return e;
+}
+
+
+
+void main (void)
+{
+ float a = 1.0, b = 2.0, c = 3.0, d = 4.0, e = 1.0, f = 0.0;
+ float q = 0.0;
+ float q2 = 0.0;
+
+ f = qualifiers(a, b, c, d, e);
+
+ if(a == 1.0) q += 1.0;
+ if(b == 1.0) q += 2.0;
+ if(c == 7.0) q += 4.0;
+ if(d == 4.0) q2 += 1.0;
+ if(e == 1.0) q2 += 2.0;
+ if(f == 1.0) q2 += 4.0;
+
+ gl_FragColor = vec4(vec2(q / 7.0, q2 / 7.0), 1.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_float_vert.vert
new file mode 100644
index 000000000..b5b7095b4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_float_vert.vert
@@ -0,0 +1,59 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+
+
+float qualifiers(in float a, out float b, inout float c, const in float d, float e)
+{
+ b = a;
+ c += d;
+ a += 1.0;
+ return e;
+}
+
+
+
+void main (void)
+{
+ float a = 1.0, b = 2.0, c = 3.0, d = 4.0, e = 1.0, f = 0.0;
+ float q = 0.0;
+ float q2 = 0.0;
+
+ f = qualifiers(a, b, c, d, e);
+
+ if(a == 1.0) q += 1.0;
+ if(b == 1.0) q += 2.0;
+ if(c == 7.0) q += 4.0;
+ if(d == 4.0) q2 += 1.0;
+ if(e == 1.0) q2 += 2.0;
+ if(f == 1.0) q2 += 4.0;
+
+ color = vec4(vec2(q / 7.0, q2 / 7.0), 1.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_struct_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_struct_frag.frag
new file mode 100644
index 000000000..b19d0edbb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_struct_frag.frag
@@ -0,0 +1,83 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct sabcd
+{
+ float a;
+ float b;
+ float c;
+ float d;
+};
+
+
+
+sabcd qualifiers(in sabcd a, out sabcd b, inout sabcd c, const in sabcd d,
+sabcd e)
+{
+ sabcd one = sabcd(1.0, 1.0, 1.0, 1.0);
+
+ b = a;
+
+ c.a += d.a;
+ c.b += d.b;
+ c.c += d.c;
+ c.d += d.d;
+
+ a.a += one.a;
+ a.b += one.b;
+ a.c += one.c;
+ a.d += one.d;
+
+ return e;
+}
+
+void main (void)
+{
+ sabcd a = sabcd(1.0, 1.0, 1.0, 1.0);
+ sabcd b = sabcd(2.0, 2.0, 2.0, 2.0);
+ sabcd c = sabcd(3.0, 3.0, 3.0, 3.0);
+ sabcd d = sabcd(4.0, 4.0, 4.0, 4.0);
+ sabcd e = sabcd(1.0, 1.0, 1.0, 1.0);
+ sabcd f = sabcd(0.0, 0.0, 0.0, 0.0);
+ sabcd one = sabcd(1.0, 1.0, 1.0, 1.0);
+ sabcd four = sabcd(4.0, 4.0, 4.0, 4.0);
+ sabcd seven = sabcd(7.0, 7.0, 7.0, 7.0);
+ float q = 0.0;
+ float q2 = 0.0;
+
+ f = qualifiers(a, b, c, d, e);
+
+ if(a == one) q += 1.0;
+ if(b == one) q += 2.0;
+ if(c == seven) q += 4.0;
+ if(d == four) q2 += 1.0;
+ if(e == one) q2 += 2.0;
+ if(f == one) q2 += 4.0;
+
+ gl_FragColor = vec4(vec2(q / 7.0, q2 / 7.0), 1.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_struct_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_struct_vert.vert
new file mode 100644
index 000000000..ace4bf444
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_struct_vert.vert
@@ -0,0 +1,87 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+
+
+struct sabcd
+{
+ float a;
+ float b;
+ float c;
+ float d;
+};
+
+
+
+sabcd qualifiers(in sabcd a, out sabcd b, inout sabcd c, const in sabcd d,
+sabcd e)
+{
+ sabcd one = sabcd(1.0, 1.0, 1.0, 1.0);
+
+ b = a;
+
+ c.a += d.a;
+ c.b += d.b;
+ c.c += d.c;
+ c.d += d.d;
+
+ a.a += one.a;
+ a.b += one.b;
+ a.c += one.c;
+ a.d += one.d;
+
+ return e;
+}
+
+void main (void)
+{
+ sabcd a = sabcd(1.0, 1.0, 1.0, 1.0);
+ sabcd b = sabcd(2.0, 2.0, 2.0, 2.0);
+ sabcd c = sabcd(3.0, 3.0, 3.0, 3.0);
+ sabcd d = sabcd(4.0, 4.0, 4.0, 4.0);
+ sabcd e = sabcd(1.0, 1.0, 1.0, 1.0);
+ sabcd f = sabcd(0.0, 0.0, 0.0, 0.0);
+ sabcd one = sabcd(1.0, 1.0, 1.0, 1.0);
+ sabcd four = sabcd(4.0, 4.0, 4.0, 4.0);
+ sabcd seven = sabcd(7.0, 7.0, 7.0, 7.0);
+ float q = 0.0;
+ float q2 = 0.0;
+
+ f = qualifiers(a, b, c, d, e);
+
+ if(a == one) q += 1.0;
+ if(b == one) q += 2.0;
+ if(c == seven) q += 4.0;
+ if(d == four) q2 += 1.0;
+ if(e == one) q2 += 2.0;
+ if(f == one) q2 += 4.0;
+
+ color = vec4(vec2(q / 7.0, q2 / 7.0), 1.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_frag.frag
new file mode 100644
index 000000000..1ffc79ea3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_frag.frag
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+vec4 function(vec4 par[3]);
+bool is_all(const in vec4 par, const in float value);
+bool is_all(const in vec4 array[3], const in vec4 value);
+void set_all(out vec4 array[3], const in vec4 value);
+
+void main (void)
+{
+ vec4 par[3];
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, vec4(1.0, 1.0, 1.0, 1.0));
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+vec4 function(vec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, vec4(0.0, 0.0, 0.0, 0.0));
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in vec4 array[3], const in vec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 array[3], const in vec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_vert.vert
new file mode 100644
index 000000000..df7c8af77
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_vert.vert
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+vec4 function(vec4 par[3]);
+bool is_all(const in vec4 par, const in float value);
+bool is_all(const in vec4 array[3], const in vec4 value);
+void set_all(out vec4 array[3], const in vec4 value);
+
+void main (void)
+{
+ vec4 par[3];
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, vec4(1.0, 1.0, 1.0, 1.0));
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+vec4 function(vec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, vec4(0.0, 0.0, 0.0, 0.0));
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in vec4 array[3], const in vec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 array[3], const in vec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_frag.frag
new file mode 100644
index 000000000..59691446f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+vec4 function(vec4 par);
+bool is_all(const in vec4 par, const in float value);
+void set_all(out vec4 par, const in float value);
+
+void main (void)
+{
+ vec4 par = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, 1.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+vec4 function(vec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 par, const in float value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_vert.vert
new file mode 100644
index 000000000..f6ca32e10
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+vec4 function(vec4 par);
+bool is_all(const in vec4 par, const in float value);
+void set_all(out vec4 par, const in float value);
+
+void main (void)
+{
+ vec4 par = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, 1.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+vec4 function(vec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 par, const in float value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_frag.frag
new file mode 100644
index 000000000..9120bb381
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_frag.frag
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+vec4 function(in vec4 par[3]);
+bool is_all(const in vec4 par, const in float value);
+bool is_all(const in vec4 array[3], const in vec4 value);
+void set_all(out vec4 array[3], const in vec4 value);
+
+void main (void)
+{
+ vec4 par[3];
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, vec4(1.0, 1.0, 1.0, 1.0));
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+vec4 function(in vec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, vec4(0.0, 0.0, 0.0, 0.0));
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in vec4 array[3], const in vec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 array[3], const in vec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_vert.vert
new file mode 100644
index 000000000..4805d42fd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_vert.vert
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+vec4 function(in vec4 par[3]);
+bool is_all(const in vec4 par, const in float value);
+bool is_all(const in vec4 array[3], const in vec4 value);
+void set_all(out vec4 array[3], const in vec4 value);
+
+void main (void)
+{
+ vec4 par[3];
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, vec4(1.0, 1.0, 1.0, 1.0));
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+vec4 function(in vec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, vec4(0.0, 0.0, 0.0, 0.0));
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in vec4 array[3], const in vec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 array[3], const in vec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_frag.frag
new file mode 100644
index 000000000..bbe63fa28
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+vec4 function(in vec4 par);
+bool is_all(const in vec4 par, const in float value);
+void set_all(out vec4 par, const in float value);
+
+void main (void)
+{
+ vec4 par = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, 1.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+vec4 function(in vec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 par, const in float value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_vert.vert
new file mode 100644
index 000000000..c6ab4b4e5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+vec4 function(in vec4 par);
+bool is_all(const in vec4 par, const in float value);
+void set_all(out vec4 par, const in float value);
+
+void main (void)
+{
+ vec4 par = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should remain unchanged by the function and the function should return 1.0.
+ if(is_all(par, 1.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+vec4 function(in vec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 par, const in float value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_frag.frag
new file mode 100644
index 000000000..3aafe1267
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_frag.frag
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+vec4 function(inout vec4 par[3]);
+bool is_all(const in vec4 par, const in float value);
+bool is_all(const in vec4 array[3], const in vec4 value);
+void set_all(out vec4 array[3], const in vec4 value);
+
+void main (void)
+{
+ vec4 par[3];
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, vec4(1.0, 1.0, 1.0, 1.0));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, vec4(0.0, 0.0, 0.0, 0.0)) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+vec4 function(inout vec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, vec4(0.0, 0.0, 0.0, 0.0));
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in vec4 array[3], const in vec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 array[3], const in vec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_vert.vert
new file mode 100644
index 000000000..1c0d04511
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_vert.vert
@@ -0,0 +1,108 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+vec4 function(inout vec4 par[3]);
+bool is_all(const in vec4 par, const in float value);
+bool is_all(const in vec4 array[3], const in vec4 value);
+void set_all(out vec4 array[3], const in vec4 value);
+
+void main (void)
+{
+ vec4 par[3];
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, vec4(1.0, 1.0, 1.0, 1.0));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, vec4(0.0, 0.0, 0.0, 0.0)) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+vec4 function(inout vec4 par[3])
+{
+ // Return the value of the array.
+ if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, vec4(0.0, 0.0, 0.0, 0.0));
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in vec4 array[3], const in vec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 array[3], const in vec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_frag.frag
new file mode 100644
index 000000000..3f28f2822
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_frag.frag
@@ -0,0 +1,129 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+vec4 function(inout vec4 par[10]);
+bool is_all(const in vec4 par, const in float value);
+bool is_all(const in vec4 array[10], const in vec4 value);
+void set_all(out vec4 array[10], const in vec4 value);
+
+void main (void)
+{
+ vec4 par[10];
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, vec4(1.0, 1.0, 1.0, 1.0));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, vec4(0.0, 0.0, 0.0, 0.0)) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+vec4 function(inout vec4 par[10])
+{
+ // Return the value of the array.
+ if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, vec4(0.0, 0.0, 0.0, 0.0));
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in vec4 array[10], const in vec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+ if(array[3] != value)
+ ret = false;
+ if(array[4] != value)
+ ret = false;
+ if(array[5] != value)
+ ret = false;
+ if(array[6] != value)
+ ret = false;
+ if(array[7] != value)
+ ret = false;
+ if(array[8] != value)
+ ret = false;
+ if(array[9] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 array[10], const in vec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+ array[3] = value;
+ array[4] = value;
+ array[5] = value;
+ array[6] = value;
+ array[7] = value;
+ array[8] = value;
+ array[9] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_vert.vert
new file mode 100644
index 000000000..7a3ba4e2e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_vert.vert
@@ -0,0 +1,129 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+vec4 function(inout vec4 par[10]);
+bool is_all(const in vec4 par, const in float value);
+bool is_all(const in vec4 array[10], const in vec4 value);
+void set_all(out vec4 array[10], const in vec4 value);
+
+void main (void)
+{
+ vec4 par[10];
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, vec4(1.0, 1.0, 1.0, 1.0));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, vec4(0.0, 0.0, 0.0, 0.0)) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+vec4 function(inout vec4 par[10])
+{
+ // Return the value of the array.
+ if(is_all(par, vec4(1.0, 1.0, 1.0, 1.0)))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, vec4(0.0, 0.0, 0.0, 0.0));
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in vec4 array[10], const in vec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+ if(array[3] != value)
+ ret = false;
+ if(array[4] != value)
+ ret = false;
+ if(array[5] != value)
+ ret = false;
+ if(array[6] != value)
+ ret = false;
+ if(array[7] != value)
+ ret = false;
+ if(array[8] != value)
+ ret = false;
+ if(array[9] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 array[10], const in vec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+ array[3] = value;
+ array[4] = value;
+ array[5] = value;
+ array[6] = value;
+ array[7] = value;
+ array[8] = value;
+ array[9] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_frag.frag
new file mode 100644
index 000000000..04a76748b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_frag.frag
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+vec4 function(inout vec4 par);
+bool is_all(const in vec4 par, const in float value);
+void set_all(out vec4 par, const in float value);
+
+void main (void)
+{
+ vec4 par = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, 0.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+vec4 function(inout vec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 par, const in float value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_vert.vert
new file mode 100644
index 000000000..f35fbdd85
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+vec4 function(inout vec4 par);
+bool is_all(const in vec4 par, const in float value);
+void set_all(out vec4 par, const in float value);
+
+void main (void)
+{
+ vec4 par = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, 0.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+vec4 function(inout vec4 par)
+{
+ // Return the value of the parameter.
+ if(is_all(par, 1.0))
+ {
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+ }
+ else
+ return vec4(0.0, 0.0, 0.0, 0.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 par, const in float value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_frag.frag
new file mode 100644
index 000000000..c8ebf2cf6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_frag.frag
@@ -0,0 +1,102 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declarations.
+vec4 function(out vec4 par[3]);
+bool is_all(const in vec4 par, const in float value);
+bool is_all(const in vec4 array[3], const in vec4 value);
+void set_all(out vec4 array[3], const in vec4 value);
+
+void main (void)
+{
+ vec4 par[3];
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, vec4(1.0, 1.0, 1.0, 1.0));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, vec4(0.0, 0.0, 0.0, 0.0)) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definitions.
+vec4 function(out vec4 par[3])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, vec4(0.0, 0.0, 0.0, 0.0));
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in vec4 array[3], const in vec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 array[3], const in vec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_vert.vert
new file mode 100644
index 000000000..df37032af
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_vert.vert
@@ -0,0 +1,102 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declarations.
+vec4 function(out vec4 par[3]);
+bool is_all(const in vec4 par, const in float value);
+bool is_all(const in vec4 array[3], const in vec4 value);
+void set_all(out vec4 array[3], const in vec4 value);
+
+void main (void)
+{
+ vec4 par[3];
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ // Initialize the entire array to 1.0.
+ set_all(par, vec4(1.0, 1.0, 1.0, 1.0));
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, vec4(0.0, 0.0, 0.0, 0.0)) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definitions.
+vec4 function(out vec4 par[3])
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, vec4(0.0, 0.0, 0.0, 0.0));
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+bool is_all(const in vec4 array[3], const in vec4 value)
+{
+ bool ret = true;
+
+ if(array[0] != value)
+ ret = false;
+ if(array[1] != value)
+ ret = false;
+ if(array[2] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 array[3], const in vec4 value)
+{
+ array[0] = value;
+ array[1] = value;
+ array[2] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_frag.frag
new file mode 100644
index 000000000..403d87565
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_frag.frag
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+// Function declaration.
+vec4 function(out vec4 par);
+bool is_all(const in vec4 par, const in float value);
+void set_all(out vec4 par, const in float value);
+
+void main (void)
+{
+ vec4 par = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, 0.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+vec4 function(out vec4 par)
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 par, const in float value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_vert.vert
new file mode 100644
index 000000000..070945644
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_vert.vert
@@ -0,0 +1,85 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+// Function declaration.
+vec4 function(out vec4 par);
+bool is_all(const in vec4 par, const in float value);
+void set_all(out vec4 par, const in float value);
+
+void main (void)
+{
+ vec4 par = vec4(1.0, 1.0, 1.0, 1.0);
+ vec4 ret = vec4(0.0, 0.0, 0.0, 0.0);
+
+ float gray = 0.0;
+
+ ret = function(par);
+
+ // The parameter should be changed by the function and the function should return 1.0.
+ if(is_all(par, 0.0) && is_all(ret, 1.0))
+ {
+ gray = 1.0;
+ }
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+vec4 function(out vec4 par)
+{
+ // Test parameter qualifier (default is "in").
+ set_all(par, 0.0);
+
+ return vec4(1.0, 1.0, 1.0, 1.0);
+}
+
+bool is_all(const in vec4 par, const in float value)
+{
+ bool ret = true;
+
+ if(par[0] != value)
+ ret = false;
+ if(par[1] != value)
+ ret = false;
+ if(par[2] != value)
+ ret = false;
+ if(par[3] != value)
+ ret = false;
+
+ return ret;
+}
+
+void set_all(out vec4 par, const in float value)
+{
+ par[0] = value;
+ par[1] = value;
+ par[2] = value;
+ par[3] = value;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/void_empty_empty_void_empty_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/void_empty_empty_void_empty_frag.frag
new file mode 100644
index 000000000..c926874ad
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/void_empty_empty_void_empty_frag.frag
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float gray = 0.0;
+
+// Function declaration.
+void function(void);
+
+void main (void)
+{
+ gray = 0.0;
+
+ function();
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
+// Function definition.
+void function(void)
+{
+ gray = 1.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/void_empty_empty_void_empty_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/void_empty_empty_void_empty_vert.vert
new file mode 100644
index 000000000..ebb2711ce
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/void_empty_empty_void_empty_vert.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+float gray = 0.0;
+
+// Function declaration.
+void function(void);
+
+void main (void)
+{
+ gray = 0.0;
+
+ function();
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+// Function definition.
+void function(void)
+{
+ gray = 1.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_001_to_003.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_001_to_003.html
new file mode 100644
index 000000000..9b1a509bf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_001_to_003.html
@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: gl_FragCoord_001_to_003.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_FragCoord_xy_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_FragCoord_xy_frag.frag"
+ },
+ "name": "gl_FragCoord_xy_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "gl_FragCoord_z_frag_ref.vert",
+ "fragmentShader": "gl_FragCoord_z_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_FragCoord_z_frag.frag"
+ },
+ "name": "gl_FragCoord_z_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.5,
+ 0.5,
+ 0.5,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_FragCoord_w_frag.frag"
+ },
+ "name": "gl_FragCoord_w_frag.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_w_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_w_frag.frag
new file mode 100644
index 000000000..3efa089c7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_w_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main(void)
+{
+ gl_FragColor = vec4(vec3(gl_FragCoord.w), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_xy_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_xy_frag.frag
new file mode 100644
index 000000000..722b9a70e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_xy_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float viewportwidth;
+uniform float viewportheight;
+
+void main(void)
+{
+ // The image width is 500 so scale the position to 0...1 for color
+ gl_FragColor = vec4(gl_FragCoord.x /viewportwidth , gl_FragCoord.y/viewportheight, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_xy_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_xy_frag_ref.frag
new file mode 100644
index 000000000..29a66e1b0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_xy_frag_ref.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main(void)
+{
+ // The image width is 500x500 and the rectangle is 434x434
+ // The green component corresponds to x (0...1 left to right) and the
+ // blue component corresponds to y (0...1 bottom to top)
+ gl_FragColor = vec4((434.0 / 500.0) * (color.gb - 0.5) + 0.5, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag.frag
new file mode 100644
index 000000000..a18d52494
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag.frag
@@ -0,0 +1,32 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main(void)
+{
+ gl_FragColor = vec4(vec3(gl_FragCoord.z), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag_ref.frag
new file mode 100644
index 000000000..7be3a42fa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag_ref.frag
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 position;
+
+void main(void)
+{
+ // Normalized device coordinates
+ float z = position.z / position.w;
+ float f = gl_DepthRange.far;
+ float n = gl_DepthRange.near;
+
+ // Window coordinates
+ z = ((f - n) / 2.0) * z + (f + n) / 2.0;
+
+ gl_FragColor = vec4(vec3(z), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag_ref.vert
new file mode 100644
index 000000000..2779f89e2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 position;
+
+void main(void)
+{
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+ // Vertex's clip coordinates
+ position = gl_Position;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/input.run.txt
new file mode 100644
index 000000000..588cde7bf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+gl_FragCoord_001_to_003.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html
new file mode 100644
index 000000000..4b731e9c5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: gl_FrontFacing_001_to_001.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "frontbacksquare",
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "gl_FrontFacing_frag.frag"
+ },
+ "name": "gl_FrontFacing_frag.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_frag.frag
new file mode 100644
index 000000000..0c8d629ba
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+void main(void)
+{
+ if(gl_FrontFacing)
+ gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+ else
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/input.run.txt
new file mode 100644
index 000000000..624441919
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+gl_FrontFacing_001_to_001.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_001_to_008.html
new file mode 100644
index 000000000..e904da5a0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: greaterThan_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThan_vec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThan_vec2_frag.frag"
+ },
+ "name": "greaterThan_vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "greaterThan_vec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "greaterThan_vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "greaterThan_vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThan_vec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThan_vec3_frag.frag"
+ },
+ "name": "greaterThan_vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "greaterThan_vec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "greaterThan_vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "greaterThan_vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThan_ivec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThan_ivec2_frag.frag"
+ },
+ "name": "greaterThan_ivec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "greaterThan_ivec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "greaterThan_ivec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "greaterThan_ivec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThan_ivec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThan_ivec3_frag.frag"
+ },
+ "name": "greaterThan_ivec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "greaterThan_ivec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "greaterThan_ivec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "greaterThan_ivec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_frag.frag
new file mode 100644
index 000000000..58d0fb5bb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(greaterThan(ivec2(c), ivec2(0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_frag_ref.frag
new file mode 100644
index 000000000..8076d322a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_frag_ref.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec2 gt(in ivec2 a, in ivec2 b)
+{
+ bvec2 result;
+ if(a[0] > b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] > b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(gt(ivec2(c), ivec2(0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_vert.vert
new file mode 100644
index 000000000..b22fdd489
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(greaterThan(ivec2(c), ivec2(0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_vert_ref.vert
new file mode 100644
index 000000000..bfd86980d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 gt(in ivec2 a, in ivec2 b)
+{
+ bvec2 result;
+ if(a[0] > b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] > b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(gt(ivec2(c), ivec2(0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_frag.frag
new file mode 100644
index 000000000..c236c7fab
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(greaterThan(ivec3(c), ivec3(0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_frag_ref.frag
new file mode 100644
index 000000000..b80c57649
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 gt(in ivec3 a, in ivec3 b)
+{
+ bvec3 result;
+ if(a[0] > b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] > b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] > b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(gt(ivec3(c), ivec3(0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_vert.vert
new file mode 100644
index 000000000..1161ff5e7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(greaterThan(ivec3(c), ivec3(0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_vert_ref.vert
new file mode 100644
index 000000000..e17a32af1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 gt(in ivec3 a, in ivec3 b)
+{
+ bvec3 result;
+ if(a[0] > b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] > b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] > b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(gt(ivec3(c), ivec3(0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_frag.frag
new file mode 100644
index 000000000..cde28a320
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(greaterThan(c, vec2(0.0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_frag_ref.frag
new file mode 100644
index 000000000..042b25bf5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_frag_ref.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+bvec2 gt(in vec2 a, in vec2 b)
+{
+ bvec2 result;
+ if(a[0] > b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] > b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(gt(c, vec2(0.0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_vert.vert
new file mode 100644
index 000000000..40155f243
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(greaterThan(c, vec2(0.0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_vert_ref.vert
new file mode 100644
index 000000000..2ba23bd8f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 gt(in vec2 a, in vec2 b)
+{
+ bvec2 result;
+ if(a[0] > b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] > b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(gt(c, vec2(0.0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_frag.frag
new file mode 100644
index 000000000..9d8352fc1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(greaterThan(c, vec3(0.0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_frag_ref.frag
new file mode 100644
index 000000000..2e7b8c4a1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 gt(in vec3 a, in vec3 b)
+{
+ bvec3 result;
+ if(a[0] > b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] > b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] > b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(gt(c, vec3(0.0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_vert.vert
new file mode 100644
index 000000000..8958a1abc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(greaterThan(c, vec3(0.0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_vert_ref.vert
new file mode 100644
index 000000000..e51ff3009
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 gt(in vec3 a, in vec3 b)
+{
+ bvec3 result;
+ if(a[0] > b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] > b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] > b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(gt(c, vec3(0.0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/input.run.txt
new file mode 100644
index 000000000..9d2acae74
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+greaterThan_001_to_008.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_001_to_008.html
new file mode 100644
index 000000000..7a32ff429
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: greaterThanEqual_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThanEqual_vec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThanEqual_vec2_frag.frag"
+ },
+ "name": "greaterThanEqual_vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "greaterThanEqual_vec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "greaterThanEqual_vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "greaterThanEqual_vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThanEqual_vec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThanEqual_vec3_frag.frag"
+ },
+ "name": "greaterThanEqual_vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "greaterThanEqual_vec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "greaterThanEqual_vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "greaterThanEqual_vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThanEqual_ivec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThanEqual_ivec2_frag.frag"
+ },
+ "name": "greaterThanEqual_ivec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "greaterThanEqual_ivec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "greaterThanEqual_ivec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "greaterThanEqual_ivec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThanEqual_ivec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "greaterThanEqual_ivec3_frag.frag"
+ },
+ "name": "greaterThanEqual_ivec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "greaterThanEqual_ivec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "greaterThanEqual_ivec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "greaterThanEqual_ivec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_frag.frag
new file mode 100644
index 000000000..4d9082c19
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(greaterThanEqual(ivec2(c), ivec2(0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_frag_ref.frag
new file mode 100644
index 000000000..e49d6c58a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_frag_ref.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec2 gte(in ivec2 a, in ivec2 b)
+{
+ bvec2 result;
+ if(a[0] >= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] >= b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(gte(ivec2(c), ivec2(0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_vert.vert
new file mode 100644
index 000000000..6f99994df
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(greaterThanEqual(ivec2(c), ivec2(0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_vert_ref.vert
new file mode 100644
index 000000000..d876f2432
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 gte(in ivec2 a, in ivec2 b)
+{
+ bvec2 result;
+ if(a[0] >= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] >= b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(gte(ivec2(c), ivec2(0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_frag.frag
new file mode 100644
index 000000000..f0477e102
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(greaterThanEqual(ivec3(c), ivec3(0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_frag_ref.frag
new file mode 100644
index 000000000..5db473dad
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 gte(in ivec3 a, in ivec3 b)
+{
+ bvec3 result;
+ if(a[0] >= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] >= b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] >= b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(gte(ivec3(c), ivec3(0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_vert.vert
new file mode 100644
index 000000000..1f313ee09
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(greaterThanEqual(ivec3(c), ivec3(0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_vert_ref.vert
new file mode 100644
index 000000000..08d8584c7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 gte(in ivec3 a, in ivec3 b)
+{
+ bvec3 result;
+ if(a[0] >= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] >= b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] >= b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(gte(ivec3(c), ivec3(0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_frag.frag
new file mode 100644
index 000000000..5c22c3d8f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(greaterThanEqual(c, vec2(0.0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_frag_ref.frag
new file mode 100644
index 000000000..4d574e188
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_frag_ref.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+bvec2 gte(in vec2 a, in vec2 b)
+{
+ bvec2 result;
+ if(a[0] >= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] >= b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(gte(c, vec2(0.0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_vert.vert
new file mode 100644
index 000000000..640a258ec
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(greaterThanEqual(c, vec2(0.0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_vert_ref.vert
new file mode 100644
index 000000000..018777eab
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 gte(in vec2 a, in vec2 b)
+{
+ bvec2 result;
+ if(a[0] >= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] >= b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(gte(c, vec2(0.0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_frag.frag
new file mode 100644
index 000000000..1cdadb387
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(greaterThanEqual(c, vec3(0.0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_frag_ref.frag
new file mode 100644
index 000000000..0c499bf3a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 gte(in vec3 a, in vec3 b)
+{
+ bvec3 result;
+ if(a[0] >= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] >= b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] >= b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(gte(c, vec3(0.0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_vert.vert
new file mode 100644
index 000000000..0be1185d9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(greaterThanEqual(c, vec3(0.0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_vert_ref.vert
new file mode 100644
index 000000000..771b86f1f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 gte(in vec3 a, in vec3 b)
+{
+ bvec3 result;
+ if(a[0] >= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] >= b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] >= b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(gte(c, vec3(0.0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/input.run.txt
new file mode 100644
index 000000000..456288301
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+greaterThanEqual_001_to_008.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/input.run.txt
new file mode 100644
index 000000000..6eb579d47
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+inversesqrt_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_001_to_006.html
new file mode 100644
index 000000000..be770b5ab
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: inversesqrt_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "inversesqrt_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "inversesqrt_float_frag_xvary.frag"
+ },
+ "name": "inversesqrt_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "inversesqrt_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "inversesqrt_vec2_frag_xvary.frag"
+ },
+ "name": "inversesqrt_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "inversesqrt_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "inversesqrt_vec3_frag_xvary.frag"
+ },
+ "name": "inversesqrt_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "inversesqrt_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "inversesqrt_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "inversesqrt_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "inversesqrt_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "inversesqrt_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "inversesqrt_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "inversesqrt_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "inversesqrt_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "inversesqrt_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_frag_xvary.frag
new file mode 100644
index 000000000..f0e126954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = (color.r * 99.0) + 1.0;
+ gl_FragColor = vec4(inversesqrt(c), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..440b90b6e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_frag_xvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = (color.r * 99.0) + 1.0;
+ gl_FragColor = vec4(1.0 / sqrt(c), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_vert_xvary.vert
new file mode 100644
index 000000000..07f52dfcb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = (gtf_Color.r * 99.0) + 1.0;
+ color = vec4(inversesqrt(c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..293646aab
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_vert_xvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = (gtf_Color.r * 99.0) + 1.0;
+ color = vec4(1.0 / sqrt(c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_frag_xvary.frag
new file mode 100644
index 000000000..b7bfff052
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = (color.rg * 99.0) + 1.0;
+ gl_FragColor = vec4(inversesqrt(c), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..073da26ec
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_frag_xvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = (color.rg * 99.0) + 1.0;
+ gl_FragColor = vec4(1.0 / sqrt(c), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_vert_xvary.vert
new file mode 100644
index 000000000..cab16ca18
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = (gtf_Color.rg * 99.0) + 1.0;
+ color = vec4(inversesqrt(c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..5fa949693
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_vert_xvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = (gtf_Color.rg * 99.0) + 1.0;
+ color = vec4(1.0 / sqrt(c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_frag_xvary.frag
new file mode 100644
index 000000000..935fd3ef7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = (color.rgb * 99.0) + 1.0;
+ gl_FragColor = vec4(inversesqrt(c), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..608253211
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_frag_xvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = (color.rgb * 99.0) + 1.0;
+ gl_FragColor = vec4(1.0 / sqrt(c), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_vert_xvary.vert
new file mode 100644
index 000000000..2cdd75937
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = (gtf_Color.rgb * 99.0) + 1.0;
+ color = vec4(inversesqrt(c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..f69629c79
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_vert_xvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = (gtf_Color.rgb * 99.0) + 1.0;
+ color = vec4(1.0 / sqrt(c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/input.run.txt
new file mode 100644
index 000000000..9a3147ec3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+length_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_001_to_006.html
new file mode 100644
index 000000000..f89ff7d63
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: length_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "length_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "length_float_frag_xvary.frag"
+ },
+ "name": "length_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "length_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "length_vec2_frag_xvary.frag"
+ },
+ "name": "length_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "length_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "length_vec3_frag_xvary.frag"
+ },
+ "name": "length_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "length_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "length_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "length_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "length_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "length_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "length_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "length_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "length_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "length_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_frag_xvary.frag
new file mode 100644
index 000000000..a82c9d35b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_frag_xvary.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(length(color.r)), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..1d8b5594d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_frag_xvary_ref.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(color.r), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_vert_xvary.vert
new file mode 100644
index 000000000..97fc87505
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_vert_xvary.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(length(gtf_Color.r)), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..3d37b84fd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_vert_xvary_ref.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(gtf_Color.r), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_frag_xvary.frag
new file mode 100644
index 000000000..2d824ff60
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_frag_xvary.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(length(color.rg) / 2.0), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..f322b4d5f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_frag_xvary_ref.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(sqrt(color.r*color.r + color.g*color.g) / 2.0), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_vert_xvary.vert
new file mode 100644
index 000000000..5becfad21
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_vert_xvary.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(length(gtf_Color.rg) / 2.0), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..37f22c220
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_vert_xvary_ref.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(sqrt(gtf_Color.r*gtf_Color.r + gtf_Color.g*gtf_Color.g) / 2.0), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_frag_xvary.frag
new file mode 100644
index 000000000..7423f4c4c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_frag_xvary.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(length(color.rgb) / 3.0), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..f817d2b0f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_frag_xvary_ref.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(vec3(sqrt(color.r*color.r + color.g*color.g + color.b*color.b) / 3.0), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_vert_xvary.vert
new file mode 100644
index 000000000..2dc32aceb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_vert_xvary.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(length(gtf_Color.rgb) / 3.0), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..a4c07f034
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_vert_xvary_ref.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vec3(sqrt(gtf_Color.r*gtf_Color.r + gtf_Color.g*gtf_Color.g + gtf_Color.b*gtf_Color.b) / 3.0), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/input.run.txt
new file mode 100644
index 000000000..f49c916d9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+lessThan_001_to_008.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_001_to_008.html
new file mode 100644
index 000000000..0e94d23bc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: lessThan_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThan_vec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThan_vec2_frag.frag"
+ },
+ "name": "lessThan_vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "lessThan_vec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "lessThan_vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "lessThan_vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThan_vec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThan_vec3_frag.frag"
+ },
+ "name": "lessThan_vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "lessThan_vec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "lessThan_vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "lessThan_vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThan_ivec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThan_ivec2_frag.frag"
+ },
+ "name": "lessThan_ivec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "lessThan_ivec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "lessThan_ivec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "lessThan_ivec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThan_ivec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThan_ivec3_frag.frag"
+ },
+ "name": "lessThan_ivec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "lessThan_ivec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "lessThan_ivec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "lessThan_ivec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_frag.frag
new file mode 100644
index 000000000..869b5f762
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lessThan(ivec2(c), ivec2(0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_frag_ref.frag
new file mode 100644
index 000000000..c13a2268a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_frag_ref.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec2 lt(in ivec2 a, in ivec2 b)
+{
+ bvec2 result;
+ if(a[0] < b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] < b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lt(ivec2(c), ivec2(0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_vert.vert
new file mode 100644
index 000000000..7beff555f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lessThan(ivec2(c), ivec2(0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_vert_ref.vert
new file mode 100644
index 000000000..5ab80c2ff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 lt(in ivec2 a, in ivec2 b)
+{
+ bvec2 result;
+ if(a[0] < b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] < b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lt(ivec2(c), ivec2(0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_frag.frag
new file mode 100644
index 000000000..ab8ab911b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lessThan(ivec3(c), ivec3(0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_frag_ref.frag
new file mode 100644
index 000000000..95ec76e82
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 lt(in ivec3 a, in ivec3 b)
+{
+ bvec3 result;
+ if(a[0] < b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] < b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] < b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lt(ivec3(c), ivec3(0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_vert.vert
new file mode 100644
index 000000000..7639cbeb3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lessThan(ivec3(c), ivec3(0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_vert_ref.vert
new file mode 100644
index 000000000..50d690f7c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 lt(in ivec3 a, in ivec3 b)
+{
+ bvec3 result;
+ if(a[0] < b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] < b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] < b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lt(ivec3(c), ivec3(0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_frag.frag
new file mode 100644
index 000000000..6302e2c8a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lessThan(c, vec2(0.0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_frag_ref.frag
new file mode 100644
index 000000000..1d6828899
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_frag_ref.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+bvec2 lt(in vec2 a, in vec2 b)
+{
+ bvec2 result;
+ if(a[0] < b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] < b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lt(c, vec2(0.0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_vert.vert
new file mode 100644
index 000000000..4bf52729f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lessThan(c, vec2(0.0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_vert_ref.vert
new file mode 100644
index 000000000..7a531cacf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 lt(in vec2 a, in vec2 b)
+{
+ bvec2 result;
+ if(a[0] < b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] < b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lt(c, vec2(0.0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_frag.frag
new file mode 100644
index 000000000..e934d82af
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lessThan(c, vec3(0.0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_frag_ref.frag
new file mode 100644
index 000000000..c982fd107
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 lt(in vec3 a, in vec3 b)
+{
+ bvec3 result;
+ if(a[0] < b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] < b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] < b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lt(c, vec3(0.0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_vert.vert
new file mode 100644
index 000000000..a1df0d7d1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lessThan(c, vec3(0.0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_vert_ref.vert
new file mode 100644
index 000000000..e432113b2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 lt(in vec3 a, in vec3 b)
+{
+ bvec3 result;
+ if(a[0] < b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] < b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] < b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lt(c, vec3(0.0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/input.run.txt
new file mode 100644
index 000000000..656332ccc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+lessThanEqual_001_to_008.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_001_to_008.html
new file mode 100644
index 000000000..b6c806629
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: lessThanEqual_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThanEqual_vec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThanEqual_vec2_frag.frag"
+ },
+ "name": "lessThanEqual_vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "lessThanEqual_vec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "lessThanEqual_vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "lessThanEqual_vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThanEqual_vec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThanEqual_vec3_frag.frag"
+ },
+ "name": "lessThanEqual_vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "lessThanEqual_vec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "lessThanEqual_vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "lessThanEqual_vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThanEqual_ivec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThanEqual_ivec2_frag.frag"
+ },
+ "name": "lessThanEqual_ivec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "lessThanEqual_ivec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "lessThanEqual_ivec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "lessThanEqual_ivec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThanEqual_ivec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "lessThanEqual_ivec3_frag.frag"
+ },
+ "name": "lessThanEqual_ivec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "lessThanEqual_ivec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "lessThanEqual_ivec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "lessThanEqual_ivec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_frag.frag
new file mode 100644
index 000000000..3c858795a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lessThanEqual(ivec2(c), ivec2(0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_frag_ref.frag
new file mode 100644
index 000000000..f9217e1fd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_frag_ref.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec2 lte(in ivec2 a, in ivec2 b)
+{
+ bvec2 result;
+ if(a[0] <= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] <= b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lte(ivec2(c), ivec2(0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_vert.vert
new file mode 100644
index 000000000..d4681be42
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lessThanEqual(ivec2(c), ivec2(0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_vert_ref.vert
new file mode 100644
index 000000000..101da9695
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 lte(in ivec2 a, in ivec2 b)
+{
+ bvec2 result;
+ if(a[0] <= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] <= b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lte(ivec2(c), ivec2(0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_frag.frag
new file mode 100644
index 000000000..570911080
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lessThanEqual(ivec3(c), ivec3(0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_frag_ref.frag
new file mode 100644
index 000000000..cbd52545a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 lte(in ivec3 a, in ivec3 b)
+{
+ bvec3 result;
+ if(a[0] <= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] <= b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] <= b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lte(ivec3(c), ivec3(0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_vert.vert
new file mode 100644
index 000000000..305baf75a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lessThanEqual(ivec3(c), ivec3(0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_vert_ref.vert
new file mode 100644
index 000000000..88e4ebdfd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 lte(in ivec3 a, in ivec3 b)
+{
+ bvec3 result;
+ if(a[0] <= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] <= b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] <= b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lte(ivec3(c), ivec3(0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_frag.frag
new file mode 100644
index 000000000..cb6963134
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lessThanEqual(c, vec2(0.0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_frag_ref.frag
new file mode 100644
index 000000000..817e52d57
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_frag_ref.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+bvec2 lte(in vec2 a, in vec2 b)
+{
+ bvec2 result;
+ if(a[0] <= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] <= b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lte(c, vec2(0.0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_vert.vert
new file mode 100644
index 000000000..cf96c2d94
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lessThanEqual(c, vec2(0.0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_vert_ref.vert
new file mode 100644
index 000000000..30ad6b42d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 lte(in vec2 a, in vec2 b)
+{
+ bvec2 result;
+ if(a[0] <= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] <= b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(lte(c, vec2(0.0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_frag.frag
new file mode 100644
index 000000000..8fbc7c1da
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lessThanEqual(c, vec3(0.0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_frag_ref.frag
new file mode 100644
index 000000000..f57661a34
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 lte(in vec3 a, in vec3 b)
+{
+ bvec3 result;
+ if(a[0] <= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] <= b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] <= b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lte(c, vec3(0.0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_vert.vert
new file mode 100644
index 000000000..c69bb0155
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lessThanEqual(c, vec3(0.0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_vert_ref.vert
new file mode 100644
index 000000000..08324d8fe
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 lte(in vec3 a, in vec3 b)
+{
+ bvec3 result;
+ if(a[0] <= b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] <= b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] <= b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(lte(c, vec3(0.0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/input.run.txt
new file mode 100644
index 000000000..beb1561c1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/input.run.txt
@@ -0,0 +1,3 @@
+# this file is auto-generated. DO NOT EDIT.
+log_001_to_008.html
+log_009_to_012.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html
new file mode 100644
index 000000000..3e5726fcc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: log_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log_float_frag_xvary.frag"
+ },
+ "name": "log_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log_float_frag_xvary01_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log_float_frag_xvary01.frag"
+ },
+ "name": "log_float_frag_xvary01.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log_vec2_frag_xvary.frag"
+ },
+ "name": "log_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log_vec2_frag_xvary01_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log_vec2_frag_xvary01.frag"
+ },
+ "name": "log_vec2_frag_xvary01.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log_vec3_frag_xvary.frag"
+ },
+ "name": "log_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log_vec3_frag_xvary01_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log_vec3_frag_xvary01.frag"
+ },
+ "name": "log_vec3_frag_xvary01.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "log_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "log_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "log_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "log_float_vert_xvary01_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "log_float_vert_xvary01.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "log_float_vert_xvary01.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_009_to_012.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_009_to_012.html
new file mode 100644
index 000000000..cb7863295
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_009_to_012.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: log_009_to_012.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "log_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "log_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "log_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "log_vec2_vert_xvary01_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "log_vec2_vert_xvary01.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "log_vec2_vert_xvary01.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "log_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "log_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "log_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "log_vec3_vert_xvary01_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "log_vec3_vert_xvary01.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "log_vec3_vert_xvary01.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary.frag
new file mode 100644
index 000000000..c4685cc82
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 31.0 * color.r + 1.0;
+ gl_FragColor = vec4(log(c) / 3.466, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary01.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary01.frag
new file mode 100644
index 000000000..c9a26bc03
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary01.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = (color.r + 0.01) / 1.01;
+ gl_FragColor = vec4(log(c) / -4.61, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary01_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary01_ref.frag
new file mode 100644
index 000000000..c255e618b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary01_ref.frag
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float x = (color.r + 0.01) / 1.01;
+ float y = 0.0;
+ float z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ // Note: z will always be negative between 0.01 and 1.0 and
+ // so will y since it is raised to an odd power, and the shader spec
+ // does not support pow(-x, y) where y is not a compile time constant
+ z = abs((x - 1.0) / (x + 1.0));
+ float p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= -2.0;
+
+ gl_FragColor = vec4(y / -4.61, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..472235d60
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary_ref.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float x = 31.0 * color.r + 1.0;
+ float y = 0.0;
+ float z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ z = (x - 1.0) / (x + 1.0);
+ float p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= 2.0;
+
+ gl_FragColor = vec4(y / 3.466, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary.vert
new file mode 100644
index 000000000..b6361d1d6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 31.0 * gtf_Color.r + 1.0;
+ color = vec4(log(c) / 3.466, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary01.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary01.vert
new file mode 100644
index 000000000..258894e5a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary01.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = (gtf_Color.r + 0.01) / 1.01;
+ color = vec4(log(c) / -4.61, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary01_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary01_ref.vert
new file mode 100644
index 000000000..fb19501b2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary01_ref.vert
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float x = (gtf_Color.r + 0.01) / 1.01;
+ float y = 0.0;
+ float z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ // Note: z will always be negative between 0.01 and 1.0 and
+ // so will y since it is raised to an odd power, and the shader spec
+ // does not support pow(-x, y) where y is not a compile time constant
+ z = abs((x - 1.0) / (x + 1.0));
+ float p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= -2.0;
+
+ color = vec4(y / -4.61, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..4df24e358
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary_ref.vert
@@ -0,0 +1,51 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float x = 31.0 * gtf_Color.r + 1.0;
+ float y = 0.0;
+ float z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ z = (x - 1.0) / (x + 1.0);
+ float p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= 2.0;
+
+ color = vec4(y / 3.466, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary.frag
new file mode 100644
index 000000000..9ecfb2576
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 31.0 * color.rg + 1.0;
+ gl_FragColor = vec4(log(c) / 3.466, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary01.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary01.frag
new file mode 100644
index 000000000..9b36e90c3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary01.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = (color.rg + 0.01) / 1.01;
+ gl_FragColor = vec4(log(c) / -4.61, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary01_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary01_ref.frag
new file mode 100644
index 000000000..5496f9db1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary01_ref.frag
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 x = (color.rg + 0.01) / 1.01;
+ vec2 y = vec2(0.0);
+ vec2 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ // Note: z will always be negative between 0.01 and 1.0 and
+ // so will y since it is raised to an odd power, and the shader spec
+ // does not support pow(-x, y) where y is not a compile time constant
+ z = abs((x - 1.0) / (x + 1.0));
+ vec2 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= -2.0;
+
+ gl_FragColor = vec4(y / -4.61, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..01d706c9d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary_ref.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 x = 31.0 * color.rg + 1.0;
+ vec2 y = vec2(0.0);
+ vec2 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ z = (x - 1.0) / (x + 1.0);
+ vec2 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= 2.0;
+
+ gl_FragColor = vec4(y / 3.466, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary.vert
new file mode 100644
index 000000000..95dbc058b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 31.0 * gtf_Color.rg + 1.0;
+ color = vec4(log(c) / 3.466, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary01.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary01.vert
new file mode 100644
index 000000000..9bd23ab76
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary01.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = (gtf_Color.rg + 0.01) / 1.01;
+ color = vec4(log(c) / -4.61, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary01_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary01_ref.vert
new file mode 100644
index 000000000..3a23b5aa6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary01_ref.vert
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 x = (gtf_Color.rg + 0.01) / 1.01;
+ vec2 y = vec2(0.0);
+ vec2 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ // Note: z will always be negative between 0.01 and 1.0 and
+ // so will y since it is raised to an odd power, and the shader spec
+ // does not support pow(-x, y) where y is not a compile time constant
+ z = abs((x - 1.0) / (x + 1.0));
+ vec2 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= -2.0;
+
+ color = vec4(y / -4.61, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..4996ed1ee
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary_ref.vert
@@ -0,0 +1,51 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 x = 31.0 * gtf_Color.rg + 1.0;
+ vec2 y = vec2(0.0);
+ vec2 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ z = (x - 1.0) / (x + 1.0);
+ vec2 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= 2.0;
+
+ color = vec4(y / 3.466, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary.frag
new file mode 100644
index 000000000..eb2db1ac8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 31.0 * color.rgb + 1.0;
+ gl_FragColor = vec4(log(c) / 3.466, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary01.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary01.frag
new file mode 100644
index 000000000..a19f80ebc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary01.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = (color.rgb + 0.01) / 1.01;
+ gl_FragColor = vec4(log(c) / -4.61, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary01_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary01_ref.frag
new file mode 100644
index 000000000..1bdcbc690
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary01_ref.frag
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 x = (color.rgb + 0.01) / 1.01;
+ vec3 y = vec3(0.0);
+ vec3 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ // Note: z will always be negative between 0.01 and 1.0 and
+ // so will y since it is raised to an odd power, and the shader spec
+ // does not support pow(-x, y) where y is not a compile time constant
+ z = abs((x - 1.0) / (x + 1.0));
+ vec3 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= -2.0;
+
+ gl_FragColor = vec4(y / -4.61, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..74f4cd890
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary_ref.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 x = 31.0 * color.rgb + 1.0;
+ vec3 y = vec3(0.0);
+ vec3 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ z = (x - 1.0) / (x + 1.0);
+ vec3 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= 2.0;
+
+ gl_FragColor = vec4(y / 3.466, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary.vert
new file mode 100644
index 000000000..76627e5fd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 31.0 * gtf_Color.rgb + 1.0;
+ color = vec4(log(c) / 3.466, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary01.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary01.vert
new file mode 100644
index 000000000..48d13cd75
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary01.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = (gtf_Color.rgb + 0.01) / 1.01;
+ color = vec4(log(c) / -4.61, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary01_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary01_ref.vert
new file mode 100644
index 000000000..3905ef7cb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary01_ref.vert
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 x = (gtf_Color.rgb + 0.01) / 1.01;
+ vec3 y = vec3(0.0);
+ vec3 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ // Note: z will always be negative between 0.01 and 1.0 and
+ // so will y since it is raised to an odd power, and the shader spec
+ // does not support pow(-x, y) where y is not a compile time constant
+ z = abs((x - 1.0) / (x + 1.0));
+ vec3 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= -2.0;
+
+ color = vec4(y / -4.61, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..c17738cfb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary_ref.vert
@@ -0,0 +1,51 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 x = 31.0 * gtf_Color.rgb + 1.0;
+ vec3 y = vec3(0.0);
+ vec3 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ z = (x - 1.0) / (x + 1.0);
+ vec3 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= 2.0;
+
+ color = vec4(y / 3.466, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/input.run.txt
new file mode 100644
index 000000000..4205bf17c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/input.run.txt
@@ -0,0 +1,3 @@
+# this file is auto-generated. DO NOT EDIT.
+log2_001_to_008.html
+log2_009_to_012.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html
new file mode 100644
index 000000000..386df4cb2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: log2_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log2_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log2_float_frag_xvary.frag"
+ },
+ "name": "log2_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log2_float_frag_xvary01_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log2_float_frag_xvary01.frag"
+ },
+ "name": "log2_float_frag_xvary01.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log2_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log2_vec2_frag_xvary.frag"
+ },
+ "name": "log2_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log2_vec2_frag_xvary01_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log2_vec2_frag_xvary01.frag"
+ },
+ "name": "log2_vec2_frag_xvary01.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log2_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log2_vec3_frag_xvary.frag"
+ },
+ "name": "log2_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log2_vec3_frag_xvary01_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "log2_vec3_frag_xvary01.frag"
+ },
+ "name": "log2_vec3_frag_xvary01.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "log2_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "log2_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "log2_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "log2_float_vert_xvary01_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "log2_float_vert_xvary01.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "log2_float_vert_xvary01.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_009_to_012.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_009_to_012.html
new file mode 100644
index 000000000..e6a497812
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_009_to_012.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: log2_009_to_012.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "log2_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "log2_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "log2_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "log2_vec2_vert_xvary01_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "log2_vec2_vert_xvary01.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "log2_vec2_vert_xvary01.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "log2_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "log2_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "log2_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "log2_vec3_vert_xvary01_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "log2_vec3_vert_xvary01.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "log2_vec3_vert_xvary01.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary.frag
new file mode 100644
index 000000000..06c6a090a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 31.0 * color.r + 1.0;
+ gl_FragColor = vec4(log2(c) / 5.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary01.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary01.frag
new file mode 100644
index 000000000..a6f3341ce
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary01.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = (color.r + 0.01) / 1.01;
+ gl_FragColor = vec4(log2(c) / -8.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary01_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary01_ref.frag
new file mode 100644
index 000000000..2185924ef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary01_ref.frag
@@ -0,0 +1,56 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+const float ln2 = 0.69314718055994530941723212145818;
+
+
+
+void main (void)
+{
+ float x = (color.r + 0.01) / 1.01;
+ float y = 0.0;
+ float z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ // Note: z will always be negative between 0.01 and 1.0 and
+ // so will y since it is raised to an odd power, and the shader spec
+ // does not support pow(-x, y) where y is not a compile time constant
+ z = abs((x - 1.0) / (x + 1.0));
+ float p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= -2.0 / ln2;
+
+ gl_FragColor = vec4(y / -8.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..c43ea54d0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary_ref.frag
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+const float ln2 = 0.69314718055994530941723212145818;
+
+
+
+void main (void)
+{
+ float x = 31.0 * color.r + 1.0;
+ float y = 0.0;
+ float z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ z = (x - 1.0) / (x + 1.0);
+ float p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= 2.0 / ln2;
+
+ gl_FragColor = vec4(y / 5.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary.vert
new file mode 100644
index 000000000..51123e0cd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 31.0 * gtf_Color.r + 1.0;
+ color = vec4(log2(c) / 5.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary01.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary01.vert
new file mode 100644
index 000000000..1356d8dbd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary01.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = (gtf_Color.r + 0.01) / 1.01;
+ color = vec4(log2(c) / -8.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary01_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary01_ref.vert
new file mode 100644
index 000000000..4871f988b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary01_ref.vert
@@ -0,0 +1,57 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+const float ln2 = 0.69314718055994530941723212145818;
+
+
+
+void main (void)
+{
+ float x = (gtf_Color.r + 0.01) / 1.01;
+ float y = 0.0;
+ float z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ // Note: z will always be negative between 0.01 and 1.0 and
+ // so will y since it is raised to an odd power, and the shader spec
+ // does not support pow(-x, y) where y is not a compile time constant
+ z = abs((x - 1.0) / (x + 1.0));
+ float p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= -2.0 / ln2;
+
+ color = vec4(y / -8.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..ba305ff36
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary_ref.vert
@@ -0,0 +1,52 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+const float ln2 = 0.69314718055994530941723212145818;
+
+void main (void)
+{
+ float x = 31.0 * gtf_Color.r + 1.0;
+ float y = 0.0;
+ float z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ z = (x - 1.0) / (x + 1.0);
+ float p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= 2.0 / ln2;
+
+ color = vec4(y / 5.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary.frag
new file mode 100644
index 000000000..e103f8fe5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 31.0 * color.rg + 1.0;
+ gl_FragColor = vec4(log2(c) / 5.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary01.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary01.frag
new file mode 100644
index 000000000..c1646e3b0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary01.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = (color.rg + 0.01) / 1.01;
+ gl_FragColor = vec4(log2(c) / -8.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary01_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary01_ref.frag
new file mode 100644
index 000000000..b360fd2d9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary01_ref.frag
@@ -0,0 +1,56 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+const float ln2 = 0.69314718055994530941723212145818;
+
+
+
+void main (void)
+{
+ vec2 x = (color.rg + 0.01) / 1.01;
+ vec2 y = vec2(0.0);
+ vec2 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ // Note: z will always be negative between 0.01 and 1.0 and
+ // so will y since it is raised to an odd power, and the shader spec
+ // does not support pow(-x, y) where y is not a compile time constant
+ z = abs((x - 1.0) / (x + 1.0));
+ vec2 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= -2.0 / ln2;
+
+ gl_FragColor = vec4(y / -8.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..ba37c09cc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary_ref.frag
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+const float ln2 = 0.69314718055994530941723212145818;
+
+
+
+void main (void)
+{
+ vec2 x = 31.0 * color.rg + 1.0;
+ vec2 y = vec2(0.0);
+ vec2 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ z = (x - 1.0) / (x + 1.0);
+ vec2 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= 2.0 / ln2;
+
+ gl_FragColor = vec4(y / 5.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary.vert
new file mode 100644
index 000000000..81f012a45
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 31.0 * gtf_Color.rg + 1.0;
+ color = vec4(log2(c) / 5.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary01.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary01.vert
new file mode 100644
index 000000000..0cfaf5746
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary01.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = (gtf_Color.rg + 0.01) / 1.01;
+ color = vec4(log2(c) / -8.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary01_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary01_ref.vert
new file mode 100644
index 000000000..835f3da1c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary01_ref.vert
@@ -0,0 +1,57 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+const float ln2 = 0.69314718055994530941723212145818;
+
+
+
+void main (void)
+{
+ vec2 x = (gtf_Color.rg + 0.01) / 1.01;
+ vec2 y = vec2(0.0);
+ vec2 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ // Note: z will always be negative between 0.01 and 1.0 and
+ // so will y since it is raised to an odd power, and the shader spec
+ // does not support pow(-x, y) where y is not a compile time constant
+ z = abs((x - 1.0) / (x + 1.0));
+ vec2 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= -2.0 / ln2;
+
+ color = vec4(y / -8.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..8f79dd446
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary_ref.vert
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+const float ln2 = 0.69314718055994530941723212145818;
+
+
+
+void main (void)
+{
+ vec2 x = 31.0 * gtf_Color.rg + 1.0;
+ vec2 y = vec2(0.0);
+ vec2 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ z = (x - 1.0) / (x + 1.0);
+ vec2 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= 2.0 / ln2;
+
+ color = vec4(y / 5.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary.frag
new file mode 100644
index 000000000..2b406997e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 31.0 * color.rgb + 1.0;
+ gl_FragColor = vec4(log2(c) / 5.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary01.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary01.frag
new file mode 100644
index 000000000..614a6db9e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary01.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = (color.rgb + 0.01) / 1.01;
+ gl_FragColor = vec4(log2(c) / -8.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary01_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary01_ref.frag
new file mode 100644
index 000000000..32020337f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary01_ref.frag
@@ -0,0 +1,56 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+const float ln2 = 0.69314718055994530941723212145818;
+
+
+
+void main (void)
+{
+ vec3 x = (color.rgb + 0.01) / 1.01;
+ vec3 y = vec3(0.0);
+ vec3 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ // Note: z will always be negative between 0.01 and 1.0 and
+ // so will y since it is raised to an odd power, and the shader spec
+ // does not support pow(-x, y) where y is not a compile time constant
+ z = abs((x - 1.0) / (x + 1.0));
+ vec3 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= -2.0 / ln2;
+
+ gl_FragColor = vec4(y / -8.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..f84f000e1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary_ref.frag
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+const float ln2 = 0.69314718055994530941723212145818;
+
+
+
+void main (void)
+{
+ vec3 x = 31.0 * color.rgb + 1.0;
+ vec3 y = vec3(0.0);
+ vec3 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ z = (x - 1.0) / (x + 1.0);
+ vec3 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= 2.0 / ln2;
+
+ gl_FragColor = vec4(y / 5.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary.vert
new file mode 100644
index 000000000..e98b3703e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 31.0 * gtf_Color.rgb + 1.0;
+ color = vec4(log2(c) / 5.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary01.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary01.vert
new file mode 100644
index 000000000..779abfe84
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary01.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = (gtf_Color.rgb + 0.01) / 1.01;
+ color = vec4(log2(c) / -8.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary01_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary01_ref.vert
new file mode 100644
index 000000000..fda8284a5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary01_ref.vert
@@ -0,0 +1,57 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+const float ln2 = 0.69314718055994530941723212145818;
+
+
+
+void main (void)
+{
+ vec3 x = (gtf_Color.rgb + 0.01) / 1.01;
+ vec3 y = vec3(0.0);
+ vec3 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ // Note: z will always be negative between 0.01 and 1.0 and
+ // so will y since it is raised to an odd power, and the shader spec
+ // does not support pow(-x, y) where y is not a compile time constant
+ z = abs((x - 1.0) / (x + 1.0));
+ vec3 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= -2.0 / ln2;
+
+ color = vec4(y / -8.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..9c8454faf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary_ref.vert
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+const float ln2 = 0.69314718055994530941723212145818;
+
+
+
+void main (void)
+{
+ vec3 x = 31.0 * gtf_Color.rgb + 1.0;
+ vec3 y = vec3(0.0);
+ vec3 z; // x-1 / x+1
+ int n = 50;
+
+ // ln(x) = 2[x-1 + 1 (x-1)^3 + 1 (x-1)^5 + ...] for x > 0
+ // [x+1 3 (x+1) 5 (x+1) ]
+ z = (x - 1.0) / (x + 1.0);
+ vec3 p = z;
+ for(int i = 1; i <= 101; i += 2)
+ {
+ y += p / float(i);
+ p *= z * z;
+ }
+ y *= 2.0 / ln2;
+
+ color = vec4(y / 5.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat2_frag.frag
new file mode 100644
index 000000000..c6b5af508
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat2_frag.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+const int array_size = 2;
+
+void main (void)
+{
+ const mat2 a = mat2(1.0, 2.0, 3.0, 4.0);
+ const mat2 b = mat2(5.0, 6.0, 7.0, 8.0);
+ mat2 array[array_size];
+ float gray;
+
+ array[0] = a;
+ array[1] = b;
+
+ if((array[0] == a) && (array[1] == b))
+ gray = 1.0;
+ else
+ gray = 0.0;
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat2_vert.vert
new file mode 100644
index 000000000..859c040b3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat2_vert.vert
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+const int array_size = 2;
+
+void main (void)
+{
+ const mat2 a = mat2(1.0, 2.0, 3.0, 4.0);
+ const mat2 b = mat2(5.0, 6.0, 7.0, 8.0);
+ mat2 array[array_size];
+ float gray;
+
+ array[0] = a;
+ array[1] = b;
+
+ if((array[0] == a) && (array[1] == b))
+ gray = 1.0;
+ else
+ gray = 0.0;
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat3_frag.frag
new file mode 100644
index 000000000..2d66cb16a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat3_frag.frag
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+const int array_size = 2;
+
+void main (void)
+{
+ const mat3 a = mat3(1.0, 2.0, 3.0,
+ 4.0, 5.0, 6.0,
+ 7.0, 8.0, 9.0);
+ const mat3 b = mat3(10.0, 11.0, 12.0,
+ 13.0, 14.0, 15.0,
+ 16.0, 17.0, 18.0);
+ mat3 array[array_size];
+ float gray;
+
+ array[0] = a;
+ array[1] = b;
+
+ if((array[0] == a) && (array[1] == b))
+ gray = 1.0;
+ else
+ gray = 0.0;
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat3_vert.vert
new file mode 100644
index 000000000..ec5792f97
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat3_vert.vert
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+const int array_size = 2;
+
+void main (void)
+{
+ const mat3 a = mat3(1.0, 2.0, 3.0,
+ 4.0, 5.0, 6.0,
+ 7.0, 8.0, 9.0);
+ const mat3 b = mat3(10.0, 11.0, 12.0,
+ 13.0, 14.0, 15.0,
+ 16.0, 17.0, 18.0);
+ mat3 array[array_size];
+ float gray;
+
+ array[0] = a;
+ array[1] = b;
+
+ if((array[0] == a) && (array[1] == b))
+ gray = 1.0;
+ else
+ gray = 0.0;
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat4_frag.frag
new file mode 100644
index 000000000..f0750abb1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat4_frag.frag
@@ -0,0 +1,56 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+const int array_size = 2;
+
+void main (void)
+{
+ const mat4 a = mat4( 1.0, 2.0, 3.0, 4.0,
+ 5.0, 6.0, 7.0, 8.0,
+ 9.0, 10.0, 11.0, 12.0,
+ 13.0, 14.0, 15.0, 16.0);
+ const mat4 b = mat4(17.0, 18.0, 19.0, 20.0,
+ 21.0, 22.0, 23.0, 24.0,
+ 25.0, 26.0, 27.0, 28.0,
+ 29.0, 30.0, 31.0, 32.0);
+ mat4 array[array_size];
+ float gray;
+
+ array[0] = a;
+ array[1] = b;
+
+ if((array[0] == a) && (array[1] == b))
+ gray = 1.0;
+ else
+ gray = 0.0;
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat4_vert.vert
new file mode 100644
index 000000000..bb816ba1d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat4_vert.vert
@@ -0,0 +1,56 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+const int array_size = 2;
+
+void main (void)
+{
+ const mat4 a = mat4( 1.0, 2.0, 3.0, 4.0,
+ 5.0, 6.0, 7.0, 8.0,
+ 9.0, 10.0, 11.0, 12.0,
+ 13.0, 14.0, 15.0, 16.0);
+ const mat4 b = mat4(17.0, 18.0, 19.0, 20.0,
+ 21.0, 22.0, 23.0, 24.0,
+ 25.0, 26.0, 27.0, 28.0,
+ 29.0, 30.0, 31.0, 32.0);
+ mat4 array[array_size];
+ float gray;
+
+ array[0] = a;
+ array[1] = b;
+
+ if((array[0] == a) && (array[1] == b))
+ gray = 1.0;
+ else
+ gray = 0.0;
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_copy_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_copy_frag.frag
new file mode 100644
index 000000000..00f8504ad
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_copy_frag.frag
@@ -0,0 +1,73 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ float x;
+ // Declare a constant 2 by 2 matrix with unique elements.
+ const mat2 a = mat2(1.0, 2.0, // 1.0 4.0
+ 4.0, 8.0); // 2.0 8.0
+
+ // Copy the constant matrix to another non-const matrix.
+ mat2 b = a;
+
+ // Check each element of the copy.
+ bool elms = true;
+ if(b[0][0] != 1.0) elms = false;
+ if(b[0][1] != 2.0) elms = false;
+ if(b[1][0] != 4.0) elms = false;
+ if(b[1][1] != 8.0) elms = false;
+
+ // Add up each row of the copy.
+ bool rows = true;
+ x = b[0][0] + b[1][0];
+ if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false;
+ x = b[0][1] + b[1][1];
+ if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = b[0][0] + b[0][1];
+ if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false;
+ x = b[1][0] + b[1][1];
+ if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the fragment color.
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_copy_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_copy_vert.vert
new file mode 100644
index 000000000..84e95ccbd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_copy_vert.vert
@@ -0,0 +1,72 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ float x;
+ // Declare a constant 2 by 2 matrix with unique elements.
+ const mat2 a = mat2(1.0, 2.0, // 1.0 4.0
+ 4.0, 8.0); // 2.0 8.0
+
+ // Copy the constant matrix to another non-const matrix.
+ mat2 b = a;
+
+ // Check each element of the copy.
+ bool elms = true;
+ if(b[0][0] != 1.0) elms = false;
+ if(b[0][1] != 2.0) elms = false;
+ if(b[1][0] != 4.0) elms = false;
+ if(b[1][1] != 8.0) elms = false;
+
+ // Add up each row of the copy.
+ bool rows = true;
+ x = b[0][0] + b[1][0];
+ if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false;
+ x = b[0][1] + b[1][1];
+ if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = b[0][0] + b[0][1];
+ if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false;
+ x = b[1][0] + b[1][1];
+ if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the varying variable color.
+ color = vec4(gray, gray, gray, 1.0);
+
+ // Transform the vertex position.
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_frag.frag
new file mode 100644
index 000000000..4eb12436b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_frag.frag
@@ -0,0 +1,70 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ float x;
+ // Declare a constant 2 by 2 matrix with unique elements.
+ const mat2 a = mat2(1.0, 2.0, // 1.0 4.0
+ 4.0, 8.0); // 2.0 8.0
+
+ // Check each element.
+ bool elms = true;
+ if(a[0][0] != 1.0) elms = false;
+ if(a[0][1] != 2.0) elms = false;
+ if(a[1][0] != 4.0) elms = false;
+ if(a[1][1] != 8.0) elms = false;
+
+ // Add up each row.
+ bool rows = true;
+ x = a[0][0] + a[1][0];
+ if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false;
+ x = a[0][1] + a[1][1];
+ if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column.
+ bool cols = true;
+ x = a[0][0] + a[0][1];
+ if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false;
+ x = a[1][0] + a[1][1];
+ if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the fragment color.
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_vert.vert
new file mode 100644
index 000000000..d1c6fd84c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_vert.vert
@@ -0,0 +1,69 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ float x;
+ // Declare a constant 2 by 2 matrix with unique elements.
+ const mat2 a = mat2(1.0, 2.0, // 1.0 4.0
+ 4.0, 8.0); // 2.0 8.0
+
+ // Check each element.
+ bool elms = true;
+ if(a[0][0] != 1.0) elms = false;
+ if(a[0][1] != 2.0) elms = false;
+ if(a[1][0] != 4.0) elms = false;
+ if(a[1][1] != 8.0) elms = false;
+
+ // Add up each row.
+ bool rows = true;
+ x = a[0][0] + a[1][0];
+ if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false;
+ x = a[0][1] + a[1][1];
+ if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column.
+ bool cols = true;
+ x = a[0][0] + a[0][1];
+ if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false;
+ x = a[1][0] + a[1][1];
+ if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the varying variable color.
+ color = vec4(gray, gray, gray, 1.0);
+
+ // Transform the vertex position.
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_copy_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_copy_frag.frag
new file mode 100644
index 000000000..bb93bcca4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_copy_frag.frag
@@ -0,0 +1,83 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ float x;
+ // Declare a constant 3 by 3 matrix with unique elements.
+ const mat3 a = mat3( 1.0, 2.0, 3.0,
+ 4.0, 5.0, 6.0,
+ 7.0, 8.0, 9.0);
+
+ // Copy the constant matrix to another non-const matrix.
+ mat3 b = a;
+
+ // Check each element of the copy.
+ bool elms = true;
+ if(b[0][0] != 1.0) elms = false;
+ if(b[0][1] != 2.0) elms = false;
+ if(b[0][2] != 3.0) elms = false;
+ if(b[1][0] != 4.0) elms = false;
+ if(b[1][1] != 5.0) elms = false;
+ if(b[1][2] != 6.0) elms = false;
+ if(b[2][0] != 7.0) elms = false;
+ if(b[2][1] != 8.0) elms = false;
+ if(b[2][2] != 9.0) elms = false;
+
+ // Add up each row of the copy.
+ bool rows = true;
+ x = b[0][0] + b[1][0] + b[2][0];
+ if( x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON ) rows = false;
+ x = b[0][1] + b[1][1] + b[2][1];
+ if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON ) rows = false;
+ x = b[0][2] + b[1][2] + b[2][2];
+ if(x < 18.0-ERROR_EPSILON || x > 18.0+ERROR_EPSILON ) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = b[0][0] + b[0][1] + b[0][2];
+ if( x < 6.0-ERROR_EPSILON || x > 6.0+ERROR_EPSILON ) cols = false;
+ x = b[1][0] + b[1][1] + b[1][2];
+ if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false;
+ x = b[2][0] + b[2][1] + b[2][2];
+ if(x < 24.0-ERROR_EPSILON || x > 24.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the fragment color.
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_copy_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_copy_vert.vert
new file mode 100644
index 000000000..3aaa541ef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_copy_vert.vert
@@ -0,0 +1,83 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ float x;
+ // Declare a constant 3 by 3 matrix with unique elements.
+ const mat3 a = mat3( 1.0, 2.0, 4.0, // 1.0 8.0 64.0
+ 8.0, 16.0, 32.0, // 2.0 16.0 128.0
+ 64.0, 128.0, 256.0); // 4.0 32.0 256.0
+
+ // Copy the constant matrix to another non-const matrix.
+ mat3 b = a;
+
+ // Check each element of the copy.
+ bool elms = true;
+ if(b[0][0] != 1.0) elms = false;
+ if(b[0][1] != 2.0) elms = false;
+ if(b[0][2] != 4.0) elms = false;
+ if(b[1][0] != 8.0) elms = false;
+ if(b[1][1] != 16.0) elms = false;
+ if(b[1][2] != 32.0) elms = false;
+ if(b[2][0] != 64.0) elms = false;
+ if(b[2][1] != 128.0) elms = false;
+ if(b[2][2] != 256.0) elms = false;
+
+ // Add up each row of the copy.
+ bool rows = true;
+ x = b[0][0] + b[1][0] + b[2][0];
+ x = b[0][0] + b[1][0] + b[2][0];
+ if( x < 73.0-ERROR_EPSILON || x > 73.0+ERROR_EPSILON ) rows = false;
+ x = b[0][1] + b[1][1] + b[2][1];
+ if(x < 146.0-ERROR_EPSILON || x > 146.0+ERROR_EPSILON ) rows = false;
+ x = b[0][2] + b[1][2] + b[2][2];
+ if(x < 292.0-ERROR_EPSILON || x > 292.0+ERROR_EPSILON ) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = b[0][0] + b[0][1] + b[0][2];
+ if( x < 7.0-ERROR_EPSILON || x > 7.0+ERROR_EPSILON ) cols = false;
+ x = b[1][0] + b[1][1] + b[1][2];
+ if(x < 56.0-ERROR_EPSILON || x > 56.0+ERROR_EPSILON) cols = false;
+ x = b[2][0] + b[2][1] + b[2][2];
+ if(x < 448.0-ERROR_EPSILON || x > 448.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the varying variable color.
+ color = vec4(gray, gray, gray, 1.0);
+
+ // Transform the vertex position.
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_frag.frag
new file mode 100644
index 000000000..cc1142a19
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_frag.frag
@@ -0,0 +1,80 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ float x;
+ // Declare a constant 3 by 3 matrix with unique elements.
+ const mat3 a = mat3( 1.0, 2.0, 3.0,
+ 4.0, 5.0, 6.0,
+ 7.0, 8.0, 9.0);
+
+ // Check each element.
+ bool elms = true;
+ if(a[0][0] != 1.0) elms = false;
+ if(a[0][1] != 2.0) elms = false;
+ if(a[0][2] != 3.0) elms = false;
+ if(a[1][0] != 4.0) elms = false;
+ if(a[1][1] != 5.0) elms = false;
+ if(a[1][2] != 6.0) elms = false;
+ if(a[2][0] != 7.0) elms = false;
+ if(a[2][1] != 8.0) elms = false;
+ if(a[2][2] != 9.0) elms = false;
+
+ // Add up each row.
+ bool rows = true;
+ x = a[0][0] + a[1][0] + a[2][0];
+ if( x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON ) rows = false;
+ x = a[0][1] + a[1][1] + a[2][1];
+ if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON ) rows = false;
+ x = a[0][2] + a[1][2] + a[2][2];
+ if(x < 18.0-ERROR_EPSILON || x > 18.0+ERROR_EPSILON ) rows = false;
+
+ // Add up each column.
+ bool cols = true;
+ x = a[0][0] + a[0][1] + a[0][2];
+ if( x < 6.0-ERROR_EPSILON || x > 6.0+ERROR_EPSILON ) cols = false;
+ x = a[1][0] + a[1][1] + a[1][2];
+ if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false;
+ x = a[2][0] + a[2][1] + a[2][2];
+ if(x < 24.0-ERROR_EPSILON || x > 24.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the fragment color.
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_vert.vert
new file mode 100644
index 000000000..e070caebb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_vert.vert
@@ -0,0 +1,79 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ float x;
+ // Declare a constant 3 by 3 matrix with unique elements.
+ const mat3 a = mat3( 1.0, 2.0, 4.0, // 1.0 8.0 64.0
+ 8.0, 16.0, 32.0, // 2.0 16.0 128.0
+ 64.0, 128.0, 256.0); // 4.0 32.0 256.0
+
+ // Check each element.
+ bool elms = true;
+ if(a[0][0] != 1.0) elms = false;
+ if(a[0][1] != 2.0) elms = false;
+ if(a[0][2] != 4.0) elms = false;
+ if(a[1][0] != 8.0) elms = false;
+ if(a[1][1] != 16.0) elms = false;
+ if(a[1][2] != 32.0) elms = false;
+ if(a[2][0] != 64.0) elms = false;
+ if(a[2][1] != 128.0) elms = false;
+ if(a[2][2] != 256.0) elms = false;
+
+ // Add up each row.
+ bool rows = true;
+ x = a[0][0] + a[1][0] + a[2][0];
+ if( x < 73.0-ERROR_EPSILON || x > 73.0+ERROR_EPSILON ) rows = false;
+ x = a[0][1] + a[1][1] + a[2][1];
+ if(x < 146.0-ERROR_EPSILON || x > 146.0+ERROR_EPSILON ) rows = false;
+ x = a[0][2] + a[1][2] + a[2][2];
+ if(x < 292.0-ERROR_EPSILON || x > 292.0+ERROR_EPSILON ) rows = false;
+
+ // Add up each column.
+ bool cols = true;
+ x = a[0][0] + a[0][1] + a[0][2];
+ if( x < 7.0-ERROR_EPSILON || x > 7.0+ERROR_EPSILON ) cols = false;
+ x = a[1][0] + a[1][1] + a[1][2];
+ if(x < 56.0-ERROR_EPSILON || x > 56.0+ERROR_EPSILON) cols = false;
+ x = a[2][0] + a[2][1] + a[2][2];
+ if(x < 448.0-ERROR_EPSILON || x > 448.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the varying variable color.
+ color = vec4(gray, gray, gray, 1.0);
+
+ // Transform the vertex position.
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_copy_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_copy_frag.frag
new file mode 100644
index 000000000..e2df5e915
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_copy_frag.frag
@@ -0,0 +1,95 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ float x;
+ // Declare a constant 4 by 4 matrix with unique elements.
+ const mat4 a = mat4( 1.0, 2.0, 3.0, 4.0,
+ 5.0, 6.0, 7.0, 8.0,
+ 9.0, 10.0, 11.0, 12.0,
+ 13.0, 14.0, 15.0, 16.0);
+
+ // Copy the constant matrix to another non-const matrix.
+ mat4 b = a;
+
+ // Check each element of the copy.
+ bool elms = true;
+ if(b[0][0] != 1.0) elms = false;
+ if(b[0][1] != 2.0) elms = false;
+ if(b[0][2] != 3.0) elms = false;
+ if(b[0][3] != 4.0) elms = false;
+ if(b[1][0] != 5.0) elms = false;
+ if(b[1][1] != 6.0) elms = false;
+ if(b[1][2] != 7.0) elms = false;
+ if(b[1][3] != 8.0) elms = false;
+ if(b[2][0] != 9.0) elms = false;
+ if(b[2][1] != 10.0) elms = false;
+ if(b[2][2] != 11.0) elms = false;
+ if(b[2][3] != 12.0) elms = false;
+ if(b[3][0] != 13.0) elms = false;
+ if(b[3][1] != 14.0) elms = false;
+ if(b[3][2] != 15.0) elms = false;
+ if(b[3][3] != 16.0) elms = false;
+
+ // Add up each row of the copy.
+ bool rows = true;
+ x = b[0][0] + b[1][0] + b[2][0] + b[3][0];
+ if(x < 28.0-ERROR_EPSILON || x > 28.0+ERROR_EPSILON) rows = false;
+ x = b[0][1] + b[1][1] + b[2][1] + b[3][1];
+ if(x < 32.0-ERROR_EPSILON || x > 32.0+ERROR_EPSILON) rows = false;
+ x = b[0][2] + b[1][2] + b[2][2] + b[3][2];
+ if(x < 36.0-ERROR_EPSILON || x > 36.0+ERROR_EPSILON) rows = false;
+ x = b[0][3] + b[1][3] + b[2][3] + b[3][3];
+ if(x < 40.0-ERROR_EPSILON || x > 40.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = b[0][0] + b[0][1] + b[0][2] + b[0][3];
+ if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) cols = false;
+ x = b[1][0] + b[1][1] + b[1][2] + b[1][3];
+ if(x < 26.0-ERROR_EPSILON || x > 26.0+ERROR_EPSILON) cols = false;
+ x = b[2][0] + b[2][1] + b[2][2] + b[2][3];
+ if(x < 42.0-ERROR_EPSILON || x > 42.0+ERROR_EPSILON) cols = false;
+ x = b[3][0] + b[3][1] + b[3][2] + b[3][3];
+ if(x < 58.0-ERROR_EPSILON || x > 58.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the fragment color.
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_copy_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_copy_vert.vert
new file mode 100644
index 000000000..8f119e19b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_copy_vert.vert
@@ -0,0 +1,94 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ float x;
+ // Declare a constant 4 by 4 matrix with unique elements.
+ const mat4 a = mat4( 1.0, 2.0, 4.0, 8.0, // 1.0 16.0 256.0 4096.0
+ 16.0, 32.0, 64.0, 128.0, // 2.0 32.0 512.0 8192.0
+ 256.0, 512.0, 1024.0, 2048.0, // 4.0 64.0 1024.0 16384.0
+ 4096.0, 8192.0, 16384.0, 32768.0); // 8.0 128.0 2048.0 32768.0
+
+ // Copy the constant matrix to another non-const matrix.
+ mat4 b = a;
+
+ // Check each element of the copy.
+ bool elms = true;
+ if(b[0][0] != 1.0) elms = false;
+ if(b[0][1] != 2.0) elms = false;
+ if(b[0][2] != 4.0) elms = false;
+ if(b[0][3] != 8.0) elms = false;
+ if(b[1][0] != 16.0) elms = false;
+ if(b[1][1] != 32.0) elms = false;
+ if(b[1][2] != 64.0) elms = false;
+ if(b[1][3] != 128.0) elms = false;
+ if(b[2][0] != 256.0) elms = false;
+ if(b[2][1] != 512.0) elms = false;
+ if(b[2][2] != 1024.0) elms = false;
+ if(b[2][3] != 2048.0) elms = false;
+ if(b[3][0] != 4096.0) elms = false;
+ if(b[3][1] != 8192.0) elms = false;
+ if(b[3][2] != 16384.0) elms = false;
+ if(b[3][3] != 32768.0) elms = false;
+
+ // Add up each row of the copy.
+ bool rows = true;
+ x = b[0][0] + b[1][0] + b[2][0] + b[3][0];
+ if(x < 4369.0-ERROR_EPSILON || x > 4369.0+ERROR_EPSILON) rows = false;
+ x = b[0][1] + b[1][1] + b[2][1] + b[3][1];
+ if(x < 8738.0-ERROR_EPSILON || x > 8738.0+ERROR_EPSILON) rows = false;
+ x = b[0][2] + b[1][2] + b[2][2] + b[3][2];
+ if(x < 17476.0-ERROR_EPSILON || x > 17476.0+ERROR_EPSILON) rows = false;
+ x = b[0][3] + b[1][3] + b[2][3] + b[3][3];
+ if(x < 34952.0-ERROR_EPSILON || x > 34952.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = b[0][0] + b[0][1] + b[0][2] + b[0][3];
+ if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false;
+ x = b[1][0] + b[1][1] + b[1][2] + b[1][3];
+ if(x < 240.0-ERROR_EPSILON || x > 240.0+ERROR_EPSILON) cols = false;
+ x = b[2][0] + b[2][1] + b[2][2] + b[2][3];
+ if(x < 3840.0-ERROR_EPSILON || x > 3840.0+ERROR_EPSILON) cols = false;
+ x = b[3][0] + b[3][1] + b[3][2] + b[3][3];
+ if(x < 61440.0-ERROR_EPSILON || x > 61440.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the varying variable color.
+ color = vec4(gray, gray, gray, 1.0);
+
+ // Transform the vertex position.
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_frag.frag
new file mode 100644
index 000000000..ec6c1105f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_frag.frag
@@ -0,0 +1,92 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ float x;
+ // Declare a constant 4 by 4 matrix with unique elements.
+ const mat4 a = mat4( 1.0, 2.0, 3.0, 4.0,
+ 5.0, 6.0, 7.0, 8.0,
+ 9.0, 10.0, 11.0, 12.0,
+ 13.0, 14.0, 15.0, 16.0);
+
+ // Check each element.
+ bool elms = true;
+ if(a[0][0] != 1.0) elms = false;
+ if(a[0][1] != 2.0) elms = false;
+ if(a[0][2] != 3.0) elms = false;
+ if(a[0][3] != 4.0) elms = false;
+ if(a[1][0] != 5.0) elms = false;
+ if(a[1][1] != 6.0) elms = false;
+ if(a[1][2] != 7.0) elms = false;
+ if(a[1][3] != 8.0) elms = false;
+ if(a[2][0] != 9.0) elms = false;
+ if(a[2][1] != 10.0) elms = false;
+ if(a[2][2] != 11.0) elms = false;
+ if(a[2][3] != 12.0) elms = false;
+ if(a[3][0] != 13.0) elms = false;
+ if(a[3][1] != 14.0) elms = false;
+ if(a[3][2] != 15.0) elms = false;
+ if(a[3][3] != 16.0) elms = false;
+
+ // Add up each row.
+ bool rows = true;
+ x = a[0][0] + a[1][0] + a[2][0] + a[3][0];
+ if(x < 28.0-ERROR_EPSILON || x > 28.0+ERROR_EPSILON) rows = false;
+ x = a[0][1] + a[1][1] + a[2][1] + a[3][1];
+ if(x < 32.0-ERROR_EPSILON || x > 32.0+ERROR_EPSILON) rows = false;
+ x = a[0][2] + a[1][2] + a[2][2] + a[3][2];
+ if(x < 36.0-ERROR_EPSILON || x > 36.0+ERROR_EPSILON) rows = false;
+ x = a[0][3] + a[1][3] + a[2][3] + a[3][3];
+ if(x < 40.0-ERROR_EPSILON || x > 40.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = a[0][0] + a[0][1] + a[0][2] + a[0][3];
+ if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) cols = false;
+ x = a[1][0] + a[1][1] + a[1][2] + a[1][3];
+ if(x < 26.0-ERROR_EPSILON || x > 26.0+ERROR_EPSILON) cols = false;
+ x = a[2][0] + a[2][1] + a[2][2] + a[2][3];
+ if(x < 42.0-ERROR_EPSILON || x > 42.0+ERROR_EPSILON) cols = false;
+ x = a[3][0] + a[3][1] + a[3][2] + a[3][3];
+ if(x < 58.0-ERROR_EPSILON || x > 58.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the fragment color.
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_vert.vert
new file mode 100644
index 000000000..730087dac
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ float x;
+ // Declare a constant 4 by 4 matrix with unique elements.
+ const mat4 a = mat4( 1.0, 2.0, 4.0, 8.0, // 1.0 16.0 256.0 4096.0
+ 16.0, 32.0, 64.0, 128.0, // 2.0 32.0 512.0 8192.0
+ 256.0, 512.0, 1024.0, 2048.0, // 4.0 64.0 1024.0 16384.0
+ 4096.0, 8192.0, 16384.0, 32768.0); // 8.0 128.0 2048.0 32768.0
+
+ // Check each element.
+ bool elms = true;
+ if(a[0][0] != 1.0) elms = false;
+ if(a[0][1] != 2.0) elms = false;
+ if(a[0][2] != 4.0) elms = false;
+ if(a[0][3] != 8.0) elms = false;
+ if(a[1][0] != 16.0) elms = false;
+ if(a[1][1] != 32.0) elms = false;
+ if(a[1][2] != 64.0) elms = false;
+ if(a[1][3] != 128.0) elms = false;
+ if(a[2][0] != 256.0) elms = false;
+ if(a[2][1] != 512.0) elms = false;
+ if(a[2][2] != 1024.0) elms = false;
+ if(a[2][3] != 2048.0) elms = false;
+ if(a[3][0] != 4096.0) elms = false;
+ if(a[3][1] != 8192.0) elms = false;
+ if(a[3][2] != 16384.0) elms = false;
+ if(a[3][3] != 32768.0) elms = false;
+
+ // Add up each row.
+ bool rows = true;
+ x = a[0][0] + a[1][0] + a[2][0] + a[3][0];
+ if(x < 4369.0-ERROR_EPSILON || x > 4369.0+ERROR_EPSILON) rows = false;
+ x = a[0][1] + a[1][1] + a[2][1] + a[3][1];
+ if(x < 8738.0-ERROR_EPSILON || x > 8738.0+ERROR_EPSILON) rows = false;
+ x = a[0][2] + a[1][2] + a[2][2] + a[3][2];
+ if(x < 17476.0-ERROR_EPSILON || x > 17476.0+ERROR_EPSILON) rows = false;
+ x = a[0][3] + a[1][3] + a[2][3] + a[3][3];
+ if(x < 34952.0-ERROR_EPSILON || x > 34952.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column.
+ bool cols = true;
+ x = a[0][0] + a[0][1] + a[0][2] + a[0][3];
+ if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false;
+ x = a[1][0] + a[1][1] + a[1][2] + a[1][3];
+ if(x < 240.0-ERROR_EPSILON || x > 240.0+ERROR_EPSILON) cols = false;
+ x = a[2][0] + a[2][1] + a[2][2] + a[2][3];
+ if(x < 3840.0-ERROR_EPSILON || x > 3840.0+ERROR_EPSILON) cols = false;
+ x = a[3][0] + a[3][1] + a[3][2] + a[3][3];
+ if(x < 61440.0-ERROR_EPSILON || x > 61440.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the varying variable color.
+ color = vec4(gray, gray, gray, 1.0);
+
+ // Transform the vertex position.
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/input.run.txt
new file mode 100644
index 000000000..730999d88
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/input.run.txt
@@ -0,0 +1,7 @@
+# this file is auto-generated. DO NOT EDIT.
+mat_001_to_008.html
+mat_009_to_016.html
+mat_017_to_024.html
+mat_025_to_032.html
+mat_033_to_040.html
+mat_041_to_046.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_2vec2_frag.frag
new file mode 100644
index 000000000..431b64717
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_2vec2_frag.frag
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ mat2 m = mat2(color.rg, color.ba);
+ vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+ vec4 result = vec4(1.0, 1.0, 1.0, 1.0);
+
+ if(m[0][0] != color.r) result = black;
+ if(m[0][1] != color.g) result = black;
+ if(m[1][0] != color.b) result = black;
+ if(m[1][1] != color.a) result = black;
+
+ gl_FragColor = result;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_2vec2_vert.vert
new file mode 100644
index 000000000..6747a4898
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_2vec2_vert.vert
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ mat2 m = mat2(gtf_Color.rg, gtf_Color.ba);
+ vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+ vec4 result = vec4(1.0, 1.0, 1.0, 1.0);
+
+
+ if(m[0][0] != gtf_Color.r) result = black;
+ if(m[0][1] != gtf_Color.g) result = black;
+ if(m[1][0] != gtf_Color.b) result = black;
+ if(m[1][1] != gtf_Color.a) result = black;
+
+ color = result;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_4float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_4float_frag.frag
new file mode 100644
index 000000000..b74a9a71d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_4float_frag.frag
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ mat2 m = mat2(color.r, color.g, color.b, color.a);
+ vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+ vec4 result = vec4(1.0, 1.0, 1.0, 1.0);
+
+ if(m[0][0] != color.r) result = black;
+ if(m[0][1] != color.g) result = black;
+ if(m[1][0] != color.b) result = black;
+ if(m[1][1] != color.a) result = black;
+
+ gl_FragColor = result;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_4float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_4float_vert.vert
new file mode 100644
index 000000000..c5a7f1a48
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_4float_vert.vert
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ mat2 m = mat2(gtf_Color.r, gtf_Color.g, gtf_Color.b, gtf_Color.a);
+ vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+ vec4 result = vec4(1.0, 1.0, 1.0, 1.0);
+
+
+ if(m[0][0] != gtf_Color.r) result = black;
+ if(m[0][1] != gtf_Color.g) result = black;
+ if(m[1][0] != gtf_Color.b) result = black;
+ if(m[1][1] != gtf_Color.a) result = black;
+
+ color = result;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_copy_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_copy_frag.frag
new file mode 100644
index 000000000..12acbc5b9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_copy_frag.frag
@@ -0,0 +1,73 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ float x;
+ // Declare a 2 by 2 matrix with unique elements.
+ mat2 a = mat2(1.0, 2.0, // 1.0 4.0
+ 4.0, 8.0); // 2.0 8.0
+
+ // Copy the matrix to another non-const matrix.
+ mat2 b = a;
+
+ // Check each element of the copy.
+ bool elms = true;
+ if(b[0][0] != 1.0) elms = false;
+ if(b[0][1] != 2.0) elms = false;
+ if(b[1][0] != 4.0) elms = false;
+ if(b[1][1] != 8.0) elms = false;
+
+ // Add up each row of the copy.
+ bool rows = true;
+ x = b[0][0] + b[1][0];
+ if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false;
+ x = b[0][1] + b[1][1];
+ if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = b[0][0] + b[0][1];
+ if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false;
+ x = b[1][0] + b[1][1];
+ if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the fragment color.
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_copy_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_copy_vert.vert
new file mode 100644
index 000000000..6aeede3f8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_copy_vert.vert
@@ -0,0 +1,72 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ float x;
+ // Declare a 2 by 2 matrix with unique elements.
+ mat2 a = mat2(1.0, 2.0, // 1.0 4.0
+ 4.0, 8.0); // 2.0 8.0
+
+ // Copy the matrix to another non-const matrix.
+ mat2 b = a;
+
+ // Check each element of the copy.
+ bool elms = true;
+ if(b[0][0] != 1.0) elms = false;
+ if(b[0][1] != 2.0) elms = false;
+ if(b[1][0] != 4.0) elms = false;
+ if(b[1][1] != 8.0) elms = false;
+
+ // Add up each row of the copy.
+ bool rows = true;
+ x = b[0][0] + b[1][0];
+ if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false;
+ x = b[0][1] + b[1][1];
+ if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = b[0][0] + b[0][1];
+ if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false;
+ x = b[1][0] + b[1][1];
+ if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the varying variable color.
+ color = vec4(gray, gray, gray, 1.0);
+
+ // Transform the vertex position.
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_float_frag.frag
new file mode 100644
index 000000000..38af35b18
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_float_frag.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ mat2 m = mat2(0.5);
+ vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+ vec4 result = vec4(1.0, 1.0, 1.0, 1.0);
+
+ if((m[0][0] != 0.5))
+ result = black;
+ if((m[0][1] != 0.0))
+ result = black;
+
+ if((m[1][0] != 0.0))
+ result = black;
+ if((m[1][1] != 0.5))
+ result = black;
+
+ gl_FragColor = result;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_float_vert.vert
new file mode 100644
index 000000000..894b3a058
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_float_vert.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ mat2 m = mat2(0.5);
+ vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+ vec4 result = vec4(1.0, 1.0, 1.0, 1.0);
+
+ if((m[0][0] != 0.5))
+ result = black;
+ if((m[0][1] != 0.0))
+ result = black;
+ if((m[1][0] != 0.0))
+ result = black;
+ if((m[1][1] != 0.5))
+ result = black;
+
+ color = result;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_frag.frag
new file mode 100644
index 000000000..a105f5fc6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_frag.frag
@@ -0,0 +1,70 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ float x;
+ // Declare a 2 by 2 matrix with unique elements.
+ mat2 a = mat2(1.0, 2.0, // 1.0 4.0
+ 4.0, 8.0); // 2.0 8.0
+
+ // Check each element.
+ bool elms = true;
+ if(a[0][0] != 1.0) elms = false;
+ if(a[0][1] != 2.0) elms = false;
+ if(a[1][0] != 4.0) elms = false;
+ if(a[1][1] != 8.0) elms = false;
+
+ // Add up each row.
+ bool rows = true;
+ x = a[0][0] + a[1][0];
+ if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false;
+ x = a[0][1] + a[1][1];
+ if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column.
+ bool cols = true;
+ x = a[0][0] + a[0][1];
+ if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false;
+ x = a[1][0] + a[1][1];
+ if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the fragment color.
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_vert.vert
new file mode 100644
index 000000000..93d56cfd2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_vert.vert
@@ -0,0 +1,69 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ float x;
+ // Declare a 2 by 2 matrix with unique elements.
+ mat2 a = mat2(1.0, 2.0, // 1.0 4.0
+ 4.0, 8.0); // 2.0 8.0
+
+ // Check each element.
+ bool elms = true;
+ if(a[0][0] != 1.0) elms = false;
+ if(a[0][1] != 2.0) elms = false;
+ if(a[1][0] != 4.0) elms = false;
+ if(a[1][1] != 8.0) elms = false;
+
+ // Add up each row.
+ bool rows = true;
+ x = a[0][0] + a[1][0];
+ if(x < 5.0-ERROR_EPSILON || x > 5.0+ERROR_EPSILON) rows = false;
+ x = a[0][1] + a[1][1];
+ if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column.
+ bool cols = true;
+ x = a[0][0] + a[0][1];
+ if(x < 3.0-ERROR_EPSILON || x > 3.0+ERROR_EPSILON) cols = false;
+ x = a[1][0] + a[1][1];
+ if(x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the varying variable color.
+ color = vec4(gray, gray, gray, 1.0);
+
+ // Transform the vertex position.
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_3vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_3vec3_frag.frag
new file mode 100644
index 000000000..133a71f84
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_3vec3_frag.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ mat3 m = mat3(color.rgb, color.rgb, color.rgb);
+ vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+ vec4 result = vec4(1.0, 1.0, 1.0, 1.0);
+
+ if(m[0][0] != color.r) result = black;
+ if(m[0][1] != color.g) result = black;
+ if(m[0][2] != color.b) result = black;
+ if(m[1][0] != color.r) result = black;
+ if(m[1][1] != color.g) result = black;
+ if(m[1][2] != color.b) result = black;
+ if(m[2][0] != color.r) result = black;
+ if(m[2][1] != color.g) result = black;
+ if(m[2][2] != color.b) result = black;
+
+ gl_FragColor = result;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_3vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_3vec3_vert.vert
new file mode 100644
index 000000000..c0b92b88f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_3vec3_vert.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ mat3 m = mat3(gtf_Color.rgb, gtf_Color.rgb, gtf_Color.rgb);
+ vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+ vec4 result = vec4(1.0, 1.0, 1.0, 1.0);
+
+ if(m[0][0] != gtf_Color.r) result = black;
+ if(m[0][1] != gtf_Color.g) result = black;
+ if(m[0][2] != gtf_Color.b) result = black;
+ if(m[1][0] != gtf_Color.r) result = black;
+ if(m[1][1] != gtf_Color.g) result = black;
+ if(m[1][2] != gtf_Color.b) result = black;
+ if(m[2][0] != gtf_Color.r) result = black;
+ if(m[2][1] != gtf_Color.g) result = black;
+ if(m[2][2] != gtf_Color.b) result = black;
+
+ color = result;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_9float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_9float_frag.frag
new file mode 100644
index 000000000..e65c7241e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_9float_frag.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ mat3 m = mat3(color.r, color.g, color.b, color.r, color.g, color.b, color.r, color.g, color.b);
+ vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+ vec4 result = vec4(1.0, 1.0, 1.0, 1.0);
+
+ if(m[0][0] != color.r) result = black;
+ if(m[0][1] != color.g) result = black;
+ if(m[0][2] != color.b) result = black;
+ if(m[1][0] != color.r) result = black;
+ if(m[1][1] != color.g) result = black;
+ if(m[1][2] != color.b) result = black;
+ if(m[2][0] != color.r) result = black;
+ if(m[2][1] != color.g) result = black;
+ if(m[2][2] != color.b) result = black;
+
+ gl_FragColor = result;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_9float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_9float_vert.vert
new file mode 100644
index 000000000..b13848605
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_9float_vert.vert
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ mat3 m = mat3(gtf_Color.r, gtf_Color.g, gtf_Color.b, gtf_Color.r, gtf_Color.g, gtf_Color.b, gtf_Color.r, gtf_Color.g, gtf_Color.b);
+ vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+ vec4 result = vec4(1.0, 1.0, 1.0, 1.0);
+
+
+ if(m[0][0] != gtf_Color.r) result = black;
+ if(m[0][1] != gtf_Color.g) result = black;
+ if(m[0][2] != gtf_Color.b) result = black;
+ if(m[1][0] != gtf_Color.r) result = black;
+ if(m[1][1] != gtf_Color.g) result = black;
+ if(m[1][2] != gtf_Color.b) result = black;
+ if(m[2][0] != gtf_Color.r) result = black;
+ if(m[2][1] != gtf_Color.g) result = black;
+ if(m[2][2] != gtf_Color.b) result = black;
+
+ color = result;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_copy_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_copy_frag.frag
new file mode 100644
index 000000000..7ba51a323
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_copy_frag.frag
@@ -0,0 +1,83 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ float x;
+ // Declare a 3 by 3 matrix with unique elements.
+ mat3 a = mat3( 1.0, 2.0, 3.0,
+ 4.0, 5.0, 6.0,
+ 7.0, 8.0, 9.0);
+
+ // Copy the matrix to another non-const matrix.
+ mat3 b = a;
+
+ // Check each element of the copy.
+ bool elms = true;
+ if(b[0][0] != 1.0) elms = false;
+ if(b[0][1] != 2.0) elms = false;
+ if(b[0][2] != 3.0) elms = false;
+ if(b[1][0] != 4.0) elms = false;
+ if(b[1][1] != 5.0) elms = false;
+ if(b[1][2] != 6.0) elms = false;
+ if(b[2][0] != 7.0) elms = false;
+ if(b[2][1] != 8.0) elms = false;
+ if(b[2][2] != 9.0) elms = false;
+
+ // Add up each row of the copy.
+ bool rows = true;
+ x = b[0][0] + b[1][0] + b[2][0];
+ if( x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON ) rows = false;
+ x = b[0][1] + b[1][1] + b[2][1];
+ if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON ) rows = false;
+ x = b[0][2] + b[1][2] + b[2][2];
+ if(x < 18.0-ERROR_EPSILON || x > 18.0+ERROR_EPSILON ) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = b[0][0] + b[0][1] + b[0][2];
+ if( x < 6.0-ERROR_EPSILON || x > 6.0+ERROR_EPSILON ) cols = false;
+ x = b[1][0] + b[1][1] + b[1][2];
+ if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false;
+ x = b[2][0] + b[2][1] + b[2][2];
+ if(x < 24.0-ERROR_EPSILON || x > 24.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the fragment color.
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_copy_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_copy_vert.vert
new file mode 100644
index 000000000..5b11278e0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_copy_vert.vert
@@ -0,0 +1,82 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ float x;
+ // Declare a 3 by 3 matrix with unique elements.
+ mat3 a = mat3( 1.0, 2.0, 4.0, // 1.0 8.0 64.0
+ 8.0, 16.0, 32.0, // 2.0 16.0 128.0
+ 64.0, 128.0, 256.0); // 4.0 32.0 256.0
+
+ // Copy the matrix to another non-const matrix.
+ mat3 b = a;
+
+ // Check each element of the copy.
+ bool elms = true;
+ if(b[0][0] != 1.0) elms = false;
+ if(b[0][1] != 2.0) elms = false;
+ if(b[0][2] != 4.0) elms = false;
+ if(b[1][0] != 8.0) elms = false;
+ if(b[1][1] != 16.0) elms = false;
+ if(b[1][2] != 32.0) elms = false;
+ if(b[2][0] != 64.0) elms = false;
+ if(b[2][1] != 128.0) elms = false;
+ if(b[2][2] != 256.0) elms = false;
+
+ // Add up each row of the copy.
+ bool rows = true;
+ x = b[0][0] + b[1][0] + b[2][0];
+ if( x < 73.0-ERROR_EPSILON || x > 73.0+ERROR_EPSILON ) rows = false;
+ x = b[0][1] + b[1][1] + b[2][1];
+ if(x < 146.0-ERROR_EPSILON || x > 146.0+ERROR_EPSILON ) rows = false;
+ x = b[0][2] + b[1][2] + b[2][2];
+ if(x < 292.0-ERROR_EPSILON || x > 292.0+ERROR_EPSILON ) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = b[0][0] + b[0][1] + b[0][2];
+ if( x < 7.0-ERROR_EPSILON || x > 7.0+ERROR_EPSILON ) cols = false;
+ x = b[1][0] + b[1][1] + b[1][2];
+ if(x < 56.0-ERROR_EPSILON || x > 56.0+ERROR_EPSILON) cols = false;
+ x = b[2][0] + b[2][1] + b[2][2];
+ if(x < 448.0-ERROR_EPSILON || x > 448.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the varying variable color.
+ color = vec4(gray, gray, gray, 1.0);
+
+ // Transform the vertex position.
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_float_frag.frag
new file mode 100644
index 000000000..7cb58fe82
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_float_frag.frag
@@ -0,0 +1,59 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ mat3 m = mat3(0.5);
+ vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+ vec4 result = vec4(1.0, 1.0, 1.0, 1.0);
+
+ if((m[0][0] != 0.5))
+ result = black;
+ if((m[0][1] != 0.0))
+ result = black;
+ if((m[0][2] != 0.0))
+ result = black;
+
+ if((m[1][0] != 0.0))
+ result = black;
+ if((m[1][1] != 0.5))
+ result = black;
+ if((m[1][2] != 0.0))
+ result = black;
+
+ if((m[2][0] != 0.0))
+ result = black;
+ if((m[2][1] != 0.0))
+ result = black;
+ if((m[2][2] != 0.5))
+ result = black;
+
+ gl_FragColor = result;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_float_vert.vert
new file mode 100644
index 000000000..4cc0a4ea6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_float_vert.vert
@@ -0,0 +1,59 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ mat3 m = mat3(0.5);
+ vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+ vec4 result = vec4(1.0, 1.0, 1.0, 1.0);
+
+ if((m[0][0] != 0.5))
+ result = black;
+ if((m[0][1] != 0.0))
+ result = black;
+ if((m[0][2] != 0.0))
+ result = black;
+
+ if((m[1][0] != 0.0))
+ result = black;
+ if((m[1][1] != 0.5))
+ result = black;
+ if((m[1][2] != 0.0))
+ result = black;
+
+ if((m[2][0] != 0.0))
+ result = black;
+ if((m[2][1] != 0.0))
+ result = black;
+ if((m[2][2] != 0.5))
+ result = black;
+
+ color = result;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_frag.frag
new file mode 100644
index 000000000..180e74875
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_frag.frag
@@ -0,0 +1,80 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ float x;
+ // Declare a 3 by 3 matrix with unique elements.
+ mat3 a = mat3( 1.0, 2.0, 3.0,
+ 4.0, 5.0, 6.0,
+ 7.0, 8.0, 9.0);
+
+ // Check each element.
+ bool elms = true;
+ if(a[0][0] != 1.0) elms = false;
+ if(a[0][1] != 2.0) elms = false;
+ if(a[0][2] != 3.0) elms = false;
+ if(a[1][0] != 4.0) elms = false;
+ if(a[1][1] != 5.0) elms = false;
+ if(a[1][2] != 6.0) elms = false;
+ if(a[2][0] != 7.0) elms = false;
+ if(a[2][1] != 8.0) elms = false;
+ if(a[2][2] != 9.0) elms = false;
+
+ // Add up each row.
+ bool rows = true;
+ x = a[0][0] + a[1][0] + a[2][0];
+ if( x < 12.0-ERROR_EPSILON || x > 12.0+ERROR_EPSILON ) rows = false;
+ x = a[0][1] + a[1][1] + a[2][1];
+ if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON ) rows = false;
+ x = a[0][2] + a[1][2] + a[2][2];
+ if(x < 18.0-ERROR_EPSILON || x > 18.0+ERROR_EPSILON ) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = a[0][0] + a[0][1] + a[0][2];
+ if( x < 6.0-ERROR_EPSILON || x > 6.0+ERROR_EPSILON ) cols = false;
+ x = a[1][0] + a[1][1] + a[1][2];
+ if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false;
+ x = a[2][0] + a[2][1] + a[2][2];
+ if(x < 24.0-ERROR_EPSILON || x > 24.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the fragment color.
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_vert.vert
new file mode 100644
index 000000000..c1e4fce15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_vert.vert
@@ -0,0 +1,79 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ float x;
+ // Declare a 3 by 3 matrix with unique elements.
+ mat3 a = mat3( 1.0, 2.0, 4.0, // 1.0 8.0 64.0
+ 8.0, 16.0, 32.0, // 2.0 16.0 128.0
+ 64.0, 128.0, 256.0); // 4.0 32.0 256.0
+
+ // Check each element.
+ bool elms = true;
+ if(a[0][0] != 1.0) elms = false;
+ if(a[0][1] != 2.0) elms = false;
+ if(a[0][2] != 4.0) elms = false;
+ if(a[1][0] != 8.0) elms = false;
+ if(a[1][1] != 16.0) elms = false;
+ if(a[1][2] != 32.0) elms = false;
+ if(a[2][0] != 64.0) elms = false;
+ if(a[2][1] != 128.0) elms = false;
+ if(a[2][2] != 256.0) elms = false;
+
+ // Add up each row.
+ bool rows = true;
+ x = a[0][0] + a[1][0] + a[2][0];
+ if( x < 73.0-ERROR_EPSILON || x > 73.0+ERROR_EPSILON ) rows = false;
+ x = a[0][1] + a[1][1] + a[2][1];
+ if(x < 146.0-ERROR_EPSILON || x > 146.0+ERROR_EPSILON ) rows = false;
+ x = a[0][2] + a[1][2] + a[2][2];
+ if(x < 292.0-ERROR_EPSILON || x > 292.0+ERROR_EPSILON ) rows = false;
+
+ // Add up each column.
+ bool cols = true;
+ x = a[0][0] + a[0][1] + a[0][2];
+ if( x < 7.0-ERROR_EPSILON || x > 7.0+ERROR_EPSILON ) cols = false;
+ x = a[1][0] + a[1][1] + a[1][2];
+ if(x < 56.0-ERROR_EPSILON || x > 56.0+ERROR_EPSILON) cols = false;
+ x = a[2][0] + a[2][1] + a[2][2];
+ if(x < 448.0-ERROR_EPSILON || x > 448.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the varying variable color.
+ color = vec4(gray, gray, gray, 1.0);
+
+ // Transform the vertex position.
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_16float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_16float_frag.frag
new file mode 100644
index 000000000..d0504bed4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_16float_frag.frag
@@ -0,0 +1,74 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ mat4 a = mat4( 1.0, 2.0, 3.0, 4.0,
+ 5.0, 6.0, 7.0, 8.0,
+ 9.0, 10.0, 11.0, 12.0,
+ 13.0, 14.0, 15.0, 16.0);
+ float gray,sum1=0.0,sum2=0.0,sum3=0.0,sum4=0.0;
+ int i;
+
+
+ sum1 += a[0][0];
+ sum2 += a[1][0];
+ sum3 += a[2][0];
+ sum4 += a[3][0];
+
+ sum1 += a[0][1];
+ sum2 += a[1][1];
+ sum3 += a[2][1];
+ sum4 += a[3][1];
+
+ sum1 += a[0][2];
+ sum2 += a[1][2];
+ sum3 += a[2][2];
+ sum4 += a[3][2];
+
+ sum1 += a[0][3];
+ sum2 += a[1][3];
+ sum3 += a[2][3];
+ sum4 += a[3][3];
+
+ if( ( sum1 > 10.0-ERROR_EPSILON && sum1 < 10.0+ERROR_EPSILON ) &&
+ ( sum2 > 26.0-ERROR_EPSILON && sum2 < 26.0+ERROR_EPSILON) &&
+ ( sum3 > 42.0-ERROR_EPSILON && sum3 < 42.0+ERROR_EPSILON) &&
+ ( sum4 > 58.0-ERROR_EPSILON && sum4 < 58.0+ERROR_EPSILON) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_16float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_16float_vert.vert
new file mode 100644
index 000000000..d1ef12d5f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_16float_vert.vert
@@ -0,0 +1,71 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ mat4 a = mat4(1.0, 2.0, 3.0, 4.0,
+ 5.0, 6.0, 7.0, 8.0,
+ 9.0, 10.0, 11.0, 12.0,
+ 13.0, 14.0, 15.0, 16.0);
+
+ float gray,sum1=0.0,sum2=0.0,sum3=0.0,sum4=0.0;
+ int i;
+
+ sum1 = sum1 + a[0][0];
+ sum2 = sum2 + a[1][0];
+ sum3 = sum3 + a[2][0];
+ sum4 = sum4 + a[3][0];
+
+ sum1 = sum1 + a[0][1];
+ sum2 = sum2 + a[1][1];
+ sum3 = sum3 + a[2][1];
+ sum4 = sum4 + a[3][1];
+
+ sum1 = sum1 + a[0][2];
+ sum2 = sum2 + a[1][2];
+ sum3 = sum3 + a[2][2];
+ sum4 = sum4 + a[3][2];
+
+ sum1 = sum1 + a[0][3];
+ sum2 = sum2 + a[1][3];
+ sum3 = sum3 + a[2][3];
+ sum4 = sum4 + a[3][3];
+
+ if( ( sum1 > 10.0-ERROR_EPSILON && sum1 < 10.0+ERROR_EPSILON ) &&
+ ( sum2 > 26.0-ERROR_EPSILON && sum2 < 26.0+ERROR_EPSILON) &&
+ ( sum3 > 42.0-ERROR_EPSILON && sum3 < 42.0+ERROR_EPSILON) &&
+ ( sum4 > 58.0-ERROR_EPSILON && sum4 < 58.0+ERROR_EPSILON) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_4vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_4vec4_frag.frag
new file mode 100644
index 000000000..449495736
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_4vec4_frag.frag
@@ -0,0 +1,76 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ vec4 L1 = vec4(1.0, 2.0, 3.0, 4.0);
+ vec4 L2 = vec4(5.0, 6.0, 7.0, 8.0);
+ vec4 L3 = vec4(9.0, 10.0, 11.0, 12.0);
+ vec4 L4 = vec4(13.0, 14.0, 15.0, 16.0);
+
+ mat4 a = mat4(L1,L2,L3,L4);
+
+ float gray,sum1=0.0,sum2=0.0,sum3=0.0,sum4=0.0;
+ int i;
+
+ sum1 = sum1 + a[0][0];
+ sum2 = sum2 + a[1][0];
+ sum3 = sum3 + a[2][0];
+ sum4 = sum4 + a[3][0];
+
+ sum1 = sum1 + a[0][1];
+ sum2 = sum2 + a[1][1];
+ sum3 = sum3 + a[2][1];
+ sum4 = sum4 + a[3][1];
+
+ sum1 = sum1 + a[0][2];
+ sum2 = sum2 + a[1][2];
+ sum3 = sum3 + a[2][2];
+ sum4 = sum4 + a[3][2];
+
+ sum1 = sum1 + a[0][3];
+ sum2 = sum2 + a[1][3];
+ sum3 = sum3 + a[2][3];
+ sum4 = sum4 + a[3][3];
+
+ if( ( sum1 > 10.0-ERROR_EPSILON && sum1 < 10.0+ERROR_EPSILON ) &&
+ ( sum2 > 26.0-ERROR_EPSILON && sum2 < 26.0+ERROR_EPSILON) &&
+ ( sum3 > 42.0-ERROR_EPSILON && sum3 < 42.0+ERROR_EPSILON) &&
+ ( sum4 > 58.0-ERROR_EPSILON && sum4 < 58.0+ERROR_EPSILON) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_4vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_4vec4_vert.vert
new file mode 100644
index 000000000..c219f99fb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_4vec4_vert.vert
@@ -0,0 +1,73 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ vec4 L1 = vec4(1.0, 2.0, 3.0, 4.0);
+ vec4 L2 = vec4(5.0, 6.0, 7.0, 8.0);
+ vec4 L3 = vec4(9.0, 10.0, 11.0, 12.0);
+ vec4 L4 = vec4(13.0, 14.0, 15.0, 16.0);
+
+ mat4 a = mat4(L1,L2,L3,L4);
+
+ float gray,sum1=0.0,sum2=0.0,sum3=0.0,sum4=0.0;
+ int i;
+
+ sum1 = sum1 + a[0][0];
+ sum2 = sum2 + a[1][0];
+ sum3 = sum3 + a[2][0];
+ sum4 = sum4 + a[3][0];
+
+ sum1 = sum1 + a[0][1];
+ sum2 = sum2 + a[1][1];
+ sum3 = sum3 + a[2][1];
+ sum4 = sum4 + a[3][1];
+
+ sum1 = sum1 + a[0][2];
+ sum2 = sum2 + a[1][2];
+ sum3 = sum3 + a[2][2];
+ sum4 = sum4 + a[3][2];
+
+ sum1 = sum1 + a[0][3];
+ sum2 = sum2 + a[1][3];
+ sum3 = sum3 + a[2][3];
+ sum4 = sum4 + a[3][3];
+
+ if( ( sum1 > 10.0-ERROR_EPSILON && sum1 < 10.0+ERROR_EPSILON ) &&
+ ( sum2 > 26.0-ERROR_EPSILON && sum2 < 26.0+ERROR_EPSILON) &&
+ ( sum3 > 42.0-ERROR_EPSILON && sum3 < 42.0+ERROR_EPSILON) &&
+ ( sum4 > 58.0-ERROR_EPSILON && sum4 < 58.0+ERROR_EPSILON) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_copy_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_copy_frag.frag
new file mode 100644
index 000000000..9a9711cbe
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_copy_frag.frag
@@ -0,0 +1,95 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ float x;
+ // Declare a constant 4 by 4 matrix with unique elements.
+ mat4 a = mat4( 1.0, 2.0, 3.0, 4.0,
+ 5.0, 6.0, 7.0, 8.0,
+ 9.0, 10.0, 11.0, 12.0,
+ 13.0, 14.0, 15.0, 16.0);
+
+ // Copy the matrix to another non-const matrix.
+ mat4 b = a;
+
+ // Check each element of the copy.
+ bool elms = true;
+ if(b[0][0] != 1.0) elms = false;
+ if(b[0][1] != 2.0) elms = false;
+ if(b[0][2] != 3.0) elms = false;
+ if(b[0][3] != 4.0) elms = false;
+ if(b[1][0] != 5.0) elms = false;
+ if(b[1][1] != 6.0) elms = false;
+ if(b[1][2] != 7.0) elms = false;
+ if(b[1][3] != 8.0) elms = false;
+ if(b[2][0] != 9.0) elms = false;
+ if(b[2][1] != 10.0) elms = false;
+ if(b[2][2] != 11.0) elms = false;
+ if(b[2][3] != 12.0) elms = false;
+ if(b[3][0] != 13.0) elms = false;
+ if(b[3][1] != 14.0) elms = false;
+ if(b[3][2] != 15.0) elms = false;
+ if(b[3][3] != 16.0) elms = false;
+
+ // Add up each row of the copy.
+ bool rows = true;
+ x = b[0][0] + b[1][0] + b[2][0] + b[3][0];
+ if(x < 28.0-ERROR_EPSILON || x > 28.0+ERROR_EPSILON) rows = false;
+ x = b[0][1] + b[1][1] + b[2][1] + b[3][1];
+ if(x < 32.0-ERROR_EPSILON || x > 32.0+ERROR_EPSILON) rows = false;
+ x = b[0][2] + b[1][2] + b[2][2] + b[3][2];
+ if(x < 36.0-ERROR_EPSILON || x > 36.0+ERROR_EPSILON) rows = false;
+ x = b[0][3] + b[1][3] + b[2][3] + b[3][3];
+ if(x < 40.0-ERROR_EPSILON || x > 40.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = b[0][0] + b[0][1] + b[0][2] + b[0][3];
+ if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) cols = false;
+ x = b[1][0] + b[1][1] + b[1][2] + b[1][3];
+ if(x < 26.0-ERROR_EPSILON || x > 26.0+ERROR_EPSILON) cols = false;
+ x = b[2][0] + b[2][1] + b[2][2] + b[2][3];
+ if(x < 42.0-ERROR_EPSILON || x > 42.0+ERROR_EPSILON) cols = false;
+ x = b[3][0] + b[3][1] + b[3][2] + b[3][3];
+ if(x < 58.0-ERROR_EPSILON || x > 58.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the fragment color.
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_copy_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_copy_vert.vert
new file mode 100644
index 000000000..ee5c07864
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_copy_vert.vert
@@ -0,0 +1,94 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ float x;
+ // Declare a 4 by 4 matrix with unique elements.
+ mat4 a = mat4( 1.0, 2.0, 4.0, 8.0, // 1.0 16.0 256.0 4096.0
+ 16.0, 32.0, 64.0, 128.0, // 2.0 32.0 512.0 8192.0
+ 256.0, 512.0, 1024.0, 2048.0, // 4.0 64.0 1024.0 16384.0
+ 4096.0, 8192.0, 16384.0, 32768.0); // 8.0 128.0 2048.0 32768.0
+
+ // Copy the matrix to another non-const matrix.
+ mat4 b = a;
+
+ // Check each element of the copy.
+ bool elms = true;
+ if(b[0][0] != 1.0) elms = false;
+ if(b[0][1] != 2.0) elms = false;
+ if(b[0][2] != 4.0) elms = false;
+ if(b[0][3] != 8.0) elms = false;
+ if(b[1][0] != 16.0) elms = false;
+ if(b[1][1] != 32.0) elms = false;
+ if(b[1][2] != 64.0) elms = false;
+ if(b[1][3] != 128.0) elms = false;
+ if(b[2][0] != 256.0) elms = false;
+ if(b[2][1] != 512.0) elms = false;
+ if(b[2][2] != 1024.0) elms = false;
+ if(b[2][3] != 2048.0) elms = false;
+ if(b[3][0] != 4096.0) elms = false;
+ if(b[3][1] != 8192.0) elms = false;
+ if(b[3][2] != 16384.0) elms = false;
+ if(b[3][3] != 32768.0) elms = false;
+
+ // Add up each row of the copy.
+ bool rows = true;
+ x = b[0][0] + b[1][0] + b[2][0] + b[3][0];
+ if(x < 4369.0-ERROR_EPSILON || x > 4369.0+ERROR_EPSILON) rows = false;
+ x = b[0][1] + b[1][1] + b[2][1] + b[3][1];
+ if(x < 8738.0-ERROR_EPSILON || x > 8738.0+ERROR_EPSILON) rows = false;
+ x = b[0][2] + b[1][2] + b[2][2] + b[3][2];
+ if(x < 17476.0-ERROR_EPSILON || x > 17476.0+ERROR_EPSILON) rows = false;
+ x = b[0][3] + b[1][3] + b[2][3] + b[3][3];
+ if(x < 34952.0-ERROR_EPSILON || x > 34952.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = b[0][0] + b[0][1] + b[0][2] + b[0][3];
+ if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false;
+ x = b[1][0] + b[1][1] + b[1][2] + b[1][3];
+ if(x < 240.0-ERROR_EPSILON || x > 240.0+ERROR_EPSILON) cols = false;
+ x = b[2][0] + b[2][1] + b[2][2] + b[2][3];
+ if(x < 3840.0-ERROR_EPSILON || x > 3840.0+ERROR_EPSILON) cols = false;
+ x = b[3][0] + b[3][1] + b[3][2] + b[3][3];
+ if(x < 61440.0-ERROR_EPSILON || x > 61440.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the varying variable color.
+ color = vec4(gray, gray, gray, 1.0);
+
+ // Transform the vertex position.
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_frag.frag
new file mode 100644
index 000000000..972cdceb3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_frag.frag
@@ -0,0 +1,92 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+/* This epsilon will work as long as the magnitude of the float is < 128.
+ * This can be seen by taking the spec relative mediump precision of 2^-10:
+ * 0.125 / 2^-10 = 128
+ */
+#define ERROR_EPSILON (0.125)
+
+void main (void)
+{
+ float x;
+ // Declare a 4 by 4 matrix with unique elements.
+ mat4 a = mat4( 1.0, 2.0, 3.0, 4.0,
+ 5.0, 6.0, 7.0, 8.0,
+ 9.0, 10.0, 11.0, 12.0,
+ 13.0, 14.0, 15.0, 16.0);
+
+ // Check each element.
+ bool elms = true;
+ if(a[0][0] != 1.0) elms = false;
+ if(a[0][1] != 2.0) elms = false;
+ if(a[0][2] != 3.0) elms = false;
+ if(a[0][3] != 4.0) elms = false;
+ if(a[1][0] != 5.0) elms = false;
+ if(a[1][1] != 6.0) elms = false;
+ if(a[1][2] != 7.0) elms = false;
+ if(a[1][3] != 8.0) elms = false;
+ if(a[2][0] != 9.0) elms = false;
+ if(a[2][1] != 10.0) elms = false;
+ if(a[2][2] != 11.0) elms = false;
+ if(a[2][3] != 12.0) elms = false;
+ if(a[3][0] != 13.0) elms = false;
+ if(a[3][1] != 14.0) elms = false;
+ if(a[3][2] != 15.0) elms = false;
+ if(a[3][3] != 16.0) elms = false;
+
+ // Add up each row.
+ bool rows = true;
+ x = a[0][0] + a[1][0] + a[2][0] + a[3][0];
+ if(x < 28.0-ERROR_EPSILON || x > 28.0+ERROR_EPSILON) rows = false;
+ x = a[0][1] + a[1][1] + a[2][1] + a[3][1];
+ if(x < 32.0-ERROR_EPSILON || x > 32.0+ERROR_EPSILON) rows = false;
+ x = a[0][2] + a[1][2] + a[2][2] + a[3][2];
+ if(x < 36.0-ERROR_EPSILON || x > 36.0+ERROR_EPSILON) rows = false;
+ x = a[0][3] + a[1][3] + a[2][3] + a[3][3];
+ if(x < 40.0-ERROR_EPSILON || x > 40.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column of the copy.
+ bool cols = true;
+ x = a[0][0] + a[0][1] + a[0][2] + a[0][3];
+ if(x < 10.0-ERROR_EPSILON || x > 10.0+ERROR_EPSILON) cols = false;
+ x = a[1][0] + a[1][1] + a[1][2] + a[1][3];
+ if(x < 26.0-ERROR_EPSILON || x > 26.0+ERROR_EPSILON) cols = false;
+ x = a[2][0] + a[2][1] + a[2][2] + a[2][3];
+ if(x < 42.0-ERROR_EPSILON || x > 42.0+ERROR_EPSILON) cols = false;
+ x = a[3][0] + a[3][1] + a[3][2] + a[3][3];
+ if(x < 58.0-ERROR_EPSILON || x > 58.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the fragment color.
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_vert.vert
new file mode 100644
index 000000000..910729c2b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_vert.vert
@@ -0,0 +1,91 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ float x;
+ // Declare a 4 by 4 matrix with unique elements.
+ mat4 a = mat4( 1.0, 2.0, 4.0, 8.0, // 1.0 16.0 256.0 4096.0
+ 16.0, 32.0, 64.0, 128.0, // 2.0 32.0 512.0 8192.0
+ 256.0, 512.0, 1024.0, 2048.0, // 4.0 64.0 1024.0 16384.0
+ 4096.0, 8192.0, 16384.0, 32768.0); // 8.0 128.0 2048.0 32768.0
+
+ // Check each element.
+ bool elms = true;
+ if(a[0][0] != 1.0) elms = false;
+ if(a[0][1] != 2.0) elms = false;
+ if(a[0][2] != 4.0) elms = false;
+ if(a[0][3] != 8.0) elms = false;
+ if(a[1][0] != 16.0) elms = false;
+ if(a[1][1] != 32.0) elms = false;
+ if(a[1][2] != 64.0) elms = false;
+ if(a[1][3] != 128.0) elms = false;
+ if(a[2][0] != 256.0) elms = false;
+ if(a[2][1] != 512.0) elms = false;
+ if(a[2][2] != 1024.0) elms = false;
+ if(a[2][3] != 2048.0) elms = false;
+ if(a[3][0] != 4096.0) elms = false;
+ if(a[3][1] != 8192.0) elms = false;
+ if(a[3][2] != 16384.0) elms = false;
+ if(a[3][3] != 32768.0) elms = false;
+
+ // Add up each row.
+ bool rows = true;
+ x = a[0][0] + a[1][0] + a[2][0] + a[3][0];
+ if(x < 4369.0-ERROR_EPSILON || x > 4369.0+ERROR_EPSILON) rows = false;
+ x = a[0][1] + a[1][1] + a[2][1] + a[3][1];
+ if(x < 8738.0-ERROR_EPSILON || x > 8738.0+ERROR_EPSILON) rows = false;
+ x = a[0][2] + a[1][2] + a[2][2] + a[3][2];
+ if(x < 17476.0-ERROR_EPSILON || x > 17476.0+ERROR_EPSILON) rows = false;
+ x = a[0][3] + a[1][3] + a[2][3] + a[3][3];
+ if(x < 34952.0-ERROR_EPSILON || x > 34952.0+ERROR_EPSILON) rows = false;
+
+ // Add up each column.
+ bool cols = true;
+ x = a[0][0] + a[0][1] + a[0][2] + a[0][3];
+ if(x < 15.0-ERROR_EPSILON || x > 15.0+ERROR_EPSILON) cols = false;
+ x = a[1][0] + a[1][1] + a[1][2] + a[1][3];
+ if(x < 240.0-ERROR_EPSILON || x > 240.0+ERROR_EPSILON) cols = false;
+ x = a[2][0] + a[2][1] + a[2][2] + a[2][3];
+ if(x < 3840.0-ERROR_EPSILON || x > 3840.0+ERROR_EPSILON) cols = false;
+ x = a[3][0] + a[3][1] + a[3][2] + a[3][3];
+ if(x < 61440.0-ERROR_EPSILON || x > 61440.0+ERROR_EPSILON) cols = false;
+
+ // Check if all of the operations were successful.
+ float gray = elms && rows && cols ? 1.0 : 0.0;
+
+ // Assign the varying variable color.
+ color = vec4(gray, gray, gray, 1.0);
+
+ // Transform the vertex position.
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_001_to_008.html
new file mode 100644
index 000000000..a4bc1194e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_001_to_008.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: mat_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "const_mat2_frag.frag"
+ },
+ "name": "const_mat2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "const_mat2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "const_mat2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "const_mat3_frag.frag"
+ },
+ "name": "const_mat3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "const_mat3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "const_mat3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "const_mat4_frag.frag"
+ },
+ "name": "const_mat4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "const_mat4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "const_mat4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "const_mat2_copy_frag.frag"
+ },
+ "name": "const_mat2_copy_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "const_mat2_copy_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "const_mat2_copy_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_009_to_016.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_009_to_016.html
new file mode 100644
index 000000000..8e979b3cd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_009_to_016.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: mat_009_to_016.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "const_mat3_copy_frag.frag"
+ },
+ "name": "const_mat3_copy_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "const_mat3_copy_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "const_mat3_copy_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "const_mat4_copy_frag.frag"
+ },
+ "name": "const_mat4_copy_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "const_mat4_copy_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "const_mat4_copy_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat2_frag.frag"
+ },
+ "name": "mat2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat3_frag.frag"
+ },
+ "name": "mat3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_017_to_024.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_017_to_024.html
new file mode 100644
index 000000000..fd59d1b93
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_017_to_024.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: mat_017_to_024.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat4_frag.frag"
+ },
+ "name": "mat4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat2_copy_frag.frag"
+ },
+ "name": "mat2_copy_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat2_copy_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat2_copy_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat3_copy_frag.frag"
+ },
+ "name": "mat3_copy_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat3_copy_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat3_copy_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat4_copy_frag.frag"
+ },
+ "name": "mat4_copy_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat4_copy_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat4_copy_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_025_to_032.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_025_to_032.html
new file mode 100644
index 000000000..f090bd761
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_025_to_032.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: mat_025_to_032.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat2_float_frag.frag"
+ },
+ "name": "mat2_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "mat2_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat2_float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat2_4float_frag.frag"
+ },
+ "name": "mat2_4float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "mat2_4float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat2_4float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat2_2vec2_frag.frag"
+ },
+ "name": "mat2_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "mat2_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat2_2vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat3_float_frag.frag"
+ },
+ "name": "mat3_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "mat3_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat3_float_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_033_to_040.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_033_to_040.html
new file mode 100644
index 000000000..f1dd2fe4b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_033_to_040.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: mat_033_to_040.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat3_9float_frag.frag"
+ },
+ "name": "mat3_9float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "mat3_9float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat3_9float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat3_3vec3_frag.frag"
+ },
+ "name": "mat3_3vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "mat3_3vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat3_3vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat4_4vec4_frag.frag"
+ },
+ "name": "mat4_4vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat4_4vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat4_4vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mat4_16float_frag.frag"
+ },
+ "name": "mat4_16float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat4_16float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat4_16float_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_041_to_046.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_041_to_046.html
new file mode 100644
index 000000000..570e69046
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_041_to_046.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: mat_041_to_046.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array_const_mat2_frag.frag"
+ },
+ "name": "array_const_mat2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "array_const_mat2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "array_const_mat2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array_const_mat3_frag.frag"
+ },
+ "name": "array_const_mat3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "array_const_mat3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "array_const_mat3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "array_const_mat4_frag.frag"
+ },
+ "name": "array_const_mat4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "array_const_mat4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "array_const_mat4_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/input.run.txt
new file mode 100644
index 000000000..f79e127c2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+mat3_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3_001_to_006.html
new file mode 100644
index 000000000..be179ecec
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3_001_to_006.html
@@ -0,0 +1,365 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: mat3_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.5,
+ 0.25,
+ 0.125,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat3arraysimple_vert.vert",
+ "uniforms": {
+ "testmat3": {
+ "count": 2,
+ "type": "uniformMatrix3fv",
+ "transpose": false,
+ "value": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.25
+ ]
+ }
+ },
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat3arraysimple_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 0.75,
+ 0.625,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat3arrayindirect0_vert.vert",
+ "uniforms": {
+ "testmat3": {
+ "count": 2,
+ "type": "uniformMatrix3fv",
+ "transpose": false,
+ "value": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.25
+ ]
+ }
+ },
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat3arrayindirect0_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.5,
+ 0.25,
+ 0.125,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mat3arrayindirect1_vert.vert",
+ "uniforms": {
+ "testmat3": {
+ "count": 2,
+ "type": "uniformMatrix3fv",
+ "transpose": false,
+ "value": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.25
+ ]
+ }
+ },
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mat3arrayindirect1_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.5,
+ 0.25,
+ 0.125,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "testmat3": {
+ "count": 2,
+ "type": "uniformMatrix3fv",
+ "transpose": false,
+ "value": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.25
+ ]
+ }
+ },
+ "fragmentShader": "mat3arraysimple_frag.frag"
+ },
+ "name": "mat3arraysimple_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 0.75,
+ 0.625,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "testmat3": {
+ "count": 2,
+ "type": "uniformMatrix3fv",
+ "transpose": false,
+ "value": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.25
+ ]
+ }
+ },
+ "fragmentShader": "mat3arrayindirect0_frag.frag"
+ },
+ "name": "mat3arrayindirect0_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.5,
+ 0.25,
+ 0.125,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "testmat3": {
+ "count": 2,
+ "type": "uniformMatrix3fv",
+ "transpose": false,
+ "value": [
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0,
+ 1.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.25,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.25
+ ]
+ }
+ },
+ "fragmentShader": "mat3arrayindirect1_frag.frag"
+ },
+ "name": "mat3arrayindirect1_frag.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect0_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect0_frag.frag
new file mode 100644
index 000000000..f5c7dac7b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect0_frag.frag
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+//
+// mat3arrayindirect0_frag.frag: Fragment shader solid color
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform mat3 testmat3[2];
+varying vec4 color;
+
+void main(void)
+{
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ /*
+ // No indirect indexing in fragment shaders
+ for(int j = 0; j < 3; j++)
+ {
+ result += testmat3[0][j] + testmat3[1][j];
+ }
+ */
+ result += testmat3[0][0] + testmat3[1][0];
+ result += testmat3[0][1] + testmat3[1][1];
+ result += testmat3[0][2] + testmat3[1][2];
+ gl_FragColor = vec4(result/2.0, 0.5);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect0_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect0_vert.vert
new file mode 100644
index 000000000..d6d1f971a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect0_vert.vert
@@ -0,0 +1,52 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+//
+// mat3arrayindirect0_vert.vert: Vertex shader solid color
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform mat3 testmat3[2];
+varying vec4 color;
+
+
+void main(void)
+{
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ for(int j = 0; j < 3; j++)
+ {
+ result += testmat3[0][j] + testmat3[1][j];
+ }
+
+ color = vec4(result/2.0, 0.5);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect1_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect1_frag.frag
new file mode 100644
index 000000000..23bc15d1d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect1_frag.frag
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+//
+// mat3arrayindirect1_frag.frag: Fragment shader solid color testing indirect referencing into uniforms
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform mat3 testmat3[2];
+varying vec4 color;
+
+void main(void)
+{
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ /*
+ // No indirect indexing in fragment shaders
+ for(int j = 0; j < 3; j++)
+ {
+ result += testmat3[1][j];
+ }
+*/
+ result += testmat3[1][0];
+ result += testmat3[1][1];
+ result += testmat3[1][2];
+ gl_FragColor = vec4(result/2.0, 0.5);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect1_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect1_vert.vert
new file mode 100644
index 000000000..e23890384
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect1_vert.vert
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+//
+// mat3arrayindirect1_vert.vert: Vertex shader solid color testing indirect referencing into uniforms
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform mat3 testmat3[2];
+varying vec4 color;
+
+
+void main(void)
+{
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ for(int j = 0; j < 3; j++)
+ {
+ result += testmat3[1][j];
+ }
+
+
+ color = vec4(result/2.0, 0.5);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arraysimple_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arraysimple_frag.frag
new file mode 100644
index 000000000..7bca3f11e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arraysimple_frag.frag
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+// mat3arraysimple_frag.frag: Fragment shader solid color testing indirect referencing into uniforms
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform mat3 testmat3[2];
+varying vec4 color;
+
+void main(void)
+{
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ result = testmat3[1][0] + testmat3[1][1] + testmat3[1][2];
+ gl_FragColor = vec4(result/2.0, 0.5);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arraysimple_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arraysimple_vert.vert
new file mode 100644
index 000000000..53887e9a9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arraysimple_vert.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+//
+// mat3arraysimple_vert.vert: Vertex shader solid color testing indirect referencing into uniforms
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform mat3 testmat3[2];
+varying vec4 color;
+
+
+void main(void)
+{
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ result = testmat3[1][0] + testmat3[1][1] + testmat3[1][2];
+
+ color = vec4(result/2.0, 0.5);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/input.run.txt
new file mode 100644
index 000000000..91d20c86e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+matrixCompMult_001_to_004.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixCompMult_001_to_004.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixCompMult_001_to_004.html
new file mode 100644
index 000000000..4a3d580cb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixCompMult_001_to_004.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: matrixCompMult_001_to_004.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "matrixMultComp_mat2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "matrixMultComp_mat2_frag.frag"
+ },
+ "name": "matrixMultComp_mat2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "matrixMultComp_mat2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "matrixMultComp_mat2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "matrixMultComp_mat2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "matrixMultComp_mat3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "matrixMultComp_mat3_frag.frag"
+ },
+ "name": "matrixMultComp_mat3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "matrixMultComp_mat3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "matrixMultComp_mat3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "matrixMultComp_mat3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_frag.frag
new file mode 100644
index 000000000..8db7ddf3d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ mat2 m1 = mat2(color.rg, color.ba);
+ mat2 m2 = mat2(1.0, 0.5, 0.5, 1.0);
+ mat2 m3 = mat2(0.0);
+
+ m3 = matrixCompMult(m1, m2);
+ gl_FragColor = vec4(m3[0][0], m3[1][0], m3[0][1], m3[1][1]);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_frag_ref.frag
new file mode 100644
index 000000000..fed33bea1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_frag_ref.frag
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ mat2 m1 = mat2(color.rg, color.ba);
+ mat2 m2 = mat2(1.0, 0.5, 0.5, 1.0);
+ mat2 m3 = mat2(0.0);
+
+ m3[0][0] = m1[0][0] * m2[0][0];
+ m3[0][1] = m1[0][1] * m2[0][1];
+ m3[1][0] = m1[1][0] * m2[1][0];
+ m3[1][1] = m1[1][1] * m2[1][1];
+
+ gl_FragColor = vec4(m3[0][0], m3[1][0], m3[0][1], m3[1][1]);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_vert.vert
new file mode 100644
index 000000000..e912de35c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ mat2 m1 = mat2(gtf_Color.r, gtf_Color.g, gtf_Color.b, gtf_Color.a);
+ mat2 m2 = mat2(1.0, 0.5, 0.5, 1.0);
+ mat2 m3 = mat2(0.0);
+
+ m3 = matrixCompMult(m1, m2);
+ color = vec4(m3[0][0], m3[1][0], m3[0][1], m3[1][1]);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_vert_ref.vert
new file mode 100644
index 000000000..cda02927d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_vert_ref.vert
@@ -0,0 +1,44 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ mat2 m1 = mat2(gtf_Color.r, gtf_Color.g, gtf_Color.b, gtf_Color.a);
+ mat2 m2 = mat2(1.0, 0.5, 0.5, 1.0);
+ mat2 m3 = mat2(0.0);
+
+ m3[0][0] = m1[0][0] * m2[0][0];
+ m3[0][1] = m1[0][1] * m2[0][1];
+ m3[1][0] = m1[1][0] * m2[1][0];
+ m3[1][1] = m1[1][1] * m2[1][1];
+
+ color = vec4(m3[0][0], m3[1][0], m3[0][1], m3[1][1]);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_frag.frag
new file mode 100644
index 000000000..dfc55262c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_frag.frag
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ mat3 m1 = mat3(color.rgb, color.rgb, color.rgb);
+ mat3 m2 = mat3(1.0, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.5, 1.0);
+ mat3 m3 = mat3(0.0);
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ m3 = matrixCompMult(m1, m2);
+
+ result[0] += m3[0][0];
+ result[0] += m3[0][1];
+ result[0] += m3[0][2];
+
+ result[1] += m3[1][0];
+ result[1] += m3[1][1];
+ result[1] += m3[1][2];
+
+ result[2] += m3[2][0];
+ result[2] += m3[2][1];
+ result[2] += m3[2][2];
+
+ gl_FragColor = vec4(result / 2.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_frag_ref.frag
new file mode 100644
index 000000000..21365a0dc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_frag_ref.frag
@@ -0,0 +1,59 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ mat3 m1 = mat3(color.rgb, color.rgb, color.rgb);
+ mat3 m2 = mat3(1.0, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.5, 1.0);
+ mat3 m3 = mat3(0.0);
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ m3[0][0] = m1[0][0] * m2[0][0];
+ m3[0][1] = m1[0][1] * m2[0][1];
+ m3[0][2] = m1[0][2] * m2[0][2];
+ m3[1][0] = m1[1][0] * m2[1][0];
+ m3[1][1] = m1[1][1] * m2[1][1];
+ m3[1][2] = m1[1][2] * m2[1][2];
+ m3[2][0] = m1[2][0] * m2[2][0];
+ m3[2][1] = m1[2][1] * m2[2][1];
+ m3[2][2] = m1[2][2] * m2[2][2];
+
+ result[0] += m3[0][0];
+ result[0] += m3[0][1];
+ result[0] += m3[0][2];
+ result[1] += m3[1][0];
+ result[1] += m3[1][1];
+ result[1] += m3[1][2];
+ result[2] += m3[2][0];
+ result[2] += m3[2][1];
+ result[2] += m3[2][2];
+
+ gl_FragColor = vec4(result / 2.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_vert.vert
new file mode 100644
index 000000000..5c2508731
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_vert.vert
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ mat3 m1 = mat3(gtf_Color.rgb, gtf_Color.rgb, gtf_Color.rgb);
+ mat3 m2 = mat3(1.0, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.5, 1.0);
+ mat3 m3 = mat3(0.0);
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ m3 = matrixCompMult(m1, m2);
+
+ result[0] += m3[0][0];
+ result[0] += m3[0][1];
+ result[0] += m3[0][2];
+
+ result[1] += m3[1][0];
+ result[1] += m3[1][1];
+ result[1] += m3[1][2];
+
+ result[2] += m3[2][0];
+ result[2] += m3[2][1];
+ result[2] += m3[2][2];
+
+ color = vec4(result / 2.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_vert_ref.vert
new file mode 100644
index 000000000..336db100c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_vert_ref.vert
@@ -0,0 +1,64 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ mat3 m1 = mat3(gtf_Color.rgb, gtf_Color.rgb, gtf_Color.rgb);
+ mat3 m2 = mat3(1.0, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.5, 1.0);
+ mat3 m3 = mat3(0.0);
+ vec3 result = vec3(0.0, 0.0, 0.0);
+
+ m3[0][0] = m1[0][0] * m2[0][0];
+ m3[0][1] = m1[0][1] * m2[0][1];
+ m3[0][2] = m1[0][2] * m2[0][2];
+
+ m3[1][0] = m1[1][0] * m2[1][0];
+ m3[1][1] = m1[1][1] * m2[1][1];
+ m3[1][2] = m1[1][2] * m2[1][2];
+
+ m3[2][0] = m1[2][0] * m2[2][0];
+ m3[2][1] = m1[2][1] * m2[2][1];
+ m3[2][2] = m1[2][2] * m2[2][2];
+
+ result[0] += m3[0][0];
+ result[0] += m3[0][1];
+ result[0] += m3[0][2];
+
+ result[1] += m3[1][0];
+ result[1] += m3[1][1];
+ result[1] += m3[1][2];
+
+ result[2] += m3[2][0];
+ result[2] += m3[2][1];
+ result[2] += m3[2][2];
+
+ color = vec4(result / 2.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/input.run.txt
new file mode 100644
index 000000000..552692d67
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+max_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_001_to_006.html
new file mode 100644
index 000000000..fc89b5332
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: max_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "max_float_frag_xvary_yconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "max_float_frag_xvary_yconsthalf.frag"
+ },
+ "name": "max_float_frag_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "max_vec2_frag_xvary_yconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "max_vec2_frag_xvary_yconsthalf.frag"
+ },
+ "name": "max_vec2_frag_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "max_vec3_frag_xvary_yconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "max_vec3_frag_xvary_yconsthalf.frag"
+ },
+ "name": "max_vec3_frag_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "max_float_vert_xvary_yconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "max_float_vert_xvary_yconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "max_float_vert_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "max_vec2_vert_xvary_yconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "max_vec2_vert_xvary_yconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "max_vec2_vert_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "max_vec3_vert_xvary_yconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "max_vec3_vert_xvary_yconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "max_vec3_vert_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_frag_xvary_yconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_frag_xvary_yconsthalf.frag
new file mode 100644
index 000000000..1dc582375
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_frag_xvary_yconsthalf.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float max_c = 0.5;
+ float c = color.r;
+ gl_FragColor = vec4(max(c, max_c), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_frag_xvary_yconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_frag_xvary_yconsthalf_ref.frag
new file mode 100644
index 000000000..44188757e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_frag_xvary_yconsthalf_ref.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float max_c = 0.5;
+ float c = color.r;
+ if(c < max_c) c = max_c;
+
+ gl_FragColor = vec4(c, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_vert_xvary_yconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_vert_xvary_yconsthalf.vert
new file mode 100644
index 000000000..18df63489
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_vert_xvary_yconsthalf.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float max_c = 0.5;
+ float c = gtf_Color.r;
+ color = vec4(max(c, max_c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_vert_xvary_yconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_vert_xvary_yconsthalf_ref.vert
new file mode 100644
index 000000000..44602be92
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_vert_xvary_yconsthalf_ref.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float max_c = 0.5;
+ float c = gtf_Color.r;
+ if(c < max_c) c = max_c;
+
+ color = vec4(c, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_frag_xvary_yconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_frag_xvary_yconsthalf.frag
new file mode 100644
index 000000000..12cccbaf5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_frag_xvary_yconsthalf.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 max_c = vec2(0.5, 0.5);
+ vec2 c = color.rg;
+ gl_FragColor = vec4(max(c, max_c), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_frag_xvary_yconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_frag_xvary_yconsthalf_ref.frag
new file mode 100644
index 000000000..63d52b2ff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_frag_xvary_yconsthalf_ref.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 max_c = vec2(0.5, 0.5);
+ vec2 c = color.rg;
+ if(c[0] < max_c[0]) c[0] = max_c[0];
+ if(c[1] < max_c[1]) c[1] = max_c[1];
+
+ gl_FragColor = vec4(c, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_vert_xvary_yconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_vert_xvary_yconsthalf.vert
new file mode 100644
index 000000000..54a94edf5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_vert_xvary_yconsthalf.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 max_c = vec2(0.5, 0.5);
+ vec2 c = gtf_Color.rg;
+ color = vec4(max(c, max_c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_vert_xvary_yconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_vert_xvary_yconsthalf_ref.vert
new file mode 100644
index 000000000..b8ad06aa8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_vert_xvary_yconsthalf_ref.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 max_c = vec2(0.5, 0.5);
+ vec2 c = gtf_Color.rg;
+ if(c[0] < max_c[0]) c[0] = max_c[0];
+ if(c[1] < max_c[1]) c[1] = max_c[1];
+
+ color = vec4(c, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_frag_xvary_yconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_frag_xvary_yconsthalf.frag
new file mode 100644
index 000000000..b44d0c851
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_frag_xvary_yconsthalf.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 max_c = vec3(0.5, 0.5, 0.5);
+ vec3 c = color.rgb;
+ gl_FragColor = vec4(max(c, max_c), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_frag_xvary_yconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_frag_xvary_yconsthalf_ref.frag
new file mode 100644
index 000000000..d17d8cdea
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_frag_xvary_yconsthalf_ref.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 max_c = vec3(0.5, 0.5, 0.5);
+ vec3 c = color.rgb;
+ if(c[0] < max_c[0]) c[0] = max_c[0];
+ if(c[1] < max_c[1]) c[1] = max_c[1];
+ if(c[2] < max_c[2]) c[2] = max_c[2];
+
+ gl_FragColor = vec4(c, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_vert_xvary_yconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_vert_xvary_yconsthalf.vert
new file mode 100644
index 000000000..549f510fc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_vert_xvary_yconsthalf.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 max_c = vec3(0.5, 0.5, 0.5);
+ vec3 c = gtf_Color.rgb;
+ color = vec4(max(c, max_c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_vert_xvary_yconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_vert_xvary_yconsthalf_ref.vert
new file mode 100644
index 000000000..84de20274
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_vert_xvary_yconsthalf_ref.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 max_c = vec3(0.5, 0.5, 0.5);
+ vec3 c = gtf_Color.rgb;
+ if(c[0] < max_c[0]) c[0] = max_c[0];
+ if(c[1] < max_c[1]) c[1] = max_c[1];
+ if(c[2] < max_c[2]) c[2] = max_c[2];
+
+ color = vec4(c, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/input.run.txt
new file mode 100644
index 000000000..5c675deae
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+min_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_001_to_006.html
new file mode 100644
index 000000000..e0330ab95
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: min_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "min_float_frag_xvary_yconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "min_float_frag_xvary_yconsthalf.frag"
+ },
+ "name": "min_float_frag_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "min_vec2_frag_xvary_yconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "min_vec2_frag_xvary_yconsthalf.frag"
+ },
+ "name": "min_vec2_frag_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "min_vec3_frag_xvary_yconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "min_vec3_frag_xvary_yconsthalf.frag"
+ },
+ "name": "min_vec3_frag_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "min_float_vert_xvary_yconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "min_float_vert_xvary_yconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "min_float_vert_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "min_vec2_vert_xvary_yconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "min_vec2_vert_xvary_yconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "min_vec2_vert_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "min_vec3_vert_xvary_yconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "min_vec3_vert_xvary_yconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "min_vec3_vert_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf.frag
new file mode 100644
index 000000000..fdc3e23a6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.5;
+ float c = color.r;
+ gl_FragColor = vec4(min(c, min_c), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf_ref.frag
new file mode 100644
index 000000000..acf1eebb2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf_ref.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.5;
+ float c = color.r;
+ if(c > min_c) c = min_c;
+
+ gl_FragColor = vec4(c, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf.vert
new file mode 100644
index 000000000..b854733dd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.5;
+ float c = gtf_Color.r;
+ color = vec4(min(c, min_c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf_ref.vert
new file mode 100644
index 000000000..73849e092
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf_ref.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float min_c = 0.5;
+ float c = gtf_Color.r;
+ if(c > min_c) c = min_c;
+
+ color = vec4(c, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf.frag
new file mode 100644
index 000000000..ea5563eb1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 min_c = vec2(0.5, 0.5);
+ vec2 c = color.rg;
+ gl_FragColor = vec4(min(c, min_c), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf_ref.frag
new file mode 100644
index 000000000..82ae1b891
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf_ref.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 min_c = vec2(0.5, 0.5);
+ vec2 c = color.rg;
+ if(c[0] > min_c[0]) c[0] = min_c[0];
+ if(c[1] > min_c[1]) c[1] = min_c[1];
+
+ gl_FragColor = vec4(c, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf.vert
new file mode 100644
index 000000000..ae6459783
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 min_c = vec2(0.5, 0.5);
+ vec2 c = gtf_Color.rg;
+ color = vec4(min(c, min_c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf_ref.vert
new file mode 100644
index 000000000..1f8d54b3a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf_ref.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 min_c = vec2(0.5, 0.5);
+ vec2 c = gtf_Color.rg;
+ if(c[0] > min_c[0]) c[0] = min_c[0];
+ if(c[1] > min_c[1]) c[1] = min_c[1];
+
+ color = vec4(c, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf.frag
new file mode 100644
index 000000000..80232206f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 min_c = vec3(0.5, 0.5, 0.5);
+ vec3 c = color.rgb;
+ gl_FragColor = vec4(min(c, min_c), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf_ref.frag
new file mode 100644
index 000000000..2432efe93
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf_ref.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 min_c = vec3(0.5, 0.5, 0.5);
+ vec3 c = color.rgb;
+ if(c[0] > min_c[0]) c[0] = min_c[0];
+ if(c[1] > min_c[1]) c[1] = min_c[1];
+ if(c[2] > min_c[2]) c[2] = min_c[2];
+
+ gl_FragColor = vec4(c, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf.vert
new file mode 100644
index 000000000..96629e770
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 min_c = vec3(0.5, 0.5, 0.5);
+ vec3 c = gtf_Color.rgb;
+ color = vec4(min(c, min_c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf_ref.vert
new file mode 100644
index 000000000..65d273dc3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf_ref.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 min_c = vec3(0.5, 0.5, 0.5);
+ vec3 c = gtf_Color.rgb;
+ if(c[0] > min_c[0]) c[0] = min_c[0];
+ if(c[1] > min_c[1]) c[1] = min_c[1];
+ if(c[2] > min_c[2]) c[2] = min_c[2];
+
+ color = vec4(c, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/input.run.txt
new file mode 100644
index 000000000..f1c7ead98
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+mix_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_001_to_006.html
new file mode 100644
index 000000000..a9f4de177
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: mix_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mix_float_frag_xvary_yconsthalf_aconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mix_float_frag_xvary_yconsthalf_aconsthalf.frag"
+ },
+ "name": "mix_float_frag_xvary_yconsthalf_aconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mix_vec2_frag_xvary_yconsthalf_aconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mix_vec2_frag_xvary_yconsthalf_aconsthalf.frag"
+ },
+ "name": "mix_vec2_frag_xvary_yconsthalf_aconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mix_vec3_frag_xvary_yconsthalf_aconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mix_vec3_frag_xvary_yconsthalf_aconsthalf.frag"
+ },
+ "name": "mix_vec3_frag_xvary_yconsthalf_aconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "mix_float_vert_xvary_yconsthalf_aconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "mix_float_vert_xvary_yconsthalf_aconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mix_float_vert_xvary_yconsthalf_aconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "mix_vec2_vert_xvary_yconsthalf_aconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "mix_vec2_vert_xvary_yconsthalf_aconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mix_vec2_vert_xvary_yconsthalf_aconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "mix_vec3_vert_xvary_yconsthalf_aconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "mix_vec3_vert_xvary_yconsthalf_aconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mix_vec3_vert_xvary_yconsthalf_aconsthalf.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf.frag
new file mode 100644
index 000000000..c04c6ba63
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float y = 0.5;
+ const float a = 0.5;
+ float c = color.r;
+ gl_FragColor = vec4(mix(c, y, a), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf_ref.frag
new file mode 100644
index 000000000..74f962959
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf_ref.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float y = 0.5;
+ const float a = 0.5;
+ float c = color.r;
+
+ gl_FragColor = vec4(c * (1.0 - a) + y * a, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf.vert
new file mode 100644
index 000000000..bce996506
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float y = 0.5;
+ const float a = 0.5;
+ float c = gtf_Color.r;
+ color = vec4(mix(c, y, a), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf_ref.vert
new file mode 100644
index 000000000..adce95219
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf_ref.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float y = 0.5;
+ const float a = 0.5;
+ float c = gtf_Color.r;
+
+ color = vec4(c * (1.0 - a) + y * a, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf.frag
new file mode 100644
index 000000000..4578aa893
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 y = vec2(0.5, 0.5);
+ const vec2 a = vec2(0.5, 0.5);
+ gl_FragColor = vec4(mix(color.rg, y, a), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf_ref.frag
new file mode 100644
index 000000000..b75166792
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf_ref.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 y = vec2(0.5, 0.5);
+ const vec2 a = vec2(0.5, 0.5);
+ vec2 c = color.rg;
+
+ gl_FragColor = vec4(c * (1.0 - a) + y * a, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf.vert
new file mode 100644
index 000000000..ffdbd2677
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 y = vec2(0.5, 0.5);
+ const vec2 a = vec2(0.5, 0.5);
+ color = vec4(mix(gtf_Color.rg, y, a), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf_ref.vert
new file mode 100644
index 000000000..38d2de727
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf_ref.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 y = vec2(0.5, 0.5);
+ const vec2 a = vec2(0.5, 0.5);
+ vec2 c = gtf_Color.rg;
+
+ color = vec4(c * (1.0 - a) + y * a, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf.frag
new file mode 100644
index 000000000..fef30dced
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 y = vec3(0.5, 0.5, 0.5);
+ const vec3 a = vec3(0.5, 0.5, 0.5);
+ gl_FragColor = vec4(mix(color.rgb, y, a), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf_ref.frag
new file mode 100644
index 000000000..fda46efc7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf_ref.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 y = vec3(0.5, 0.5, 0.5);
+ const vec3 a = vec3(0.5, 0.5, 0.5);
+ vec3 c = color.rgb;
+
+ gl_FragColor = vec4(c * (1.0 - a) + y * a, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf.vert
new file mode 100644
index 000000000..690f41ec9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 y = vec3(0.5, 0.5, 0.5);
+ const vec3 a = vec3(0.5, 0.5, 0.5);
+ color = vec4(mix(gtf_Color.rgb, y, a), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf_ref.vert
new file mode 100644
index 000000000..d9dec9bbb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf_ref.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 y = vec3(0.5, 0.5, 0.5);
+ const vec3 a = vec3(0.5, 0.5, 0.5);
+ vec3 c = gtf_Color.rgb;
+
+ color = vec4(c * (1.0 - a) + y * a, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/input.run.txt
new file mode 100644
index 000000000..d369e576f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+mod_001_to_008.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_001_to_008.html
new file mode 100644
index 000000000..5c202b01d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_001_to_008.html
@@ -0,0 +1,181 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: mod_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mod_float_frag_xvary_yconst1_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mod_float_frag_xvary_yconst1.frag"
+ },
+ "name": "mod_float_frag_xvary_yconst1.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mod_vec2_frag_xvary_yconst1_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mod_vec2_frag_xvary_yconst1.frag"
+ },
+ "name": "mod_vec2_frag_xvary_yconst1.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mod_vec3_frag_xvary_yconst1_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mod_vec3_frag_xvary_yconst1.frag"
+ },
+ "name": "mod_vec3_frag_xvary_yconst1.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "mod_float_vert_xvary_yconst1_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "mod_float_vert_xvary_yconst1.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mod_float_vert_xvary_yconst1.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "mod_vec2_vert_xvary_yconst1_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "mod_vec2_vert_xvary_yconst1.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mod_vec2_vert_xvary_yconst1.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "mod_vec3_vert_xvary_yconst1_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "mod_vec3_vert_xvary_yconst1.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mod_vec3_vert_xvary_yconst1.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4f",
+ "value": [
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "mod_x_large_y_large_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "mod_x_large_y_large_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4f",
+ "value": [
+ 0.0,
+ 0.0,
+ 0.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "mod_x_large_y_large_frag.frag"
+ },
+ "name": "mod_x_large_y_large_frag.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1.frag
new file mode 100644
index 000000000..9f22543d9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(mod(c, 1.0), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1_ref.frag
new file mode 100644
index 000000000..2c35298a7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (color.r - 0.5);
+ c = c - 1.0 * floor(c / 1.0);
+ gl_FragColor = vec4(c, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1.vert
new file mode 100644
index 000000000..17d54ce21
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (gtf_Color.r - 0.5);
+ color = vec4(mod(c, 1.0), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1_ref.vert
new file mode 100644
index 000000000..ad6fc8185
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 10.0 * 2.0 * (gtf_Color.r - 0.5);
+ c = c - 1.0 * floor(c / 1.0);
+ color = vec4(c, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1.frag
new file mode 100644
index 000000000..335b8ff49
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(mod(c, 1.0), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1_ref.frag
new file mode 100644
index 000000000..143a832ff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (color.rg - 0.5);
+ c = c - 1.0 * floor(c / 1.0);
+ gl_FragColor = vec4(c, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1.vert
new file mode 100644
index 000000000..dad066a14
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(mod(c, 1.0), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1_ref.vert
new file mode 100644
index 000000000..1f583fd97
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 10.0 * 2.0 * (gtf_Color.rg - 0.5);
+ c = c - 1.0 * floor(c / 1.0);
+ color = vec4(c, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1.frag
new file mode 100644
index 000000000..1b8bd31d2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(mod(c, 1.0), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1_ref.frag
new file mode 100644
index 000000000..6f934b601
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (color.rgb - 0.5);
+ c = c - 1.0 * floor(c / 1.0);
+ gl_FragColor = vec4(c, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1.vert
new file mode 100644
index 000000000..468dd4d3a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(mod(c, 1.0), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1_ref.vert
new file mode 100644
index 000000000..1eb6c4ffc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 10.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ c = c - 1.0 * floor(c / 1.0);
+ color = vec4(c, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_x_large_y_large_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_x_large_y_large_frag.frag
new file mode 100644
index 000000000..a56c58125
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_x_large_y_large_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4(mod(300.0, 100.0), 0.0, 0.0, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_x_large_y_large_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_x_large_y_large_vert.vert
new file mode 100644
index 000000000..0327f8f1d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_x_large_y_large_vert.vert
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(mod(300.0, 100.0), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/input.run.txt
new file mode 100644
index 000000000..56ce6dcbe
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+normalize_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_001_to_006.html
new file mode 100644
index 000000000..1ad4e5883
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: normalize_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "normalize_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "normalize_float_frag_xvary.frag"
+ },
+ "name": "normalize_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "normalize_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "normalize_vec2_frag_xvary.frag"
+ },
+ "name": "normalize_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "normalize_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "normalize_vec3_frag_xvary.frag"
+ },
+ "name": "normalize_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "normalize_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "normalize_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "normalize_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "normalize_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "normalize_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "normalize_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "normalize_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "normalize_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "normalize_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_frag_xvary.frag
new file mode 100644
index 000000000..9d07f0390
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec4 tmp_Color = color + vec4(0.25);
+ gl_FragColor = vec4(normalize(tmp_Color.r), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..1e96c743e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_frag_xvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec4 tmp_Color = color + vec4(0.25);
+ gl_FragColor = vec4(tmp_Color.r / length(tmp_Color.r), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_vert_xvary.vert
new file mode 100644
index 000000000..81e999b8b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 tmp_Color = gtf_Color + vec4(0.25);
+ color = vec4(normalize(tmp_Color.r), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..29e23f5cb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_vert_xvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 tmp_Color = gtf_Color + vec4(0.25);
+ color = vec4(tmp_Color.r / length(tmp_Color.r), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary.frag
new file mode 100644
index 000000000..be1756b5b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec4 tmp_Color = color + vec4(0.25);
+ gl_FragColor = vec4(normalize(tmp_Color.rg), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..0e4e031ea
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec4 tmp_Color = color + vec4(0.25);
+ gl_FragColor = vec4(tmp_Color.rg / length(tmp_Color.rg), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary.vert
new file mode 100644
index 000000000..4bea42efd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 tmp_Color = gtf_Color + vec4(0.25);
+ color = vec4(normalize(tmp_Color.rg), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..b03a2c70b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 tmp_Color = gtf_Color + vec4(0.25);
+ color = vec4(tmp_Color.rg / length(tmp_Color.rg), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary.frag
new file mode 100644
index 000000000..3f7e6eb1d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec4 tmp_Color = color + vec4(0.25);
+ gl_FragColor = vec4(normalize(tmp_Color.rgb), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..62f0cea72
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec4 tmp_Color = color + vec4(0.25);
+ gl_FragColor = vec4(tmp_Color.rgb / length(tmp_Color.rgb), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary.vert
new file mode 100644
index 000000000..33121c034
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 tmp_Color = gtf_Color + vec4(0.25);
+ color = vec4(normalize(tmp_Color.rgb), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..665730a3d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 tmp_Color = gtf_Color + vec4(0.25);
+ color = vec4(tmp_Color.rgb / length(tmp_Color.rgb), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/input.run.txt
new file mode 100644
index 000000000..89038b744
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+not_001_to_004.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_001_to_004.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_001_to_004.html
new file mode 100644
index 000000000..c749f2a70
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_001_to_004.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: not_001_to_004.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "not_bvec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "not_bvec2_frag.frag"
+ },
+ "name": "not_bvec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "not_bvec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "not_bvec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "not_bvec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "not_bvec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "not_bvec3_frag.frag"
+ },
+ "name": "not_bvec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "not_bvec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "not_bvec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "not_bvec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_frag.frag
new file mode 100644
index 000000000..129ba6669
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(1.5 * color.rg); // 1/3 true, 2/3 false
+ gl_FragColor = vec4(vec2(not(bvec2(c))), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_frag_ref.frag
new file mode 100644
index 000000000..3a94ec0fa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_frag_ref.frag
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+bvec2 _not(in bvec2 a)
+{
+ bvec2 result;
+ if(a[0]) result[0] = false;
+ else result[0] = true;
+ if(a[1]) result[1] = false;
+ else result[1] = true;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(1.5 * color.rg); // 1/3 true, 2/3 false
+ gl_FragColor = vec4(vec2(_not(bvec2(c))), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_vert.vert
new file mode 100644
index 000000000..3fb1ff972
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_vert.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(1.5 * gtf_Color.rg); // 1/3 true, 2/3 false
+ color = vec4(vec2(not(bvec2(c))), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_vert_ref.vert
new file mode 100644
index 000000000..974d78645
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_vert_ref.vert
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 _not(in bvec2 a)
+{
+ bvec2 result;
+ if(a[0]) result[0] = false;
+ else result[0] = true;
+ if(a[1]) result[1] = false;
+ else result[1] = true;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(1.5 * gtf_Color.rg); // 1/3 true, 2/3 false
+ color = vec4(vec2(_not(bvec2(c))), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_frag.frag
new file mode 100644
index 000000000..8b2d4e3e9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(1.5 * color.rgb); // 1/3 true, 2/3 false
+ gl_FragColor = vec4(vec3(not(bvec3(c))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_frag_ref.frag
new file mode 100644
index 000000000..2172e7683
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_frag_ref.frag
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 _not(in bvec3 a)
+{
+ bvec3 result;
+ if(a[0]) result[0] = false;
+ else result[0] = true;
+ if(a[1]) result[1] = false;
+ else result[1] = true;
+ if(a[2]) result[2] = false;
+ else result[2] = true;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(1.5 * color.rgb); // 1/3 true, 2/3 false
+ gl_FragColor = vec4(vec3(_not(bvec3(c))), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_vert.vert
new file mode 100644
index 000000000..554724cb6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_vert.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(1.5 * gtf_Color.rgb); // 1/3 true, 2/3 false
+ color = vec4(vec3(not(bvec3(c))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_vert_ref.vert
new file mode 100644
index 000000000..d2a4a5d2e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_vert_ref.vert
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 _not(in bvec3 a)
+{
+ bvec3 result;
+ if(a[0]) result[0] = false;
+ else result[0] = true;
+ if(a[1]) result[1] = false;
+ else result[1] = true;
+ if(a[2]) result[2] = false;
+ else result[2] = true;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(1.5 * gtf_Color.rgb); // 1/3 true, 2/3 false
+ color = vec4(vec3(_not(bvec3(c))), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/input.run.txt
new file mode 100644
index 000000000..9bc23768e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/input.run.txt
@@ -0,0 +1,3 @@
+# this file is auto-generated. DO NOT EDIT.
+notEqual_001_to_008.html
+notEqual_009_to_012.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_001_to_008.html
new file mode 100644
index 000000000..77037cf9d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: notEqual_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "notEqual_vec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "notEqual_vec2_frag.frag"
+ },
+ "name": "notEqual_vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "notEqual_vec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "notEqual_vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "notEqual_vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "notEqual_vec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "notEqual_vec3_frag.frag"
+ },
+ "name": "notEqual_vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "notEqual_vec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "notEqual_vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "notEqual_vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "notEqual_ivec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "notEqual_ivec2_frag.frag"
+ },
+ "name": "notEqual_ivec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "notEqual_ivec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "notEqual_ivec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "notEqual_ivec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "notEqual_ivec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "notEqual_ivec3_frag.frag"
+ },
+ "name": "notEqual_ivec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "notEqual_ivec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "notEqual_ivec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "notEqual_ivec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_009_to_012.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_009_to_012.html
new file mode 100644
index 000000000..63d7127c9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_009_to_012.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: notEqual_009_to_012.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "notEqual_bvec2_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "notEqual_bvec2_frag.frag"
+ },
+ "name": "notEqual_bvec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "notEqual_bvec2_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "notEqual_bvec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "notEqual_bvec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "notEqual_bvec3_frag_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "notEqual_bvec3_frag.frag"
+ },
+ "name": "notEqual_bvec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "notEqual_bvec3_vert_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "notEqual_bvec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "notEqual_bvec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_frag.frag
new file mode 100644
index 000000000..a655860a6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(1.5 * color.rg); // 1/3 true, 2/3 false
+ vec2 result = vec2(notEqual(bvec2(c), bvec2(true)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_frag_ref.frag
new file mode 100644
index 000000000..6d009d10a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_frag_ref.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+bvec2 ne(in bvec2 a, in bvec2 b)
+{
+ bvec2 result;
+ if(a[0] != b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] != b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(1.5 * color.rg); // 1/3 true, 2/3 false
+ vec2 result = vec2(ne(bvec2(c), bvec2(true)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_vert.vert
new file mode 100644
index 000000000..9d0e50624
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(1.5 * gtf_Color.rg); // 1/3 true, 2/3 false
+ vec2 result = vec2(notEqual(bvec2(c), bvec2(true)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_vert_ref.vert
new file mode 100644
index 000000000..4529bfc40
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 ne(in bvec2 a, in bvec2 b)
+{
+ bvec2 result;
+ if(a[0] != b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] != b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(1.5 * gtf_Color.rg); // 1/3 true, 2/3 false
+ vec2 result = vec2(ne(bvec2(c), bvec2(true)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_frag.frag
new file mode 100644
index 000000000..2f3b4f4e1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(1.5 * color.rgb); // 1/3 true, 2/3 false
+ vec3 result = vec3(notEqual(bvec3(c), bvec3(true)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_frag_ref.frag
new file mode 100644
index 000000000..1eaab0520
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 ne(in bvec3 a, in bvec3 b)
+{
+ bvec3 result;
+ if(a[0] != b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] != b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] != b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(1.5 * color.rgb); // 1/3 true, 2/3 false
+ vec3 result = vec3(ne(bvec3(c), bvec3(true)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_vert.vert
new file mode 100644
index 000000000..a4599ec0b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(1.5 * gtf_Color.rgb); // 1/3 true, 2/3 false
+ vec3 result = vec3(notEqual(bvec3(c), bvec3(true)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_vert_ref.vert
new file mode 100644
index 000000000..2d54c8f4c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 ne(in bvec3 a, in bvec3 b)
+{
+ bvec3 result;
+ if(a[0] != b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] != b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] != b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(1.5 * gtf_Color.rgb); // 1/3 true, 2/3 false
+ vec3 result = vec3(ne(bvec3(c), bvec3(true)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_frag.frag
new file mode 100644
index 000000000..cf10bdc4d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(notEqual(ivec2(c), ivec2(0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_frag_ref.frag
new file mode 100644
index 000000000..e5102a7f4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_frag_ref.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec2 ne(in ivec2 a, in ivec2 b)
+{
+ bvec2 result;
+ if(a[0] != b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] != b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(ne(ivec2(c), ivec2(0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_vert.vert
new file mode 100644
index 000000000..751831fdb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(notEqual(ivec2(c), ivec2(0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_vert_ref.vert
new file mode 100644
index 000000000..6ec10073f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 ne(in ivec2 a, in ivec2 b)
+{
+ bvec2 result;
+ if(a[0] != b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] != b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(ne(ivec2(c), ivec2(0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_frag.frag
new file mode 100644
index 000000000..6559eb0a0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(notEqual(ivec3(c), ivec3(0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_frag_ref.frag
new file mode 100644
index 000000000..b63e5d722
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 ne(in ivec3 a, in ivec3 b)
+{
+ bvec3 result;
+ if(a[0] != b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] != b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] != b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(ne(ivec3(c), ivec3(0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_vert.vert
new file mode 100644
index 000000000..02c5818be
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(notEqual(ivec3(c), ivec3(0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_vert_ref.vert
new file mode 100644
index 000000000..a0cf5eb28
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 ne(in ivec3 a, in ivec3 b)
+{
+ bvec3 result;
+ if(a[0] != b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] != b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] != b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(ne(ivec3(c), ivec3(0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_frag.frag
new file mode 100644
index 000000000..ccf27b52b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(notEqual(c, vec2(0.0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_frag_ref.frag
new file mode 100644
index 000000000..d76c69cf2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_frag_ref.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+precision highp float;
+#else
+precision mediump float;
+#endif
+#endif
+varying vec4 color;
+
+bvec2 ne(in vec2 a, in vec2 b)
+{
+ bvec2 result;
+ if(a[0] != b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] != b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(ne(c, vec2(0.0)));
+ gl_FragColor = vec4(result, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_vert.vert
new file mode 100644
index 000000000..7544d3f6d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(notEqual(c, vec2(0.0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_vert_ref.vert
new file mode 100644
index 000000000..673f0b271
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_vert_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec2 ne(in vec2 a, in vec2 b)
+{
+ bvec2 result;
+ if(a[0] != b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] != b[1]) result[1] = true;
+ else result[1] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec2 c = floor(10.0 * gtf_Color.rg - 4.5); // round to the nearest integer
+ vec2 result = vec2(ne(c, vec2(0.0)));
+ color = vec4(result, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_frag.frag
new file mode 100644
index 000000000..55fdd1a6e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(notEqual(c, vec3(0.0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_frag_ref.frag
new file mode 100644
index 000000000..a55f8a127
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_frag_ref.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+bvec3 ne(in vec3 a, in vec3 b)
+{
+ bvec3 result;
+ if(a[0] != b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] != b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] != b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(ne(c, vec3(0.0)));
+ gl_FragColor = vec4(result, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_vert.vert
new file mode 100644
index 000000000..94f0bc4ca
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(notEqual(c, vec3(0.0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_vert_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_vert_ref.vert
new file mode 100644
index 000000000..336c11345
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_vert_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+bvec3 ne(in vec3 a, in vec3 b)
+{
+ bvec3 result;
+ if(a[0] != b[0]) result[0] = true;
+ else result[0] = false;
+ if(a[1] != b[1]) result[1] = true;
+ else result[1] = false;
+ if(a[2] != b[2]) result[2] = true;
+ else result[2] = false;
+ return result;
+}
+
+void main (void)
+{
+ vec3 c = floor(10.0 * gtf_Color.rgb - 4.5); // round to the nearest integer
+ vec3 result = vec3(ne(c, vec3(0.0)));
+ color = vec4(result, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/addsubtract_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/addsubtract_frag.frag
new file mode 100644
index 000000000..2967fc0d0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/addsubtract_frag.frag
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int m = 102;
+ int k = 12;
+ int resultadd = m + k;
+ int resultsubtract = m - k;
+ float gray;
+ if( ( resultadd == 114 ) && ( resultsubtract == 90 ) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/addsubtract_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/addsubtract_vert.vert
new file mode 100644
index 000000000..4eaa2f93d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/addsubtract_vert.vert
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int m = 102;
+ int k = 12;
+ int resultadd = m + k;
+ int resultsubtract = m - k;
+ float gray;
+ if( ( resultadd == 114 ) && ( resultsubtract == 90 ) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/assignments_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/assignments_frag.frag
new file mode 100644
index 000000000..43694b091
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/assignments_frag.frag
@@ -0,0 +1,78 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int m = 12;
+ int n = 102;
+ bool result = true;
+ int r = m;
+
+ if( r==12 )
+ result = result && true;
+ else
+ result = result && false;
+
+ r += m;
+
+ if( r == 24 )
+ result = result && true;
+ else
+ result = result && false;
+
+ r-= m;
+
+ if( r == 12 )
+ result = result && true;
+ else
+ result = result && false;
+
+ r*= m;
+
+ if ( r == 144 )
+ result = result && true;
+ else
+ result = result && false;
+
+ r/= m;
+
+ // Integer divide can be implemented via float reciprocal,
+ // so the result need not be exact
+ if( r >= 11 && r <= 13 )
+ result = result && true;
+ else
+ result = result && false;
+
+ float gray;
+ if( result )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/assignments_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/assignments_vert.vert
new file mode 100644
index 000000000..b35cb6c0f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/assignments_vert.vert
@@ -0,0 +1,78 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int m = 12;
+ int n = 102;
+ bool result = true;
+ int r = m;
+
+ if( r==12 )
+ result = result && true;
+ else
+ result = result && false;
+
+ r += m;
+
+ if( r == 24 )
+ result = result && true;
+ else
+ result = result && false;
+
+ r-= m;
+
+ if( r == 12 )
+ result = result && true;
+ else
+ result = result && false;
+
+ r*= m;
+
+ if ( r == 144 )
+ result = result && true;
+ else
+ result = result && false;
+
+ r/= m;
+
+ // Integer divide can be implemented via float reciprocal,
+ // so the result need not be exact
+ if( r >= 11 && r <= 13 )
+ result = result && true;
+ else
+ result = result && false;
+
+ float gray;
+ if( result )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/division_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/division_frag.frag
new file mode 100644
index 000000000..e65ab2e47
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/division_frag.frag
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int m = 102;
+ int k = 12;
+ int result = m/k;
+ float gray;
+ // The rounding mode for integer divide is implementation-dependent
+ if( ( result == 8 ) || ( result == 9 ) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/division_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/division_vert.vert
new file mode 100644
index 000000000..3c9639884
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/division_vert.vert
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int m = 102;
+ int k = 12;
+ int result = m/k;
+ float gray;
+ // The rounding mode for integer divide is implementation-dependent
+ if( ( result == 8 ) || ( result == 9 ) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/equality_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/equality_frag.frag
new file mode 100644
index 000000000..a8a5d471b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/equality_frag.frag
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int m = 102;
+ int k = 12;
+ bool equalto = (m == 102);
+ bool notequalto = (k != 102);
+
+ float gray;
+ if( equalto && notequalto )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/equality_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/equality_vert.vert
new file mode 100644
index 000000000..34ef88e62
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/equality_vert.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int m = 102;
+ int k = 12;
+ bool equalto = (m == 102);
+ bool notequalto = (k != 102);
+
+ float gray;
+ if( equalto && notequalto )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/input.run.txt
new file mode 100644
index 000000000..b6e176588
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/input.run.txt
@@ -0,0 +1,5 @@
+# this file is auto-generated. DO NOT EDIT.
+operators_001_to_008.html
+operators_009_to_016.html
+operators_017_to_024.html
+operators_025_to_026.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/logical_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/logical_frag.frag
new file mode 100644
index 000000000..12b73de9c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/logical_frag.frag
@@ -0,0 +1,111 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+bool result = true;
+ bool a = true;
+ bool b = true;
+
+ if( (a&&b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( (a||b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( !(a^^b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ a = true;
+ b = false;
+
+ if( !(a&&b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( (a||b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( (a^^b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ a = false;
+ b = true;
+
+ if( !(a&&b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( (a||b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( (a^^b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ a = false;
+ b = false;
+
+ if( !(a&&b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( !(a||b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( !(a^^b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ float gray;
+ if( result )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/logical_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/logical_vert.vert
new file mode 100644
index 000000000..8733bf779
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/logical_vert.vert
@@ -0,0 +1,111 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ bool result = true;
+ bool a = true;
+ bool b = true;
+
+ if( (a&&b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( (a||b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( !(a^^b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ a = true;
+ b = false;
+
+ if( !(a&&b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( (a||b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( (a^^b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ a = false;
+ b = true;
+
+ if( !(a&&b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( (a||b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( (a^^b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ a = false;
+ b = false;
+
+ if( !(a&&b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( !(a||b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ if( !(a^^b) )
+ result = result && true;
+ else
+ result = result && false;
+
+ float gray;
+ if( result )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/multiplicative_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/multiplicative_frag.frag
new file mode 100644
index 000000000..dd23c5b13
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/multiplicative_frag.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int m = 102;
+ int k = 12;
+ int result = m*k;
+ float gray;
+ if( ( result == 1224 ) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/multiplicative_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/multiplicative_vert.vert
new file mode 100644
index 000000000..138b12d9c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/multiplicative_vert.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int m = 102;
+ int k = 12;
+ int result = m*k;
+ float gray;
+ if( ( result == 1224 ) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_001_to_008.html
new file mode 100644
index 000000000..7c20383bc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_001_to_008.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: operators_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "postfixincrement_frag.frag"
+ },
+ "name": "postfixincrement_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "postfixincrement_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "postfixincrement_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "postfixdecrement_frag.frag"
+ },
+ "name": "postfixdecrement_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "postfixdecrement_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "postfixdecrement_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "prefixincrement_frag.frag"
+ },
+ "name": "prefixincrement_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "prefixincrement_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "prefixincrement_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "prefixdecrement_frag.frag"
+ },
+ "name": "prefixdecrement_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "prefixdecrement_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "prefixdecrement_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_009_to_016.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_009_to_016.html
new file mode 100644
index 000000000..80de22017
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_009_to_016.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: operators_009_to_016.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "unary_frag.frag"
+ },
+ "name": "unary_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "unary_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "unary_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "multiplicative_frag.frag"
+ },
+ "name": "multiplicative_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "multiplicative_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "multiplicative_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "division_frag.frag"
+ },
+ "name": "division_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "division_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "division_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "addsubtract_frag.frag"
+ },
+ "name": "addsubtract_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "addsubtract_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "addsubtract_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_017_to_024.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_017_to_024.html
new file mode 100644
index 000000000..4c55884d6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_017_to_024.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: operators_017_to_024.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "relational_frag.frag"
+ },
+ "name": "relational_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "relational_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "relational_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "equality_frag.frag"
+ },
+ "name": "equality_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "equality_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "equality_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "logical_frag.frag"
+ },
+ "name": "logical_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "logical_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "logical_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "selection_frag.frag"
+ },
+ "name": "selection_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "selection_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "selection_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_025_to_026.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_025_to_026.html
new file mode 100644
index 000000000..5536c5cf5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_025_to_026.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: operators_025_to_026.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "assignments_frag.frag"
+ },
+ "name": "assignments_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "assignments_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "assignments_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixdecrement_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixdecrement_frag.frag
new file mode 100644
index 000000000..70da81709
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixdecrement_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int m = 23;
+ int k = m--;
+ float gray;
+ if( ( k == 23 ) && ( m == 22 ) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixdecrement_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixdecrement_vert.vert
new file mode 100644
index 000000000..27782385e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixdecrement_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int m=23;
+ int k = m--;
+ float gray;
+ if( (k==23) && (m==22) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixincrement_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixincrement_frag.frag
new file mode 100644
index 000000000..0fecc5d2d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixincrement_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int m = 23;
+ int k = m++;
+ float gray;
+ if( ( k == 23 ) && ( m == 24 ) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixincrement_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixincrement_vert.vert
new file mode 100644
index 000000000..30fa784e9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixincrement_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int m=23;
+ int k = m++;
+ float gray;
+ if( (k==23) && (m==24) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixdecrement_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixdecrement_frag.frag
new file mode 100644
index 000000000..92b04b785
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixdecrement_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int m = 23;
+ int k = --m;
+ float gray;
+ if( ( k == 22 ) && ( m == 22 ) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixdecrement_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixdecrement_vert.vert
new file mode 100644
index 000000000..4509b9b41
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixdecrement_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int m=23;
+ int k = --m;
+ float gray;
+ if( (k==22) && (m==22) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixincrement_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixincrement_frag.frag
new file mode 100644
index 000000000..534b826a9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixincrement_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int m = 23;
+ int k = ++m;
+ float gray;
+ if( ( k == 24 ) && ( m == 24 ) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixincrement_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixincrement_vert.vert
new file mode 100644
index 000000000..4b51c6a32
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixincrement_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int m=23;
+ int k = ++m;
+ float gray;
+ if( (k==24) && (m==24) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/relational_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/relational_frag.frag
new file mode 100644
index 000000000..fe2716d0d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/relational_frag.frag
@@ -0,0 +1,44 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int m = 102;
+ int k = 12;
+ bool lessthan = (m<k);
+ bool greaterthan = (m>k);
+ bool lessthanorequalto = (m <= 102);
+ bool greaterthanorequalto = (k >=12);
+ float gray;
+ if( !lessthan && greaterthan && lessthanorequalto && greaterthanorequalto )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/relational_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/relational_vert.vert
new file mode 100644
index 000000000..322bb8416
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/relational_vert.vert
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int m = 102;
+ int k = 12;
+ bool lessthan = (m<k);
+ bool greaterthan = (m>k);
+ bool lessthanorequalto = (m <= 102);
+ bool greaterthanorequalto = (k >=12);
+
+ float gray;
+ if( !lessthan && greaterthan && lessthanorequalto && greaterthanorequalto )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/selection_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/selection_frag.frag
new file mode 100644
index 000000000..9611e2c10
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/selection_frag.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int j = 30;
+ int k = 37;
+ int y = 10;
+ int n = 12;
+ bool result1 = false;
+ bool result2 = false;
+ (j>k)?( result1 = true ):( result1 = false );
+ (y<n)?( result2 = true ):( result2 = false );
+ float gray;
+ if( !result1 && result2 )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/selection_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/selection_vert.vert
new file mode 100644
index 000000000..091d76456
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/selection_vert.vert
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int j = 30;
+ int k = 37;
+ int y = 10;
+ int n = 12;
+ bool result1 = false;
+ bool result2 = false;
+ (j>k)?( result1 = true ):( result1 = false );
+ (y<n)?( result2 = true ):( result2 = false );
+ float gray;
+ if( !result1 && result2 )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/unary_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/unary_frag.frag
new file mode 100644
index 000000000..6be2b3b44
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/unary_frag.frag
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ int m = +23;
+ int k = -m;
+ bool a = false;
+ bool b = !a;
+ float gray;
+ if( (m==23) && (k==-23) && (b) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/unary_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/unary_vert.vert
new file mode 100644
index 000000000..26179f69b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/unary_vert.vert
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ int m = +23;
+ int k = -m;
+ bool a = false;
+ bool b = !a;
+ float gray;
+ if( (m==23) && (k==-23) && (b) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/input.run.txt
new file mode 100644
index 000000000..c9bfeda77
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/input.run.txt
@@ -0,0 +1,4 @@
+# this file is auto-generated. DO NOT EDIT.
+pow_001_to_008.html
+pow_009_to_016.html
+pow_017_to_024.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_001_to_008.html
new file mode 100644
index 000000000..7a3b78f79
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: pow_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_float_frag_xvary_yconst2_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_float_frag_xvary_yconst2.frag"
+ },
+ "name": "pow_float_frag_xvary_yconst2.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec2_frag_xvary_yconst2_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec2_frag_xvary_yconst2.frag"
+ },
+ "name": "pow_vec2_frag_xvary_yconst2.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec3_frag_xvary_yconst2_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec3_frag_xvary_yconst2.frag"
+ },
+ "name": "pow_vec3_frag_xvary_yconst2.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_float_frag_xconst2_yvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_float_frag_xconst2_yvary.frag"
+ },
+ "name": "pow_float_frag_xconst2_yvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec2_frag_xconst2_yvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec2_frag_xconst2_yvary.frag"
+ },
+ "name": "pow_vec2_frag_xconst2_yvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec3_frag_xconst2_yvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec3_frag_xconst2_yvary.frag"
+ },
+ "name": "pow_vec3_frag_xconst2_yvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_float_frag_xvary_yconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_float_frag_xvary_yconsthalf.frag"
+ },
+ "name": "pow_float_frag_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec2_frag_xvary_yconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec2_frag_xvary_yconsthalf.frag"
+ },
+ "name": "pow_vec2_frag_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_009_to_016.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_009_to_016.html
new file mode 100644
index 000000000..d91fd648e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_009_to_016.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: pow_009_to_016.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec3_frag_xvary_yconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec3_frag_xvary_yconsthalf.frag"
+ },
+ "name": "pow_vec3_frag_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_float_frag_xconsthalf_yvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_float_frag_xconsthalf_yvary.frag"
+ },
+ "name": "pow_float_frag_xconsthalf_yvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec2_frag_xconsthalf_yvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec2_frag_xconsthalf_yvary.frag"
+ },
+ "name": "pow_vec2_frag_xconsthalf_yvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec3_frag_xconsthalf_yvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "pow_vec3_frag_xconsthalf_yvary.frag"
+ },
+ "name": "pow_vec3_frag_xconsthalf_yvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "pow_float_vert_xvary_yconst2_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "pow_float_vert_xvary_yconst2.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "pow_float_vert_xvary_yconst2.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "pow_vec2_vert_xvary_yconst2_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "pow_vec2_vert_xvary_yconst2.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "pow_vec2_vert_xvary_yconst2.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "pow_vec3_vert_xvary_yconst2_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "pow_vec3_vert_xvary_yconst2.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "pow_vec3_vert_xvary_yconst2.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "pow_float_vert_xconst2_yvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "pow_float_vert_xconst2_yvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "pow_float_vert_xconst2_yvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_017_to_024.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_017_to_024.html
new file mode 100644
index 000000000..ff261e005
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_017_to_024.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: pow_017_to_024.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "pow_vec2_vert_xconst2_yvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "pow_vec2_vert_xconst2_yvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "pow_vec2_vert_xconst2_yvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "pow_vec3_vert_xconst2_yvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "pow_vec3_vert_xconst2_yvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "pow_vec3_vert_xconst2_yvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "pow_float_vert_xvary_yconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "pow_float_vert_xvary_yconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "pow_float_vert_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "pow_vec2_vert_xvary_yconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "pow_vec2_vert_xvary_yconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "pow_vec2_vert_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "pow_vec3_vert_xvary_yconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "pow_vec3_vert_xvary_yconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "pow_vec3_vert_xvary_yconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "pow_float_vert_xconsthalf_yvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "pow_float_vert_xconsthalf_yvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "pow_float_vert_xconsthalf_yvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "pow_vec2_vert_xconsthalf_yvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "pow_vec2_vert_xconsthalf_yvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "pow_vec2_vert_xconsthalf_yvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "pow_vec3_vert_xconsthalf_yvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "pow_vec3_vert_xconsthalf_yvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "pow_vec3_vert_xconsthalf_yvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconst2_yvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconst2_yvary.frag
new file mode 100644
index 000000000..dc2534ce4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconst2_yvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(pow(2.0, 2.0 * c) / 4.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconst2_yvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconst2_yvary_ref.frag
new file mode 100644
index 000000000..8e2cd4eef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconst2_yvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(exp2(2.0 * c) / 4.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconsthalf_yvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconsthalf_yvary.frag
new file mode 100644
index 000000000..60d20306a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconsthalf_yvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(pow(0.5, 2.0 * c) / 4.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconsthalf_yvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconsthalf_yvary_ref.frag
new file mode 100644
index 000000000..96be455a3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconsthalf_yvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = -2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(exp2(2.0 * c) / 4.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconst2.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconst2.frag
new file mode 100644
index 000000000..8682a0e9f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconst2.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 4.0 * (color.r);
+ gl_FragColor = vec4(pow(c, 2.0) / 4.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconst2_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconst2_ref.frag
new file mode 100644
index 000000000..0b82bded5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconst2_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 4.0 * (color.r);
+ gl_FragColor = vec4(c * c / 4.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconsthalf.frag
new file mode 100644
index 000000000..e071d29a5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconsthalf.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 16.0 * color.r;
+ gl_FragColor = vec4(pow(c, 0.5) / 4.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconsthalf_ref.frag
new file mode 100644
index 000000000..5ff3ddbe9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconsthalf_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 16.0 * color.r;
+ gl_FragColor = vec4(sqrt(c) / 4.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconst2_yvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconst2_yvary.vert
new file mode 100644
index 000000000..83f22bb80
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconst2_yvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (gtf_Color.r - 0.5);
+ color = vec4(pow(2.0, 2.0 * c) / 4.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconst2_yvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconst2_yvary_ref.vert
new file mode 100644
index 000000000..130327c6e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconst2_yvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (gtf_Color.r - 0.5);
+ color = vec4(exp2(2.0 * c) / 4.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconsthalf_yvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconsthalf_yvary.vert
new file mode 100644
index 000000000..0533c7560
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconsthalf_yvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (gtf_Color.r - 0.5);
+ color = vec4(pow(0.5, 2.0 * c) / 4.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconsthalf_yvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconsthalf_yvary_ref.vert
new file mode 100644
index 000000000..fe9bdc84e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconsthalf_yvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = -2.0 * (gtf_Color.r - 0.5);
+ color = vec4(exp2(2.0 * c) / 4.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconst2.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconst2.vert
new file mode 100644
index 000000000..f0be45abe
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconst2.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 4.0 * (gtf_Color.r);
+ color = vec4(pow(c, 2.0) / 4.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconst2_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconst2_ref.vert
new file mode 100644
index 000000000..f76054b2b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconst2_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 4.0 * (gtf_Color.r);
+ color = vec4(c * c / 4.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconsthalf.vert
new file mode 100644
index 000000000..7609fa589
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconsthalf.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 16.0 * gtf_Color.r;
+ color = vec4(pow(c, 0.5) / 4.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconsthalf_ref.vert
new file mode 100644
index 000000000..f58d044b2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconsthalf_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 16.0 * gtf_Color.r;
+ color = vec4(sqrt(c) / 4.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconst2_yvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconst2_yvary.frag
new file mode 100644
index 000000000..e47822c0a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconst2_yvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(pow(vec2(2.0), 2.0 * c) / 4.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconst2_yvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconst2_yvary_ref.frag
new file mode 100644
index 000000000..30b360435
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconst2_yvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(exp2(2.0 * c) / 4.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconsthalf_yvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconsthalf_yvary.frag
new file mode 100644
index 000000000..67daa4720
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconsthalf_yvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(pow(vec2(0.5), 2.0 * c) / 4.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconsthalf_yvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconsthalf_yvary_ref.frag
new file mode 100644
index 000000000..e7cc4c966
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconsthalf_yvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = -2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(exp2(2.0 * c) / 4.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconst2.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconst2.frag
new file mode 100644
index 000000000..6ae78c70d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconst2.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 4.0 * (color.rg);
+ gl_FragColor = vec4(pow(c, vec2(2.0)) / 4.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconst2_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconst2_ref.frag
new file mode 100644
index 000000000..0540ebe0f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconst2_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 4.0 * (color.rg);
+ gl_FragColor = vec4(c * c / 4.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconsthalf.frag
new file mode 100644
index 000000000..196535a8c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconsthalf.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 16.0 * color.rg;
+ gl_FragColor = vec4(pow(c, vec2(0.5)) / 4.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconsthalf_ref.frag
new file mode 100644
index 000000000..cb591dc5f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconsthalf_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 16.0 * color.rg;
+ gl_FragColor = vec4(sqrt(c) / 4.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconst2_yvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconst2_yvary.vert
new file mode 100644
index 000000000..ec59a85bc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconst2_yvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(pow(vec2(2.0), 2.0 * c) / 4.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconst2_yvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconst2_yvary_ref.vert
new file mode 100644
index 000000000..35f12854d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconst2_yvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(exp2(2.0 * c) / 4.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconsthalf_yvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconsthalf_yvary.vert
new file mode 100644
index 000000000..ab3c56d49
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconsthalf_yvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(pow(vec2(0.5), 2.0 * c) / 4.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconsthalf_yvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconsthalf_yvary_ref.vert
new file mode 100644
index 000000000..d5a1a6202
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconsthalf_yvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = -2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(exp2(2.0 * c) / 4.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconst2.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconst2.vert
new file mode 100644
index 000000000..0411d3f0e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconst2.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 4.0 * (gtf_Color.rg);
+ color = vec4(pow(c, vec2(2.0)) / 4.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconst2_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconst2_ref.vert
new file mode 100644
index 000000000..c83de7302
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconst2_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 4.0 * (gtf_Color.rg);
+ color = vec4(c * c / 4.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconsthalf.vert
new file mode 100644
index 000000000..80e7e176b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconsthalf.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 16.0 * gtf_Color.rg;
+ color = vec4(pow(c, vec2(0.5)) / 4.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconsthalf_ref.vert
new file mode 100644
index 000000000..abf19d3b0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconsthalf_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 16.0 * gtf_Color.rg;
+ color = vec4(sqrt(c) / 4.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconst2_yvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconst2_yvary.frag
new file mode 100644
index 000000000..7aa24fb92
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconst2_yvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(pow(vec3(2.0), 2.0 * c) / 4.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconst2_yvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconst2_yvary_ref.frag
new file mode 100644
index 000000000..339406c5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconst2_yvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(exp2(2.0 * c) / 4.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconsthalf_yvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconsthalf_yvary.frag
new file mode 100644
index 000000000..7b35c8664
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconsthalf_yvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(pow(vec3(0.5), 2.0 * c) / 4.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconsthalf_yvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconsthalf_yvary_ref.frag
new file mode 100644
index 000000000..9000d040f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconsthalf_yvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = -2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(exp2(2.0 * c) / 4.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconst2.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconst2.frag
new file mode 100644
index 000000000..319fb17a8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconst2.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = color.rgb;
+ gl_FragColor = vec4(pow(c, vec3(2.0)) / 4.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconst2_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconst2_ref.frag
new file mode 100644
index 000000000..439476d70
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconst2_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = color.rgb;
+ gl_FragColor = vec4(c * c / 4.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconsthalf.frag
new file mode 100644
index 000000000..82b120f15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconsthalf.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 16.0 * color.rgb;
+ gl_FragColor = vec4(pow(c, vec3(0.5)) / 4.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconsthalf_ref.frag
new file mode 100644
index 000000000..407bc1db2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconsthalf_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 16.0 * color.rgb;
+ gl_FragColor = vec4(sqrt(c) / 4.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconst2_yvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconst2_yvary.vert
new file mode 100644
index 000000000..875ff7f93
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconst2_yvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(pow(vec3(2.0), 2.0 * c) / 4.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconst2_yvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconst2_yvary_ref.vert
new file mode 100644
index 000000000..155519ef1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconst2_yvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(exp2(2.0 * c) / 4.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconsthalf_yvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconsthalf_yvary.vert
new file mode 100644
index 000000000..ebb4c42a5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconsthalf_yvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(pow(vec3(0.5), 2.0 * c) / 4.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconsthalf_yvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconsthalf_yvary_ref.vert
new file mode 100644
index 000000000..d797011e1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconsthalf_yvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = -2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(exp2(2.0 * c) / 4.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconst2.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconst2.vert
new file mode 100644
index 000000000..38ef59d3e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconst2.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 4.0 * (gtf_Color.rgb);
+ color = vec4(pow(c, vec3(2.0)) / 4.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconst2_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconst2_ref.vert
new file mode 100644
index 000000000..0cd2ef6ff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconst2_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 4.0 * (gtf_Color.rgb);
+ color = vec4(c * c / 4.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconsthalf.vert
new file mode 100644
index 000000000..3ab236199
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconsthalf.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 16.0 * gtf_Color.rgb;
+ color = vec4(pow(c, vec3(0.5)) / 4.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconsthalf_ref.vert
new file mode 100644
index 000000000..da9005673
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconsthalf_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 16.0 * gtf_Color.rgb;
+ color = vec4(sqrt(c) / 4.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/input.run.txt
new file mode 100644
index 000000000..891a82745
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+radians_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_001_to_006.html
new file mode 100644
index 000000000..c369bc843
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: radians_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "radians_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "radians_float_frag_xvary.frag"
+ },
+ "name": "radians_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "radians_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "radians_vec2_frag_xvary.frag"
+ },
+ "name": "radians_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "radians_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "radians_vec3_frag_xvary.frag"
+ },
+ "name": "radians_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "radians_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "radians_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "radians_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "radians_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "radians_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "radians_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "radians_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "radians_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "radians_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_frag_xvary.frag
new file mode 100644
index 000000000..141c45d53
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 360.0 * 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(radians(c) / (4.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..5e9ba0b45
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_frag_xvary_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 360.0 * 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4((c * M_PI / 180.0) / (4.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_vert_xvary.vert
new file mode 100644
index 000000000..8a858b641
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 360.0 * 2.0 * (gtf_Color.r - 0.5);
+ color = vec4(radians(c) / (4.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..2c21ac034
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_vert_xvary_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 360.0 * 2.0 * (gtf_Color.r - 0.5);
+ color = vec4((c * M_PI / 180.0) / (4.0 * M_PI) + 0.5, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_frag_xvary.frag
new file mode 100644
index 000000000..594e26ac0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 360.0 * 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(radians(c) / (4.0 * M_PI) + 0.5, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..6c95619e3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_frag_xvary_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 360.0 * 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4((c * M_PI / 180.0) / (4.0 * M_PI) + 0.5, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_vert_xvary.vert
new file mode 100644
index 000000000..b232f5646
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 360.0 * 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(radians(c) / (4.0 * M_PI) + 0.5, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..9530c8b3f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_vert_xvary_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 360.0 * 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4((c * M_PI / 180.0) / (4.0 * M_PI) + 0.5, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_frag_xvary.frag
new file mode 100644
index 000000000..5cebc76b7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_frag_xvary.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 360.0 * 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(radians(c) / (4.0 * M_PI) + 0.5, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..3026b494c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_frag_xvary_ref.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 360.0 * 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4((c * M_PI / 180.0) / (4.0 * M_PI) + 0.5, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_vert_xvary.vert
new file mode 100644
index 000000000..7f91ba404
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_vert_xvary.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 360.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(radians(c) / (4.0 * M_PI) + 0.5, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..74cad8da0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_vert_xvary_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 360.0 * 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4((c * M_PI / 180.0) / (4.0 * M_PI) + 0.5, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/input.run.txt
new file mode 100644
index 000000000..b32c960e6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+reflect_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_001_to_006.html
new file mode 100644
index 000000000..fa9b9ff21
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: reflect_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "reflect_float_frag_ivarynconst_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "reflect_float_frag_ivarynconst.frag"
+ },
+ "name": "reflect_float_frag_ivarynconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "reflect_float_vert_ivarynconst_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "reflect_float_vert_ivarynconst.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "reflect_float_vert_ivarynconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "reflect_vec2_frag_ivarynconst_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "reflect_vec2_frag_ivarynconst.frag"
+ },
+ "name": "reflect_vec2_frag_ivarynconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "reflect_vec2_vert_ivarynconst_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "reflect_vec2_vert_ivarynconst.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "reflect_vec2_vert_ivarynconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "reflect_vec3_frag_ivarynconst_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "reflect_vec3_frag_ivarynconst.frag"
+ },
+ "name": "reflect_vec3_frag_ivarynconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "reflect_vec3_vert_ivarynconst_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "reflect_vec3_vert_ivarynconst.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "reflect_vec3_vert_ivarynconst.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_frag_ivarynconst.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_frag_ivarynconst.frag
new file mode 100644
index 000000000..23780bbec
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_frag_ivarynconst.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ float v1 = (color.g + 1.0) / 2.0;
+ float v2 = (color.b + 1.0) / 2.0;
+
+ gl_FragColor = vec4((reflect(v1, v2) + 1.0) / 2.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_frag_ivarynconst_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_frag_ivarynconst_ref.frag
new file mode 100644
index 000000000..7c9a07eb5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_frag_ivarynconst_ref.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ float v1 = (color.g + 1.0) / 2.0;
+ float v2 = (color.b + 1.0) / 2.0;
+
+ gl_FragColor = vec4((v1 - 2.0 * dot(v2, v1) * v2 + 1.0) / 2.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_vert_ivarynconst.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_vert_ivarynconst.vert
new file mode 100644
index 000000000..1881b976c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_vert_ivarynconst.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ float v1 = (gtf_Color.g + 1.0) / 2.0;
+ float v2 = (gtf_Color.b + 1.0) / 2.0;
+
+ color = vec4((reflect(v1, v2) + 1.0) / 2.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_vert_ivarynconst_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_vert_ivarynconst_ref.vert
new file mode 100644
index 000000000..3b6162907
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_vert_ivarynconst_ref.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ float v1 = (gtf_Color.g + 1.0) / 2.0;
+ float v2 = (gtf_Color.b + 1.0) / 2.0;
+
+ color = vec4((v1 - 2.0 * dot(v2, v1) * v2 + 1.0) / 2.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_frag_ivarynconst.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_frag_ivarynconst.frag
new file mode 100644
index 000000000..d614676d8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_frag_ivarynconst.frag
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec2 v1;
+ vec2 v2 = normalize(vec2(1.0, 1.0));
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+
+ gl_FragColor = vec4((reflect(v1, v2) + 1.0) / 2.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_frag_ivarynconst_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_frag_ivarynconst_ref.frag
new file mode 100644
index 000000000..07a4a7c74
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_frag_ivarynconst_ref.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec2 v1;
+ vec2 v2 = normalize(vec2(1.0, 1.0));
+
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+
+ gl_FragColor = vec4((v1 - 2.0 * dot(v2, v1) * v2 + 1.0) / 2.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_vert_ivarynconst.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_vert_ivarynconst.vert
new file mode 100644
index 000000000..5f1e20ed1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_vert_ivarynconst.vert
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec2 v1;
+ vec2 v2 = normalize(vec2(1.0, 1.0));
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+
+ color = vec4((reflect(v1, v2) + 1.0) / 2.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_vert_ivarynconst_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_vert_ivarynconst_ref.vert
new file mode 100644
index 000000000..dee1b983c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_vert_ivarynconst_ref.vert
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec2 v1;
+ vec2 v2 = normalize(vec2(1.0, 1.0));
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+
+ color = vec4((v1 - 2.0 * dot(v2, v1) * v2 + 1.0) / 2.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_frag_ivarynconst.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_frag_ivarynconst.frag
new file mode 100644
index 000000000..a7287f230
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_frag_ivarynconst.frag
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = normalize(vec3(1.0, 1.0, 1.0));
+
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ gl_FragColor = vec4((reflect(v1, v2) + 1.0) / 2.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_frag_ivarynconst_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_frag_ivarynconst_ref.frag
new file mode 100644
index 000000000..cd1418958
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_frag_ivarynconst_ref.frag
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = normalize(vec3(1.0, 1.0, 1.0));
+
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ gl_FragColor = vec4((v1 - 2.0 * dot(v2, v1) * v2 + 1.0) / 2.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_vert_ivarynconst.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_vert_ivarynconst.vert
new file mode 100644
index 000000000..f375b86a4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_vert_ivarynconst.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = normalize(vec3(1.0, 1.0, 1.0));
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ color = vec4((reflect(v1, v2) + 1.0) / 2.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_vert_ivarynconst_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_vert_ivarynconst_ref.vert
new file mode 100644
index 000000000..58a9b84f9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_vert_ivarynconst_ref.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = normalize(vec3(1.0, 1.0, 1.0));
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ color = vec4((v1 - 2.0 * dot(v2, v1) * v2 + vec3(1.0)) / 2.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/input.run.txt
new file mode 100644
index 000000000..c7deedd54
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+refract_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_001_to_006.html
new file mode 100644
index 000000000..54be58ed8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: refract_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "refract_float_frag_ivarynconst_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "refract_float_frag_ivarynconst.frag"
+ },
+ "name": "refract_float_frag_ivarynconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "refract_float_vert_ivarynconst_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "refract_float_vert_ivarynconst.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "refract_float_vert_ivarynconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "refract_vec2_frag_ivarynconst_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "refract_vec2_frag_ivarynconst.frag"
+ },
+ "name": "refract_vec2_frag_ivarynconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "refract_vec2_vert_ivarynconst_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "refract_vec2_vert_ivarynconst.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "refract_vec2_vert_ivarynconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "refract_vec3_frag_ivarynconst_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "refract_vec3_frag_ivarynconst.frag"
+ },
+ "name": "refract_vec3_frag_ivarynconst.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "refract_vec3_vert_ivarynconst_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "refract_vec3_vert_ivarynconst.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "refract_vec3_vert_ivarynconst.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_frag_ivarynconst.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_frag_ivarynconst.frag
new file mode 100644
index 000000000..6cd7faa01
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_frag_ivarynconst.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ float v1 = (color.g + 1.0) / 2.0;
+ float v2 = (color.b + 1.0) / 2.0;
+
+ gl_FragColor = vec4((refract(v1, v2, 0.5) + 1.0) / 2.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_frag_ivarynconst_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_frag_ivarynconst_ref.frag
new file mode 100644
index 000000000..a0159b0f5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_frag_ivarynconst_ref.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ // Both are unit vectors
+ float v1 = (color.g + 1.0) / 2.0;
+ float v2 = (color.b + 1.0) / 2.0;
+
+ float result;
+ float eta = 0.5;
+ float k = 1.0 - eta * eta * (1.0 - dot(v1, v2) * dot(v1, v2));
+ if(k < 0.0)
+ result = 0.0;
+ else
+ result = eta * v1 - (eta * dot(v1, v2) + sqrt(k)) * v2;
+
+ gl_FragColor = vec4((result + 1.0) / 2.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_vert_ivarynconst.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_vert_ivarynconst.vert
new file mode 100644
index 000000000..83dcb5930
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_vert_ivarynconst.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ // Both are unit vectors
+ float v1 = (gtf_Color.g + 1.0) / 2.0;
+ float v2 = (gtf_Color.b + 1.0) / 2.0;
+
+ color = vec4((refract(v1, v2, 0.5) + 1.0) / 2.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_vert_ivarynconst_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_vert_ivarynconst_ref.vert
new file mode 100644
index 000000000..31826c6c2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_vert_ivarynconst_ref.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ float v1 = (gtf_Color.g + 1.0) / 2.0;
+ float v2 = (gtf_Color.b + 1.0) / 2.0;
+
+ float result;
+ float eta = 0.5;
+ float k = 1.0 - eta * eta * (1.0 - dot(v1, v2) * dot(v1, v2));
+ if(k < 0.0)
+ result = 0.0;
+ else
+ result = eta * v1 - (eta * dot(v1, v2) + sqrt(k)) * v2;
+
+ color = vec4((result + 1.0) / 2.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_frag_ivarynconst.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_frag_ivarynconst.frag
new file mode 100644
index 000000000..189a168f8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_frag_ivarynconst.frag
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec2 v1;
+ vec2 v2 = normalize(vec2(1.0, 1.0));
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+
+ gl_FragColor = vec4((refract(v1, v2, 0.5) + 1.0) / 2.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_frag_ivarynconst_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_frag_ivarynconst_ref.frag
new file mode 100644
index 000000000..bad139c37
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_frag_ivarynconst_ref.frag
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec2 v1;
+ vec2 v2 = normalize(vec2(1.0, 1.0));
+
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+
+ vec2 result;
+ float eta = 0.5;
+ float k = 1.0 - eta * eta * (1.0 - dot(v1, v2) * dot(v1, v2));
+ if(k < 0.0)
+ result = vec2(0.0);
+ else
+ result = eta * v1 - (eta * dot(v1, v2) + sqrt(k)) * v2;
+
+ gl_FragColor = vec4((result + 1.0) / 2.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_vert_ivarynconst.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_vert_ivarynconst.vert
new file mode 100644
index 000000000..62b77e91c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_vert_ivarynconst.vert
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec2 v1;
+ vec2 v2 = normalize(vec2(1.0, 1.0));
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+
+ color = vec4((refract(v1, v2, 0.5) + 1.0) / 2.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_vert_ivarynconst_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_vert_ivarynconst_ref.vert
new file mode 100644
index 000000000..d01fb22ba
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_vert_ivarynconst_ref.vert
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec2 v1;
+ vec2 v2 = normalize(vec2(1.0, 1.0));
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+
+ vec2 result;
+ float eta = 0.5;
+ float k = 1.0 - eta * eta * (1.0 - dot(v1, v2) * dot(v1, v2));
+ if(k < 0.0)
+ result = vec2(0.0);
+ else
+ result = eta * v1 - (eta * dot(v1, v2) + sqrt(k)) * v2;
+
+ color = vec4((result + 1.0) / 2.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_frag_ivarynconst.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_frag_ivarynconst.frag
new file mode 100644
index 000000000..421cf9b58
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_frag_ivarynconst.frag
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = normalize(vec3(1.0, 1.0, 1.0));
+
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ gl_FragColor = vec4((refract(v1, v2, 0.5) + 1.0) / 2.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_frag_ivarynconst_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_frag_ivarynconst_ref.frag
new file mode 100644
index 000000000..16be25c1d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_frag_ivarynconst_ref.frag
@@ -0,0 +1,55 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = normalize(vec3(1.0, 1.0, 1.0));
+
+
+ float theta = color.g * 2.0 * M_PI;
+ float phi = color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ vec3 result;
+ float eta = 0.5;
+ float k = 1.0 - eta * eta * (1.0 - dot(v1, v2) * dot(v1, v2));
+ if(k < 0.0)
+ result = vec3(0.0);
+ else
+ result = eta * v1 - (eta * dot(v1, v2) + sqrt(k)) * v2;
+
+ gl_FragColor = vec4((result + 1.0) / 2.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_vert_ivarynconst.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_vert_ivarynconst.vert
new file mode 100644
index 000000000..6423ca40e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_vert_ivarynconst.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = normalize(vec3(1.0, 1.0, 1.0));
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ color = vec4((refract(v1, v2, 0.5) + 1.0) / 2.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_vert_ivarynconst_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_vert_ivarynconst_ref.vert
new file mode 100644
index 000000000..0fa9b7cbc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_vert_ivarynconst_ref.vert
@@ -0,0 +1,55 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+
+ // Both are unit vectors
+ vec3 v1;
+ vec3 v2 = normalize(vec3(1.0, 1.0, 1.0));
+
+ float theta = gtf_Color.g * 2.0 * M_PI;
+ float phi = gtf_Color.b * 2.0 * M_PI;
+ v1.x = cos(theta) * sin(phi);
+ v1.y = sin(theta) * sin(phi);
+ v1.z = cos(phi);
+
+ vec3 result;
+ float eta = 0.5;
+ float k = 1.0 - eta * eta * (1.0 - dot(v1, v2) * dot(v1, v2));
+ if(k < 0.0)
+ result = vec3(0.0);
+ else
+ result = eta * v1 - (eta * dot(v1, v2) + sqrt(k)) * v2;
+
+ color = vec4((result + 1.0) / 2.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/input.run.txt
new file mode 100644
index 000000000..b22bf9d68
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+sign_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_001_to_006.html
new file mode 100644
index 000000000..345eeff4f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: sign_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sign_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sign_float_frag_xvary.frag"
+ },
+ "name": "sign_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sign_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sign_vec2_frag_xvary.frag"
+ },
+ "name": "sign_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sign_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sign_vec3_frag_xvary.frag"
+ },
+ "name": "sign_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "sign_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "sign_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "sign_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "sign_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "sign_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "sign_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "sign_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "sign_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "sign_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_frag_xvary.frag
new file mode 100644
index 000000000..0a3fcd169
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (color.r - 0.5);
+ gl_FragColor = vec4(c * sign(c), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..082dea1d1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_frag_xvary_ref.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (color.r - 0.5);
+ if(c > 0.0) c = 1.0 * c;
+ if(c < 0.0) c = -1.0 * c;
+
+ gl_FragColor = vec4(c, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_vert_xvary.vert
new file mode 100644
index 000000000..e2a048f34
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (gtf_Color.r - 0.5);
+ color = vec4(c * sign(c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..7646fb736
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_vert_xvary_ref.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 2.0 * (gtf_Color.r - 0.5);
+ if(c > 0.0) c = 1.0 * c;
+ if(c < 0.0) c = -1.0 * c;
+
+ color = vec4(c, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_frag_xvary.frag
new file mode 100644
index 000000000..3dbdde207
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (color.rg - 0.5);
+ gl_FragColor = vec4(c * sign(c), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..08a6c3d03
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_frag_xvary_ref.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (color.rg - 0.5);
+ if(c[0] > 0.0) c[0] = 1.0 * c[0];
+ if(c[0] < 0.0) c[0] = -1.0 * c[0];
+ if(c[1] > 0.0) c[1] = 1.0 * c[1];
+ if(c[1] < 0.0) c[1] = -1.0 * c[1];
+
+ gl_FragColor = vec4(c, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_vert_xvary.vert
new file mode 100644
index 000000000..fde1a269c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ color = vec4(c * sign(c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..000159fc5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_vert_xvary_ref.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 2.0 * (gtf_Color.rg - 0.5);
+ if(c[0] > 0.0) c[0] = 1.0 * c[0];
+ if(c[0] < 0.0) c[0] = -1.0 * c[0];
+ if(c[1] > 0.0) c[1] = 1.0 * c[1];
+ if(c[1] < 0.0) c[1] = -1.0 * c[1];
+
+ color = vec4(c, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_frag_xvary.frag
new file mode 100644
index 000000000..21b915804
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (color.rgb - 0.5);
+ gl_FragColor = vec4(c * (sign(c)), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..ef1123e91
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_frag_xvary_ref.frag
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (color.rgb - 0.5);
+
+ if(c[0] > 0.0) c[0] = 1.0 * c[0];
+ if(c[0] < 0.0) c[0] = -1.0 * c[0];
+ if(c[1] > 0.0) c[1] = 1.0 * c[1];
+ if(c[1] < 0.0) c[1] = -1.0 * c[1];
+ if(c[2] > 0.0) c[2] = 1.0 * c[2];
+ if(c[2] < 0.0) c[2] = -1.0 * c[2];
+
+ gl_FragColor = vec4(c, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_vert_xvary.vert
new file mode 100644
index 000000000..991fbcad8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+ color = vec4(c * sign(c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..143f2ae0a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_vert_xvary_ref.vert
@@ -0,0 +1,44 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 2.0 * (gtf_Color.rgb - 0.5);
+
+ if(c[0] > 0.0) c[0] = 1.0 * c[0];
+ if(c[0] < 0.0) c[0] = -1.0 * c[0];
+ if(c[1] > 0.0) c[1] = 1.0 * c[1];
+ if(c[1] < 0.0) c[1] = -1.0 * c[1];
+ if(c[2] > 0.0) c[2] = 1.0 * c[2];
+ if(c[2] < 0.0) c[2] = -1.0 * c[2];
+
+ color = vec4(c, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/input.run.txt
new file mode 100644
index 000000000..2995c5658
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+sin_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_001_to_006.html
new file mode 100644
index 000000000..036caff27
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: sin_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sin_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sin_float_frag_xvary.frag"
+ },
+ "name": "sin_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sin_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sin_vec2_frag_xvary.frag"
+ },
+ "name": "sin_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sin_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sin_vec3_frag_xvary.frag"
+ },
+ "name": "sin_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "sin_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "sin_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "sin_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "sin_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "sin_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "sin_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "sin_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "sin_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "sin_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_frag_xvary.frag
new file mode 100644
index 000000000..ce1bd224f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ gl_FragColor = vec4(0.5 * sin(2.0 * M_PI * color.r) + 0.5, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..331b426ef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_frag_xvary_ref.frag
@@ -0,0 +1,101 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float lerp(float a, float b, float s)
+{
+ return a + (b - a) * s;
+}
+
+void main (void)
+{
+ float sinValues[17];
+ sinValues[0] = 0.0;
+ sinValues[1] = 0.382683;
+ sinValues[2] = 0.707107;
+ sinValues[3] = 0.92388;
+ sinValues[4] = 1.0;
+ sinValues[5] = 0.92388;
+ sinValues[6] = 0.707107;
+ sinValues[7] = 0.382683;
+ sinValues[8] = 0.0;
+ sinValues[9] = -0.382683;
+ sinValues[10] = -0.707107;
+ sinValues[11] = -0.92388;
+ sinValues[12] = -1.0;
+ sinValues[13] = -0.923879;
+ sinValues[14] = -0.707107;
+ sinValues[15] = -0.382683;
+ sinValues[16] = 0.0;
+
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * M_PI * color.r;
+
+ float arrVal = c * 2.546478971;
+ int arr0 = int(floor(arrVal));
+ float weight = arrVal - floor(arrVal);
+ float sin_c = 0.0;
+
+ if (arr0 == 0)
+ sin_c = lerp(sinValues[0], sinValues[1], weight);
+ else if (arr0 == 1)
+ sin_c = lerp(sinValues[1], sinValues[2], weight);
+ else if (arr0 == 2)
+ sin_c = lerp(sinValues[2], sinValues[3], weight);
+ else if (arr0 == 3)
+ sin_c = lerp(sinValues[3], sinValues[4], weight);
+ else if (arr0 == 4)
+ sin_c = lerp(sinValues[4], sinValues[5], weight);
+ else if (arr0 == 5)
+ sin_c = lerp(sinValues[5], sinValues[6], weight);
+ else if (arr0 == 6)
+ sin_c = lerp(sinValues[6], sinValues[7], weight);
+ else if (arr0 == 7)
+ sin_c = lerp(sinValues[7], sinValues[8], weight);
+ else if (arr0 == 8)
+ sin_c = lerp(sinValues[8], sinValues[9], weight);
+ else if (arr0 == 9)
+ sin_c = lerp(sinValues[9], sinValues[10], weight);
+ else if (arr0 == 10)
+ sin_c = lerp(sinValues[10], sinValues[11], weight);
+ else if (arr0 == 11)
+ sin_c = lerp(sinValues[11], sinValues[12], weight);
+ else if (arr0 == 12)
+ sin_c = lerp(sinValues[12], sinValues[13], weight);
+ else if (arr0 == 13)
+ sin_c = lerp(sinValues[13], sinValues[14], weight);
+ else if (arr0 == 14)
+ sin_c = lerp(sinValues[14], sinValues[15], weight);
+ else if (arr0 == 15)
+ sin_c = lerp(sinValues[15], sinValues[16], weight);
+ else if (arr0 == 16)
+ sin_c = sinValues[16];
+
+ gl_FragColor = vec4(0.5 * sin_c + 0.5, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_vert_xvary.vert
new file mode 100644
index 000000000..e1fd79d72
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ color = vec4(0.5 * sin(2.0 * M_PI * gtf_Color.r) + 0.5, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..983193b6e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_vert_xvary_ref.vert
@@ -0,0 +1,55 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 2.0 * M_PI * gtf_Color.r;
+ float sign = 1.0;
+
+ float sin_c = 0.0;
+ float fact;
+ float fact_of;
+
+ // Taylors series expansion for sin
+ for(int i = 0; i < 12; i++)
+ {
+ fact = 1.0;
+ for(int j = 2; j <= 23; j++)
+ if (j <= 2 * i + 1)
+ fact *= float(j);
+
+ sin_c += sign * pow(c, 2.0 * float(i) + 1.0) / fact;
+ sign *= -1.0;
+ }
+
+ color = vec4(0.5 * sin_c + 0.5, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_frag_xvary.frag
new file mode 100644
index 000000000..6227170b3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ gl_FragColor = vec4(0.5 * sin(2.0 * M_PI * color.rg) + 0.5, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..031564337
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_frag_xvary_ref.frag
@@ -0,0 +1,137 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float lerp(float a, float b, float s)
+{
+ return a + (b - a) * s;
+}
+
+void main (void)
+{
+ float sinValues[17];
+ sinValues[0] = 0.0;
+ sinValues[1] = 0.382683;
+ sinValues[2] = 0.707107;
+ sinValues[3] = 0.92388;
+ sinValues[4] = 1.0;
+ sinValues[5] = 0.92388;
+ sinValues[6] = 0.707107;
+ sinValues[7] = 0.382683;
+ sinValues[8] = 0.0;
+ sinValues[9] = -0.382683;
+ sinValues[10] = -0.707107;
+ sinValues[11] = -0.92388;
+ sinValues[12] = -1.0;
+ sinValues[13] = -0.923879;
+ sinValues[14] = -0.707107;
+ sinValues[15] = -0.382683;
+ sinValues[16] = 0.0;
+
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * M_PI * color.rg;
+
+ vec2 arrVal = c * 2.546478971;
+ int arr0x = int(floor(arrVal.x));
+ int arr0y = int(floor(arrVal.y));
+ vec2 weight = arrVal - floor(arrVal);
+ vec2 sin_c = vec2(0.0, 0.0);
+
+ if (arr0x == 0)
+ sin_c.x = lerp(sinValues[0], sinValues[1], weight.x);
+ else if (arr0x == 1)
+ sin_c.x = lerp(sinValues[1], sinValues[2], weight.x);
+ else if (arr0x == 2)
+ sin_c.x = lerp(sinValues[2], sinValues[3], weight.x);
+ else if (arr0x == 3)
+ sin_c.x = lerp(sinValues[3], sinValues[4], weight.x);
+ else if (arr0x == 4)
+ sin_c.x = lerp(sinValues[4], sinValues[5], weight.x);
+ else if (arr0x == 5)
+ sin_c.x = lerp(sinValues[5], sinValues[6], weight.x);
+ else if (arr0x == 6)
+ sin_c.x = lerp(sinValues[6], sinValues[7], weight.x);
+ else if (arr0x == 7)
+ sin_c.x = lerp(sinValues[7], sinValues[8], weight.x);
+ else if (arr0x == 8)
+ sin_c.x = lerp(sinValues[8], sinValues[9], weight.x);
+ else if (arr0x == 9)
+ sin_c.x = lerp(sinValues[9], sinValues[10], weight.x);
+ else if (arr0x == 10)
+ sin_c.x = lerp(sinValues[10], sinValues[11], weight.x);
+ else if (arr0x == 11)
+ sin_c.x = lerp(sinValues[11], sinValues[12], weight.x);
+ else if (arr0x == 12)
+ sin_c.x = lerp(sinValues[12], sinValues[13], weight.x);
+ else if (arr0x == 13)
+ sin_c.x = lerp(sinValues[13], sinValues[14], weight.x);
+ else if (arr0x == 14)
+ sin_c.x = lerp(sinValues[14], sinValues[15], weight.x);
+ else if (arr0x == 15)
+ sin_c.x = lerp(sinValues[15], sinValues[16], weight.x);
+ else if (arr0x == 16)
+ sin_c.x = sinValues[16];
+
+ if (arr0y == 0)
+ sin_c.y = lerp(sinValues[0], sinValues[1], weight.y);
+ else if (arr0y == 1)
+ sin_c.y = lerp(sinValues[1], sinValues[2], weight.y);
+ else if (arr0y == 2)
+ sin_c.y = lerp(sinValues[2], sinValues[3], weight.y);
+ else if (arr0y == 3)
+ sin_c.y = lerp(sinValues[3], sinValues[4], weight.y);
+ else if (arr0y == 4)
+ sin_c.y = lerp(sinValues[4], sinValues[5], weight.y);
+ else if (arr0y == 5)
+ sin_c.y = lerp(sinValues[5], sinValues[6], weight.y);
+ else if (arr0y == 6)
+ sin_c.y = lerp(sinValues[6], sinValues[7], weight.y);
+ else if (arr0y == 7)
+ sin_c.y = lerp(sinValues[7], sinValues[8], weight.y);
+ else if (arr0y == 8)
+ sin_c.y = lerp(sinValues[8], sinValues[9], weight.y);
+ else if (arr0y == 9)
+ sin_c.y = lerp(sinValues[9], sinValues[10], weight.y);
+ else if (arr0y == 10)
+ sin_c.y = lerp(sinValues[10], sinValues[11], weight.y);
+ else if (arr0y == 11)
+ sin_c.y = lerp(sinValues[11], sinValues[12], weight.y);
+ else if (arr0y == 12)
+ sin_c.y = lerp(sinValues[12], sinValues[13], weight.y);
+ else if (arr0y == 13)
+ sin_c.y = lerp(sinValues[13], sinValues[14], weight.y);
+ else if (arr0y == 14)
+ sin_c.y = lerp(sinValues[14], sinValues[15], weight.y);
+ else if (arr0y == 15)
+ sin_c.y = lerp(sinValues[15], sinValues[16], weight.y);
+ else if (arr0y == 16)
+ sin_c.y = sinValues[16];
+
+ gl_FragColor = vec4(0.5 * sin_c + 0.5, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_vert_xvary.vert
new file mode 100644
index 000000000..615eb6793
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ color = vec4(0.5 * sin(2.0 * M_PI * gtf_Color.rg) + 0.5, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..aef1f985a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_vert_xvary_ref.vert
@@ -0,0 +1,79 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+float lerp(float a, float b, float s)
+{
+ return a + (b - a) * s;
+}
+
+void main (void)
+{
+ float sinValues[17];
+ sinValues[0] = 0.0;
+ sinValues[1] = 0.382683;
+ sinValues[2] = 0.707107;
+ sinValues[3] = 0.92388;
+ sinValues[4] = 1.0;
+ sinValues[5] = 0.92388;
+ sinValues[6] = 0.707107;
+ sinValues[7] = 0.382683;
+ sinValues[8] = 0.0;
+ sinValues[9] = -0.382683;
+ sinValues[10] = -0.707107;
+ sinValues[11] = -0.92388;
+ sinValues[12] = -1.0;
+ sinValues[13] = -0.923879;
+ sinValues[14] = -0.707107;
+ sinValues[15] = -0.382683;
+ sinValues[16] = 0.0;
+
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 2.0 * M_PI * gtf_Color.rg;
+ float sign = 1.0;
+
+ vec2 sin_c = vec2(0.0);
+ float fact;
+ float fact_of;
+
+ // Taylors series expansion for sin
+ for(int i = 0; i < 12; i++)
+ {
+ fact = 1.0;
+ for(int j = 2; j <= 23; j++)
+ if (j <= 2 * i + 1)
+ fact *= float(j);
+
+ sin_c += sign * pow(c, vec2(2.0 * float(i) + 1.0)) / fact;
+ sign *= -1.0;
+ }
+
+ color = vec4(0.5 * sin_c + 0.5, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_frag_xvary.frag
new file mode 100644
index 000000000..892e996e9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ gl_FragColor = vec4(0.5 * sin(2.0 * M_PI * color.rgb) + 0.5, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..271f12a88
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_frag_xvary_ref.frag
@@ -0,0 +1,173 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+float lerp(float a, float b, float s)
+{
+ return a + (b - a) * s;
+}
+
+void main (void)
+{
+ float sinValues[17];
+ sinValues[0] = 0.0;
+ sinValues[1] = 0.382683;
+ sinValues[2] = 0.707107;
+ sinValues[3] = 0.92388;
+ sinValues[4] = 1.0;
+ sinValues[5] = 0.92388;
+ sinValues[6] = 0.707107;
+ sinValues[7] = 0.382683;
+ sinValues[8] = 0.0;
+ sinValues[9] = -0.382683;
+ sinValues[10] = -0.707107;
+ sinValues[11] = -0.92388;
+ sinValues[12] = -1.0;
+ sinValues[13] = -0.923879;
+ sinValues[14] = -0.707107;
+ sinValues[15] = -0.382683;
+ sinValues[16] = 0.0;
+
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * M_PI * color.rgb;
+
+ vec3 arrVal = c * 2.546478971;
+ int arr0x = int(floor(arrVal.x));
+ int arr0y = int(floor(arrVal.y));
+ int arr0z = int(floor(arrVal.z));
+ vec3 weight = arrVal - floor(arrVal);
+ vec3 sin_c = vec3(0.0, 0.0, 0.0);
+
+ if (arr0x == 0)
+ sin_c.x = lerp(sinValues[0], sinValues[1], weight.x);
+ else if (arr0x == 1)
+ sin_c.x = lerp(sinValues[1], sinValues[2], weight.x);
+ else if (arr0x == 2)
+ sin_c.x = lerp(sinValues[2], sinValues[3], weight.x);
+ else if (arr0x == 3)
+ sin_c.x = lerp(sinValues[3], sinValues[4], weight.x);
+ else if (arr0x == 4)
+ sin_c.x = lerp(sinValues[4], sinValues[5], weight.x);
+ else if (arr0x == 5)
+ sin_c.x = lerp(sinValues[5], sinValues[6], weight.x);
+ else if (arr0x == 6)
+ sin_c.x = lerp(sinValues[6], sinValues[7], weight.x);
+ else if (arr0x == 7)
+ sin_c.x = lerp(sinValues[7], sinValues[8], weight.x);
+ else if (arr0x == 8)
+ sin_c.x = lerp(sinValues[8], sinValues[9], weight.x);
+ else if (arr0x == 9)
+ sin_c.x = lerp(sinValues[9], sinValues[10], weight.x);
+ else if (arr0x == 10)
+ sin_c.x = lerp(sinValues[10], sinValues[11], weight.x);
+ else if (arr0x == 11)
+ sin_c.x = lerp(sinValues[11], sinValues[12], weight.x);
+ else if (arr0x == 12)
+ sin_c.x = lerp(sinValues[12], sinValues[13], weight.x);
+ else if (arr0x == 13)
+ sin_c.x = lerp(sinValues[13], sinValues[14], weight.x);
+ else if (arr0x == 14)
+ sin_c.x = lerp(sinValues[14], sinValues[15], weight.x);
+ else if (arr0x == 15)
+ sin_c.x = lerp(sinValues[15], sinValues[16], weight.x);
+ else if (arr0x == 16)
+ sin_c.x = sinValues[16];
+
+ if (arr0y == 0)
+ sin_c.y = lerp(sinValues[0], sinValues[1], weight.y);
+ else if (arr0y == 1)
+ sin_c.y = lerp(sinValues[1], sinValues[2], weight.y);
+ else if (arr0y == 2)
+ sin_c.y = lerp(sinValues[2], sinValues[3], weight.y);
+ else if (arr0y == 3)
+ sin_c.y = lerp(sinValues[3], sinValues[4], weight.y);
+ else if (arr0y == 4)
+ sin_c.y = lerp(sinValues[4], sinValues[5], weight.y);
+ else if (arr0y == 5)
+ sin_c.y = lerp(sinValues[5], sinValues[6], weight.y);
+ else if (arr0y == 6)
+ sin_c.y = lerp(sinValues[6], sinValues[7], weight.y);
+ else if (arr0y == 7)
+ sin_c.y = lerp(sinValues[7], sinValues[8], weight.y);
+ else if (arr0y == 8)
+ sin_c.y = lerp(sinValues[8], sinValues[9], weight.y);
+ else if (arr0y == 9)
+ sin_c.y = lerp(sinValues[9], sinValues[10], weight.y);
+ else if (arr0y == 10)
+ sin_c.y = lerp(sinValues[10], sinValues[11], weight.y);
+ else if (arr0y == 11)
+ sin_c.y = lerp(sinValues[11], sinValues[12], weight.y);
+ else if (arr0y == 12)
+ sin_c.y = lerp(sinValues[12], sinValues[13], weight.y);
+ else if (arr0y == 13)
+ sin_c.y = lerp(sinValues[13], sinValues[14], weight.y);
+ else if (arr0y == 14)
+ sin_c.y = lerp(sinValues[14], sinValues[15], weight.y);
+ else if (arr0y == 15)
+ sin_c.y = lerp(sinValues[15], sinValues[16], weight.y);
+ else if (arr0y == 16)
+ sin_c.y = sinValues[16];
+
+ if (arr0z == 0)
+ sin_c.z = lerp(sinValues[0], sinValues[1], weight.z);
+ else if (arr0z == 1)
+ sin_c.z = lerp(sinValues[1], sinValues[2], weight.z);
+ else if (arr0z == 2)
+ sin_c.z = lerp(sinValues[2], sinValues[3], weight.z);
+ else if (arr0z == 3)
+ sin_c.z = lerp(sinValues[3], sinValues[4], weight.z);
+ else if (arr0z == 4)
+ sin_c.z = lerp(sinValues[4], sinValues[5], weight.z);
+ else if (arr0z == 5)
+ sin_c.z = lerp(sinValues[5], sinValues[6], weight.z);
+ else if (arr0z == 6)
+ sin_c.z = lerp(sinValues[6], sinValues[7], weight.z);
+ else if (arr0z == 7)
+ sin_c.z = lerp(sinValues[7], sinValues[8], weight.z);
+ else if (arr0z == 8)
+ sin_c.z = lerp(sinValues[8], sinValues[9], weight.z);
+ else if (arr0z == 9)
+ sin_c.z = lerp(sinValues[9], sinValues[10], weight.z);
+ else if (arr0z == 10)
+ sin_c.z = lerp(sinValues[10], sinValues[11], weight.z);
+ else if (arr0z == 11)
+ sin_c.z = lerp(sinValues[11], sinValues[12], weight.z);
+ else if (arr0z == 12)
+ sin_c.z = lerp(sinValues[12], sinValues[13], weight.z);
+ else if (arr0z == 13)
+ sin_c.z = lerp(sinValues[13], sinValues[14], weight.z);
+ else if (arr0z == 14)
+ sin_c.z = lerp(sinValues[14], sinValues[15], weight.z);
+ else if (arr0z == 15)
+ sin_c.z = lerp(sinValues[15], sinValues[16], weight.z);
+ else if (arr0z == 16)
+ sin_c.z = sinValues[16];
+
+ gl_FragColor = vec4(0.5 * sin_c + 0.5, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_vert_xvary.vert
new file mode 100644
index 000000000..d60370e45
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ color = vec4(0.5 * sin(2.0 * M_PI * gtf_Color.rgb) + 0.5, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..7c4571cb1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_vert_xvary_ref.vert
@@ -0,0 +1,79 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+float lerp(float a, float b, float s)
+{
+ return a + (b - a) * s;
+}
+
+void main (void)
+{
+ float sinValues[17];
+ sinValues[0] = 0.0;
+ sinValues[1] = 0.382683;
+ sinValues[2] = 0.707107;
+ sinValues[3] = 0.92388;
+ sinValues[4] = 1.0;
+ sinValues[5] = 0.92388;
+ sinValues[6] = 0.707107;
+ sinValues[7] = 0.382683;
+ sinValues[8] = 0.0;
+ sinValues[9] = -0.382683;
+ sinValues[10] = -0.707107;
+ sinValues[11] = -0.92388;
+ sinValues[12] = -1.0;
+ sinValues[13] = -0.923879;
+ sinValues[14] = -0.707107;
+ sinValues[15] = -0.382683;
+ sinValues[16] = 0.0;
+
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 2.0 * M_PI * gtf_Color.rgb;
+ float sign = 1.0;
+
+ vec3 sin_c = vec3(0.0);
+ float fact;
+ float fact_of;
+
+ // Taylors series expansion for sin
+ for(int i = 0; i < 12; i++)
+ {
+ fact = 1.0;
+ for(int j = 2; j <= 23; j++)
+ if (j <= 2 * i + 1)
+ fact *= float(j);
+
+ sin_c += sign * pow(c, vec3(2.0 * float(i) + 1.0)) / fact;
+ sign *= -1.0;
+ }
+
+ color = vec4(0.5 * sin_c + 0.5, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/input.run.txt
new file mode 100644
index 000000000..4121dd5f8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+smoothstep_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html
new file mode 100644
index 000000000..ce062c398
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: smoothstep_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "smoothstep_float_frag_xvary_edgeconstquarter_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "smoothstep_float_frag_xvary_edgeconstquarter.frag"
+ },
+ "name": "smoothstep_float_frag_xvary_edgeconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "smoothstep_vec2_frag_xvary_edgeconstquarter_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "smoothstep_vec2_frag_xvary_edgeconstquarter.frag"
+ },
+ "name": "smoothstep_vec2_frag_xvary_edgeconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "smoothstep_vec3_frag_xvary_edgeconstquarter_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "smoothstep_vec3_frag_xvary_edgeconstquarter.frag"
+ },
+ "name": "smoothstep_vec3_frag_xvary_edgeconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "smoothstep_float_vert_xvary_edgeconstquarter_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "smoothstep_float_vert_xvary_edgeconstquarter.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "smoothstep_float_vert_xvary_edgeconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "smoothstep_vec2_vert_xvary_edgeconstquarter_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "smoothstep_vec2_vert_xvary_edgeconstquarter.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "smoothstep_vec2_vert_xvary_edgeconstquarter.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "smoothstep_vec3_vert_xvary_edgeconstquarter_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "smoothstep_vec3_vert_xvary_edgeconstquarter.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "smoothstep_vec3_vert_xvary_edgeconstquarter.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter.frag
new file mode 100644
index 000000000..f7b8ed3d5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float edge0 = 0.25;
+ const float edge1 = 0.75;
+ gl_FragColor = vec4(smoothstep(edge0, edge1, color.r), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter_ref.frag
new file mode 100644
index 000000000..92e49f0f0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter_ref.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float edge0 = 0.25;
+ const float edge1 = 0.75;
+ float c = clamp((color.r - edge0) / (edge1 - edge0), 0.0, 1.0);
+
+ gl_FragColor = vec4(c * c * (3.0 - 2.0 * c), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter.vert
new file mode 100644
index 000000000..bf8ff22cc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float edge0 = 0.25;
+ const float edge1 = 0.75;
+ color = vec4(smoothstep(edge0, edge1, gtf_Color.r), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter_ref.vert
new file mode 100644
index 000000000..55422bffd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter_ref.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float edge0 = 0.25;
+ const float edge1 = 0.75;
+ float c = clamp((gtf_Color.r - edge0) / (edge1 - edge0), 0.0, 1.0);
+
+ color = vec4(c * c * (3.0 - 2.0 * c), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter.frag
new file mode 100644
index 000000000..bd235720c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 edge0 = vec2(0.25, 0.25);
+ const vec2 edge1 = vec2(0.75, 0.75);
+ gl_FragColor = vec4(smoothstep(edge0, edge1, color.rg), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter_ref.frag
new file mode 100644
index 000000000..8790241d9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter_ref.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 edge0 = vec2(0.25, 0.25);
+ const vec2 edge1 = vec2(0.75, 0.75);
+ vec2 c = clamp((color.rg - edge0) / (edge1 - edge0), 0.0, 1.0);
+ gl_FragColor = vec4(c * c * (3.0 - 2.0 * c), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter.vert
new file mode 100644
index 000000000..06f12e328
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 edge0 = vec2(0.25, 0.25);
+ const vec2 edge1 = vec2(0.75, 0.75);
+ color = vec4(smoothstep(edge0, edge1, gtf_Color.rg), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter_ref.vert
new file mode 100644
index 000000000..00b4f7a25
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter_ref.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 edge0 = vec2(0.25, 0.25);
+ const vec2 edge1 = vec2(0.75, 0.75);
+ vec2 c = clamp((gtf_Color.rg - edge0) / (edge1 - edge0), 0.0, 1.0);
+ color = vec4(c * c * (3.0 - 2.0 * c), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter.frag
new file mode 100644
index 000000000..e7ad681e7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 edge0 = vec3(0.25, 0.25, 0.25);
+ const vec3 edge1 = vec3(0.75, 0.75, 0.75);
+ gl_FragColor = vec4(smoothstep(edge0, edge1, color.rgb), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter_ref.frag
new file mode 100644
index 000000000..e07971e0f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter_ref.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 edge0 = vec3(0.25, 0.25, 0.25);
+ const vec3 edge1 = vec3(0.75, 0.75, 0.75);
+ vec3 c = clamp((color.rgb - edge0) / (edge1 - edge0), 0.0, 1.0);
+
+ gl_FragColor = vec4(c * c * (3.0 - 2.0 * c), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter.vert
new file mode 100644
index 000000000..e12ed9317
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 edge0 = vec3(0.25, 0.25, 0.25);
+ const vec3 edge1 = vec3(0.75, 0.75, 0.75);
+ color = vec4(smoothstep(edge0, edge1, gtf_Color.rgb), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter_ref.vert
new file mode 100644
index 000000000..4798adb90
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter_ref.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 edge0 = vec3(0.25, 0.25, 0.25);
+ const vec3 edge1 = vec3(0.75, 0.75, 0.75);
+ vec3 c = clamp((gtf_Color.rgb - edge0) / (edge1 - edge0), 0.0, 1.0);
+
+ color = vec4(c * c * (3.0 - 2.0 * c), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/input.run.txt
new file mode 100644
index 000000000..a151ee644
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+sqrt_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_001_to_006.html
new file mode 100644
index 000000000..3a5b4de88
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: sqrt_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sqrt_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sqrt_float_frag_xvary.frag"
+ },
+ "name": "sqrt_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sqrt_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sqrt_vec2_frag_xvary.frag"
+ },
+ "name": "sqrt_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sqrt_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "sqrt_vec3_frag_xvary.frag"
+ },
+ "name": "sqrt_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "sqrt_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "sqrt_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "sqrt_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "sqrt_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "sqrt_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "sqrt_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "sqrt_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "sqrt_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "sqrt_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_frag_xvary.frag
new file mode 100644
index 000000000..bb2604b18
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = sqrt(100.0 * color.r);
+ gl_FragColor = vec4(c * c / 100.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..2055b814d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_frag_xvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ float c = 100.0 * color.r;
+ gl_FragColor = vec4(c / 100.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_vert_xvary.vert
new file mode 100644
index 000000000..7982ebf2a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = sqrt(100.0 * gtf_Color.r);
+ color = vec4(c * c / 100.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..eb4f14413
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_vert_xvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ float c = 100.0 * gtf_Color.r;
+ color = vec4(c / 100.0, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_frag_xvary.frag
new file mode 100644
index 000000000..e70a2ccbd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = sqrt(100.0 * color.rg);
+ gl_FragColor = vec4(c * c / 100.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..4253e1034
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_frag_xvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 100.0 * color.rg;
+ gl_FragColor = vec4(c / 100.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_vert_xvary.vert
new file mode 100644
index 000000000..30587af1d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = sqrt(100.0 * gtf_Color.rg);
+ color = vec4(c * c / 100.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..cb61ec8f0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_vert_xvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 c = 100.0 * gtf_Color.rg;
+ color = vec4(c / 100.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_frag_xvary.frag
new file mode 100644
index 000000000..b4d5c281c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_frag_xvary.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = sqrt(100.0 * color.rgb);
+ gl_FragColor = vec4(c * c / 100.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..1fb1f880a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_frag_xvary_ref.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 100.0 * color.rgb;
+ gl_FragColor = vec4(c / 100.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_vert_xvary.vert
new file mode 100644
index 000000000..1e3c8beae
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_vert_xvary.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = sqrt(100.0 * gtf_Color.rgb);
+ color = vec4(c * c / 100.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..e54f86bab
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_vert_xvary_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 c = 100.0 * gtf_Color.rgb;
+ color = vec4(c / 100.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/input.run.txt
new file mode 100644
index 000000000..6b8ac005d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+step_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_001_to_006.html
new file mode 100644
index 000000000..27ee2cfac
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: step_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "step_float_frag_xvary_edgeconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "step_float_frag_xvary_edgeconsthalf.frag"
+ },
+ "name": "step_float_frag_xvary_edgeconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "step_vec2_frag_xvary_edgeconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "step_vec2_frag_xvary_edgeconsthalf.frag"
+ },
+ "name": "step_vec2_frag_xvary_edgeconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "step_vec3_frag_xvary_edgeconsthalf_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "step_vec3_frag_xvary_edgeconsthalf.frag"
+ },
+ "name": "step_vec3_frag_xvary_edgeconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "step_float_vert_xvary_edgeconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "step_float_vert_xvary_edgeconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "step_float_vert_xvary_edgeconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "step_vec2_vert_xvary_edgeconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "step_vec2_vert_xvary_edgeconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "step_vec2_vert_xvary_edgeconsthalf.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "step_vec3_vert_xvary_edgeconsthalf_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "step_vec3_vert_xvary_edgeconsthalf.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "step_vec3_vert_xvary_edgeconsthalf.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf.frag
new file mode 100644
index 000000000..94e69d79c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float edge = 0.5;
+ gl_FragColor = vec4(step(edge, color.r), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf_ref.frag
new file mode 100644
index 000000000..b601eb78b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf_ref.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float edge = 0.5;
+ float c = color.r;
+ if(c >= edge) c = 1.0;
+ else c = 0.0;
+
+ gl_FragColor = vec4(c, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf.vert
new file mode 100644
index 000000000..2a3834f21
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float edge = 0.5;
+ color = vec4(step(edge, gtf_Color.r), 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf_ref.vert
new file mode 100644
index 000000000..3db47cac6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf_ref.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float edge = 0.5;
+ float c = gtf_Color.r;
+ if(c >= edge) c = 1.0;
+ else c = 0.0;
+
+ color = vec4(c, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf.frag
new file mode 100644
index 000000000..93cc99fe2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 edge = vec2(0.5, 0.5);
+ gl_FragColor = vec4(step(edge, color.rg), 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf_ref.frag
new file mode 100644
index 000000000..d8d361010
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf_ref.frag
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 edge = vec2(0.5, 0.5);
+ vec2 c = color.rg;
+ if(c[0] >= edge[0])
+ {
+ c[0] = 1.0;
+ }
+ else
+ {
+ c[0] = 0.0;
+ }
+ if(c[1] >= edge[1])
+ {
+ c[1] = 1.0;
+ }
+ else
+ {
+ c[1] = 0.0;
+ }
+
+ gl_FragColor = vec4(c, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf.vert
new file mode 100644
index 000000000..d0df73886
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 edge = vec2(0.5, 0.5);
+ color = vec4(step(edge, gtf_Color.rg), 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf_ref.vert
new file mode 100644
index 000000000..11c5640e5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf_ref.vert
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec2 edge = vec2(0.5, 0.5);
+ vec2 c = gtf_Color.rg;
+ if(c[0] >= edge[0])
+ {
+ c[0] = 1.0;
+ }
+ else
+ {
+ c[0] = 0.0;
+ }
+ if(c[1] >= edge[1])
+ {
+ c[1] = 1.0;
+ }
+ else
+ {
+ c[1] = 0.0;
+ }
+
+ color = vec4(c, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf.frag
new file mode 100644
index 000000000..87c64f539
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 edge = vec3(0.5, 0.5, 0.5);
+ gl_FragColor = vec4(step(edge, color.rgb), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf_ref.frag
new file mode 100644
index 000000000..3d9968222
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf_ref.frag
@@ -0,0 +1,61 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 edge = vec3(0.5, 0.5, 0.5);
+ vec3 c = color.rgb;
+ if(c[0] >= edge[0])
+ {
+ c[0] = 1.0;
+ }
+ else
+ {
+ c[0] = 0.0;
+ }
+ if(c[1] >= edge[1])
+ {
+ c[1] = 1.0;
+ }
+ else
+ {
+ c[1] = 0.0;
+ }
+ if(c[2] >= edge[2])
+ {
+ c[2] = 1.0;
+ }
+ else
+ {
+ c[2] = 0.0;
+ }
+
+ gl_FragColor = vec4(c, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf.vert
new file mode 100644
index 000000000..0ac85addc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 edge = vec3(0.5, 0.5, 0.5);
+ color = vec4(step(edge, gtf_Color.rgb), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf_ref.vert
new file mode 100644
index 000000000..d85a52ebe
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf_ref.vert
@@ -0,0 +1,62 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const vec3 edge = vec3(0.5, 0.5, 0.5);
+ vec3 c = gtf_Color.rgb;
+ if(c[0] >= edge[0])
+ {
+ c[0] = 1.0;
+ }
+ else
+ {
+ c[0] = 0.0;
+ }
+ if(c[1] >= edge[1])
+ {
+ c[1] = 1.0;
+ }
+ else
+ {
+ c[1] = 0.0;
+ }
+ if(c[2] >= edge[2])
+ {
+ c[2] = 1.0;
+ }
+ else
+ {
+ c[2] = 0.0;
+ }
+
+ color = vec4(c, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/input.run.txt
new file mode 100644
index 000000000..89c3da16e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/input.run.txt
@@ -0,0 +1,8 @@
+# this file is auto-generated. DO NOT EDIT.
+struct_001_to_008.html
+struct_009_to_016.html
+struct_017_to_024.html
+struct_025_to_032.html
+struct_033_to_040.html
+struct_041_to_048.html
+struct_049_to_056.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/nestedstructcomb_various_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/nestedstructcomb_various_frag.frag
new file mode 100644
index 000000000..8f13ba1b1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/nestedstructcomb_various_frag.frag
@@ -0,0 +1,116 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void){
+ struct second_nest
+ {
+ float sc_nt;
+ mat2 sc_mt2;
+ vec4 sc_vc4;
+ };
+
+ struct nest
+ {
+ ivec3 nt_ivc3;
+ bvec4 nt_bvc4;
+ second_nest nt_scne;
+ };
+
+ struct test_t
+ {
+ float t_fl;
+ vec2 t_vc2;
+ vec3 t_vc3;
+ mat4 t_mt4;
+ nest t_nested;
+ float t_2fl;
+ };
+
+ vec4 mt1 = vec4(31.0, 32.0, 33.0, 34.0);
+ vec4 mt2 = vec4(35.0, 36.0, 37.0, 38.0);
+ vec4 mt3 = vec4(39.0, 40.0, 41.0, 42.0);
+ vec4 mt4 = vec4(43.0, 44.0, 45.0, 46.0);
+ int i=0;
+ float sum1=0.0, sum2=0.0, sum3=0.0, sum4=0.0;
+
+ test_t a = test_t(23.0, vec2(12.0, 13.0),
+
+ vec3(163.0, 173.0, 183.0),
+
+ mat4(mt1, mt2, mt3, mt4),
+
+ nest( ivec3(73, 74, 75),
+
+ bvec4(12, 0, 17.0, 193.0 ),
+
+ second_nest(144.0, mat2(22.0, 23.0, 24.0, 25.0), vec4(57.0, 58.0, 59.0, 60.0 )
+ )
+ ),
+
+ 203.0
+ );
+
+ sum1 = a.t_mt4[0][0] + a.t_mt4[0][1] + a.t_mt4[0][2] + a.t_mt4[0][3];
+ sum2 = a.t_mt4[1][0] + a.t_mt4[1][1] + a.t_mt4[1][2] + a.t_mt4[1][3];
+ sum3 = a.t_mt4[2][0] + a.t_mt4[2][1] + a.t_mt4[2][2] + a.t_mt4[2][3];
+ sum4 = a.t_mt4[3][0] + a.t_mt4[3][1] + a.t_mt4[3][2] + a.t_mt4[3][3];
+
+ float gray;
+ if( ( a.t_fl == 23.0 ) &&
+
+ (a.t_vc2[0] == 12.0) && (a.t_vc2[1] == 13.0) &&
+
+ (a.t_vc3[0] == 163.0) && (a.t_vc3[1] == 173.0) && (a.t_vc3[2] == 183.0) &&
+
+ (sum1 > 130.0-ERROR_EPSILON && sum1 < 130.0+ERROR_EPSILON ) && (sum2 > 146.0-ERROR_EPSILON && sum2 < 146.0+ERROR_EPSILON ) && (sum3 >162.0-ERROR_EPSILON && sum3 < 162.0+ERROR_EPSILON ) && (sum4 > 178.0-ERROR_EPSILON && sum4 < 178.0+ERROR_EPSILON ) &&
+ (a.t_nested.nt_ivc3[0] == 73 ) && (a.t_nested.nt_ivc3[1] == 74 ) && (a.t_nested.nt_ivc3[2] == 75 ) &&
+
+ (a.t_nested.nt_bvc4[0] == true) && (a.t_nested.nt_bvc4[1] == false) &&
+
+ (a.t_nested.nt_bvc4[2] == true ) && (a.t_nested.nt_bvc4[0] == true) &&
+
+ (a.t_nested.nt_scne.sc_nt == 144.0) &&
+
+ (a.t_nested.nt_scne.sc_mt2[0][0] == 22.0 ) && (a.t_nested.nt_scne.sc_mt2[0][1] == 23.0 ) &&
+
+ (a.t_nested.nt_scne.sc_mt2[1][0] == 24.0 ) && (a.t_nested.nt_scne.sc_mt2[1][1] == 25.0 ) &&
+
+ (a.t_nested.nt_scne.sc_vc4[0] == 57.0 ) && (a.t_nested.nt_scne.sc_vc4[1] == 58.0 ) &&
+
+ (a.t_nested.nt_scne.sc_vc4[2] == 59.0 ) && (a.t_nested.nt_scne.sc_vc4[3] == 60.0) &&
+
+ (a.t_2fl == 203.0)
+ )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/nestedstructcomb_various_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/nestedstructcomb_various_vert.vert
new file mode 100644
index 000000000..1c6338bc2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/nestedstructcomb_various_vert.vert
@@ -0,0 +1,119 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+#define ERROR_EPSILON 0.1
+
+void main (void)
+{
+ struct second_nest
+ {
+ float sc_nt;
+ mat2 sc_mt2;
+ vec4 sc_vc4;
+ };
+
+ struct nest
+ {
+ ivec3 nt_ivc3;
+ bvec4 nt_bvc4;
+ second_nest nt_scne;
+ };
+
+ struct test_t
+ {
+ float t_fl;
+ vec2 t_vc2;
+ vec3 t_vc3;
+ mat4 t_mt4;
+ nest t_nested;
+ float t_2fl;
+ };
+
+ vec4 mt1 = vec4(31.0, 32.0, 33.0, 34.0);
+ vec4 mt2 = vec4(35.0, 36.0, 37.0, 38.0);
+ vec4 mt3 = vec4(39.0, 40.0, 41.0, 42.0);
+ vec4 mt4 = vec4(43.0, 44.0, 45.0, 46.0);
+ int i=0;
+ float sum1=0.0, sum2=0.0, sum3=0.0, sum4=0.0;
+
+ test_t a = test_t(23.0, vec2(12.0, 13.0),
+
+ vec3(163.0, 173.0, 183.0),
+
+ mat4(mt1, mt2, mt3, mt4),
+
+ nest( ivec3(73, 74, 75),
+
+ bvec4(12, 0, 17.0, 193.0 ),
+
+ second_nest(144.0, mat2(22.0, 23.0, 24.0, 25.0), vec4(57.0, 58.0, 59.0, 60.0 )
+ )
+ ),
+
+ 203.0
+ );
+
+ sum1 = a.t_mt4[0][0] + a.t_mt4[0][1] + a.t_mt4[0][2] + a.t_mt4[0][3];
+ sum2 = a.t_mt4[1][0] + a.t_mt4[1][1] + a.t_mt4[1][2] + a.t_mt4[1][3];
+ sum3 = a.t_mt4[2][0] + a.t_mt4[2][1] + a.t_mt4[2][2] + a.t_mt4[2][3];
+ sum4 = a.t_mt4[3][0] + a.t_mt4[3][1] + a.t_mt4[3][2] + a.t_mt4[3][3];
+
+ float gray;
+ if( ( a.t_fl == 23.0 ) &&
+
+ (a.t_vc2[0] == 12.0) && (a.t_vc2[1] == 13.0) &&
+
+ (a.t_vc3[0] == 163.0) && (a.t_vc3[1] == 173.0) && (a.t_vc3[2] == 183.0) &&
+
+ (sum1 > 130.0-ERROR_EPSILON && sum1 < 130.0+ERROR_EPSILON ) && (sum2 > 146.0-ERROR_EPSILON && sum2 < 146.0+ERROR_EPSILON ) && (sum3 >162.0-ERROR_EPSILON && sum3 < 162.0+ERROR_EPSILON ) && (sum4 > 178.0-ERROR_EPSILON && sum4 < 178.0+ERROR_EPSILON ) &&
+ (a.t_nested.nt_ivc3[0] == 73 ) && (a.t_nested.nt_ivc3[1] == 74 ) && (a.t_nested.nt_ivc3[2] == 75 ) &&
+
+ (a.t_nested.nt_bvc4[0] == true) && (a.t_nested.nt_bvc4[1] == false) &&
+
+ (a.t_nested.nt_bvc4[2] == true ) && (a.t_nested.nt_bvc4[0] == true) &&
+
+ (a.t_nested.nt_scne.sc_nt == 144.0) &&
+
+ (a.t_nested.nt_scne.sc_mt2[0][0] == 22.0 ) && (a.t_nested.nt_scne.sc_mt2[0][1] == 23.0 ) &&
+
+ (a.t_nested.nt_scne.sc_mt2[1][0] == 24.0 ) && (a.t_nested.nt_scne.sc_mt2[1][1] == 25.0 ) &&
+
+ (a.t_nested.nt_scne.sc_vc4[0] == 57.0 ) && (a.t_nested.nt_scne.sc_vc4[1] == 58.0 ) &&
+
+ (a.t_nested.nt_scne.sc_vc4[2] == 59.0 ) && (a.t_nested.nt_scne.sc_vc4[3] == 60.0) &&
+
+ (a.t_2fl == 203.0)
+ )
+ gray=1.0;
+ else gray=0.0;
+
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_001_to_008.html
new file mode 100644
index 000000000..994b23f3b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_001_to_008.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: struct_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct_float_frag.frag"
+ },
+ "name": "struct_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "struct_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "struct_float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structcopy_float_frag.frag"
+ },
+ "name": "structcopy_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structcopy_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structcopy_float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structnest_float_frag.frag"
+ },
+ "name": "structnest_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structnest_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structnest_float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct_bool_frag.frag"
+ },
+ "name": "struct_bool_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "struct_bool_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "struct_bool_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_009_to_016.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_009_to_016.html
new file mode 100644
index 000000000..fcd04512f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_009_to_016.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: struct_009_to_016.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structcopy_bool_frag.frag"
+ },
+ "name": "structcopy_bool_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structcopy_bool_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structcopy_bool_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structnest_bool_frag.frag"
+ },
+ "name": "structnest_bool_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structnest_bool_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structnest_bool_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct_vec2_frag.frag"
+ },
+ "name": "struct_vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "struct_vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "struct_vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structcopy_vec2_frag.frag"
+ },
+ "name": "structcopy_vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structcopy_vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structcopy_vec2_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_017_to_024.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_017_to_024.html
new file mode 100644
index 000000000..9a7d25ead
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_017_to_024.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: struct_017_to_024.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structnest_vec2_frag.frag"
+ },
+ "name": "structnest_vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structnest_vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structnest_vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct_vec3_frag.frag"
+ },
+ "name": "struct_vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "struct_vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "struct_vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structcopy_vec3_frag.frag"
+ },
+ "name": "structcopy_vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structcopy_vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structcopy_vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structnest_vec3_frag.frag"
+ },
+ "name": "structnest_vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structnest_vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structnest_vec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_025_to_032.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_025_to_032.html
new file mode 100644
index 000000000..dc9f40967
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_025_to_032.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: struct_025_to_032.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct_vec4_frag.frag"
+ },
+ "name": "struct_vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "struct_vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "struct_vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structcopy_vec4_frag.frag"
+ },
+ "name": "structcopy_vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structcopy_vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structcopy_vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structnest_vec4_frag.frag"
+ },
+ "name": "structnest_vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structnest_vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structnest_vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct_bvec2bvec3bvec4_frag.frag"
+ },
+ "name": "struct_bvec2bvec3bvec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "struct_bvec2bvec3bvec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "struct_bvec2bvec3bvec4_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_033_to_040.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_033_to_040.html
new file mode 100644
index 000000000..7f61d5828
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_033_to_040.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: struct_033_to_040.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structcopy_bvec2bvec3bvec4_frag.frag"
+ },
+ "name": "structcopy_bvec2bvec3bvec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structcopy_bvec2bvec3bvec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structcopy_bvec2bvec3bvec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structnest_bvec2bvec3bvec4_frag.frag"
+ },
+ "name": "structnest_bvec2bvec3bvec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structnest_bvec2bvec3bvec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structnest_bvec2bvec3bvec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct_mat2_frag.frag"
+ },
+ "name": "struct_mat2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "struct_mat2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "struct_mat2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structcopy_mat2_frag.frag"
+ },
+ "name": "structcopy_mat2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structcopy_mat2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structcopy_mat2_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_041_to_048.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_041_to_048.html
new file mode 100644
index 000000000..aa6e60874
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_041_to_048.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: struct_041_to_048.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structnest_mat2_frag.frag"
+ },
+ "name": "structnest_mat2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structnest_mat2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structnest_mat2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct_mat3_frag.frag"
+ },
+ "name": "struct_mat3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "struct_mat3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "struct_mat3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structcopy_mat3_frag.frag"
+ },
+ "name": "structcopy_mat3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structcopy_mat3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structcopy_mat3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structnest_mat3_frag.frag"
+ },
+ "name": "structnest_mat3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structnest_mat3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structnest_mat3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_049_to_056.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_049_to_056.html
new file mode 100644
index 000000000..e9cc39acc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_049_to_056.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: struct_049_to_056.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "struct_mat4_frag.frag"
+ },
+ "name": "struct_mat4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "struct_mat4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "struct_mat4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structcopy_mat4_frag.frag"
+ },
+ "name": "structcopy_mat4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structcopy_mat4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structcopy_mat4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "structnest_mat4_frag.frag"
+ },
+ "name": "structnest_mat4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "structnest_mat4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "structnest_mat4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "nestedstructcomb_various_frag.frag"
+ },
+ "name": "nestedstructcomb_various_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "nestedstructcomb_various_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "nestedstructcomb_various_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bool_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bool_frag.frag
new file mode 100644
index 000000000..0f2386181
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bool_frag.frag
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct sabcd
+{
+ bool a;
+ bool b;
+ bool c;
+ bool d;
+};
+
+
+
+void main (void)
+{
+ sabcd s = sabcd(bool(12), bool(0), bool(25.5), bool(0.0));
+ float gray = 0.0;
+ if( (s.a==true) && (s.b==false) && (s.c == true) && (s.d==false))
+ gray=1.0;
+ else
+ gray =0.0;
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bool_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bool_vert.vert
new file mode 100644
index 000000000..97d40e0a1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bool_vert.vert
@@ -0,0 +1,52 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+
+
+struct sabcd
+{
+ bool a;
+ bool b;
+ bool c;
+ bool d;
+};
+
+
+
+void main (void)
+{
+ sabcd s = sabcd(bool(12), bool(0), bool(25.5), bool(0.0));
+ float gray = 0.0;
+ if( (s.a==true) && (s.b==false) && (s.c == true) && (s.d==false))
+ gray=1.0;
+ else
+ gray =0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_frag.frag
new file mode 100644
index 000000000..9361a6fa2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_frag.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct sabcd
+{
+ bvec2 a;
+ bvec3 b;
+ bvec4 c;
+};
+
+void main (void)
+{
+ sabcd s = sabcd( bvec2(12, 13), bvec3(14.0, 0.0, 139.0), bvec4(25.5, 17.0, 145, 163 ) );
+ float gray = 0.0;
+ if( (s.a[0]) && (s.a[1]) && (s.b[0]) && (!s.b[1]) && (s.b[2]) && (s.c[0]) && (s.c[1]) && (s.c[2]) )
+ gray=1.0;
+ else
+ gray =0.0;
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_vert.vert
new file mode 100644
index 000000000..a40c4d749
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_vert.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct sabcd
+{
+ bvec2 a;
+ bvec3 b;
+ bvec4 c;
+};
+
+void main (void)
+{
+ sabcd s = sabcd( bvec2(12, 13), bvec3(14.0, 0.0, 139.0), bvec4(25.5, 17.0, 145, 163 ) );
+ float gray = 0.0;
+ if( (s.a[0]) && (s.a[1]) && (s.b[0]) && (!s.b[1]) && (s.b[2]) && (s.c[0]) && (s.c[1]) && (s.c[2]) )
+ gray=1.0;
+ else
+ gray =0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_float_frag.frag
new file mode 100644
index 000000000..57139805b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_float_frag.frag
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct sabcd
+{
+ float a;
+ float b;
+ float c;
+ float d;
+};
+
+
+
+void main (void)
+{
+ sabcd s = sabcd(1.0, 2.0, 4.0, 8.0);
+ gl_FragColor = vec4(vec3((s.a + s.b + s.c + s.d) / 15.0), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_float_vert.vert
new file mode 100644
index 000000000..2bb966bf2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_float_vert.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+
+
+struct sabcd
+{
+ float a;
+ float b;
+ float c;
+ float d;
+};
+
+
+
+void main (void)
+{
+ sabcd s = sabcd(1.0, 2.0, 4.0, 8.0);
+ color = vec4(vec3((s.a + s.b + s.c + s.d) / 15.0), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat2_frag.frag
new file mode 100644
index 000000000..6274b72c1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat2_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+struct sabcd
+{
+ mat2 a;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(mat2(12.0, 29.0, 13.0, 26.0) );
+ gl_FragColor = vec4( vec3( (s.a[0][0] + s.a[0][1] + s.a[1][0] + s.a[1][1]) / 80.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat2_vert.vert
new file mode 100644
index 000000000..2b07347b6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat2_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct sabcd
+{
+ mat2 a;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(mat2(12.0, 29.0, 13.0, 26.0) );
+ color = vec4( vec3( (s.a[0][0] + s.a[0][1] + s.a[1][0] + s.a[1][1]) / 80.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat3_frag.frag
new file mode 100644
index 000000000..a3d1fd193
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat3_frag.frag
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+struct sabcd
+{
+ mat3 a;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(mat3(12.0, 29.0, 13.0, 26.0, 71.0, 63.0, 90.0, 118.0, 128.0) );
+ float sum=0.0;
+ int i,j;
+
+ sum = sum + s.a[0][0];
+ sum = sum + s.a[0][1];
+ sum = sum + s.a[0][2];
+ sum = sum + s.a[1][0];
+ sum = sum + s.a[1][1];
+ sum = sum + s.a[1][2];
+ sum = sum + s.a[2][0];
+ sum = sum + s.a[2][1];
+ sum = sum + s.a[2][2];
+
+ gl_FragColor = vec4( vec3( sum / 550.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat3_vert.vert
new file mode 100644
index 000000000..c3c0ee0c5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat3_vert.vert
@@ -0,0 +1,54 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct sabcd
+{
+ mat3 a;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(mat3(12.0, 29.0, 13.0, 26.0, 71.0, 63.0, 90.0, 118.0, 128.0) );
+ float sum=0.0;
+
+ sum = sum + s.a[0][0];
+ sum = sum + s.a[0][1];
+ sum = sum + s.a[0][2];
+
+ sum = sum + s.a[1][0];
+ sum = sum + s.a[1][1];
+ sum = sum + s.a[1][2];
+
+ sum = sum + s.a[2][0];
+ sum = sum + s.a[2][1];
+ sum = sum + s.a[2][2];
+
+ color = vec4( vec3( sum / 550.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat4_frag.frag
new file mode 100644
index 000000000..bae5878ae
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat4_frag.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+struct sabcd
+{
+ mat4 a;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(mat4(12.0, 29.0, 13.0, 26.0,
+ 71.0, 63.0, 90.0, 118.0,
+ 128.0, 44.0, 57.0, 143.0,
+ 151.0, 14.0, 15.0, 21.0 ) );
+ float sum=0.0;
+ int i,j;
+
+ sum = sum + s.a[0][0];
+ sum = sum + s.a[0][1];
+ sum = sum + s.a[0][2];
+ sum = sum + s.a[0][3];
+ sum = sum + s.a[1][0];
+ sum = sum + s.a[1][1];
+ sum = sum + s.a[1][2];
+ sum = sum + s.a[1][3];
+ sum = sum + s.a[2][0];
+ sum = sum + s.a[2][1];
+ sum = sum + s.a[2][2];
+ sum = sum + s.a[2][3];
+ sum = sum + s.a[3][0];
+ sum = sum + s.a[3][1];
+ sum = sum + s.a[3][2];
+ sum = sum + s.a[3][3];
+
+ gl_FragColor = vec4( vec3( sum / 995.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat4_vert.vert
new file mode 100644
index 000000000..aea82c688
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat4_vert.vert
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct sabcd
+{
+ mat4 a;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(mat4(12.0, 29.0, 13.0, 26.0,
+ 71.0, 63.0, 90.0, 118.0,
+ 128.0, 44.0, 57.0, 143.0,
+ 151.0, 14.0, 15.0, 21.0 ) );
+ float sum=0.0;
+
+ sum = sum + s.a[0][0];
+ sum = sum + s.a[0][1];
+ sum = sum + s.a[0][2];
+ sum = sum + s.a[0][3];
+
+ sum = sum + s.a[1][0];
+ sum = sum + s.a[1][1];
+ sum = sum + s.a[1][2];
+ sum = sum + s.a[1][3];
+
+ sum = sum + s.a[2][0];
+ sum = sum + s.a[2][1];
+ sum = sum + s.a[2][2];
+ sum = sum + s.a[2][3];
+
+ sum = sum + s.a[3][0];
+ sum = sum + s.a[3][1];
+ sum = sum + s.a[3][2];
+ sum = sum + s.a[3][3];
+
+ color = vec4( vec3( sum / 995.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec2_frag.frag
new file mode 100644
index 000000000..a42d68747
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec2_frag.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct sabcd
+{
+ vec2 a;
+ vec2 b;
+};
+
+
+void main (void)
+{
+ sabcd s = sabcd(vec2(12.0, 29.0), vec2(13.0, 26.0) );
+
+ gl_FragColor = vec4( vec3( (s.a[0] + s.a[1] + s.b[0] + s.b[1]) / 80.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec2_vert.vert
new file mode 100644
index 000000000..a3660fe24
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec2_vert.vert
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+
+
+struct sabcd
+{
+ vec2 a;
+ vec2 b;
+};
+
+
+
+void main (void)
+{
+ sabcd s = sabcd(vec2(12.0, 29.0), vec2(13.0, 26.0) );
+ color = vec4( vec3( (s.a[0] + s.a[1] + s.b[0] + s.b[1]) / 80.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec3_frag.frag
new file mode 100644
index 000000000..6e485e966
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec3_frag.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct sabcd
+{
+ vec3 a;
+ vec3 b;
+};
+
+
+void main (void)
+{
+ sabcd s = sabcd(vec3(12.0, 29.0, 32.0), vec3(13.0, 26.0, 38.0 ) );
+
+ gl_FragColor = vec4( vec3( (s.a[0] + s.a[1] + s.a[2] + s.b[0] + s.b[1] + s.b[2]) / 150.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec3_vert.vert
new file mode 100644
index 000000000..e532d3956
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec3_vert.vert
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+
+
+struct sabcd
+{
+ vec3 a;
+ vec3 b;
+};
+
+
+
+void main (void)
+{
+ sabcd s = sabcd(vec3(12.0, 29.0, 32.0), vec3(13.0, 26.0, 38.0 ) );
+ color = vec4( vec3( (s.a[0] + s.a[1] + s.a[2] + s.b[0] + s.b[1] + s.b[2]) / 150.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec4_frag.frag
new file mode 100644
index 000000000..85d19e8ac
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec4_frag.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+struct sabcd
+{
+ vec4 a;
+ vec4 b;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(vec4(12.0, 29.0, 32.0, 47.0), vec4(13.0, 26.0, 38.0, 53.0 ) );
+ gl_FragColor = vec4( vec3( (s.a[0] + s.a[1] + s.a[2] + s.a[3] + s.b[0] + s.b[1] + s.b[2] + s.b[3]) / 250.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec4_vert.vert
new file mode 100644
index 000000000..f85a3ad87
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec4_vert.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct sabcd
+{
+ vec4 a;
+ vec4 b;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(vec4(12.0, 29.0, 32.0, 47.0), vec4(13.0, 26.0, 38.0, 53.0 ) );
+ color = vec4( vec3( (s.a[0] + s.a[1] + s.a[2] + s.a[3] + s.b[0] + s.b[1] + s.b[2] + s.b[3]) / 250.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bool_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bool_frag.frag
new file mode 100644
index 000000000..bcc8be4f7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bool_frag.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct sabcd
+{
+ bool a;
+ bool b;
+ bool c;
+ bool d;
+};
+
+
+
+void main (void)
+{
+ sabcd s1 = sabcd(bool(12), bool(0), bool(25.5), bool(0.0));
+ sabcd s2 = sabcd(bool(0.0), bool(0.0), bool(0.0), bool(0.0));
+ s2 = s1;
+ float gray = 0.0;
+ if( (s2.a==true) && (s2.b==false) && (s2.c == true) && (s2.d==false))
+ gray=1.0;
+ else
+ gray =0.0;
+ gl_FragColor = vec4(gray,gray,gray,1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bool_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bool_vert.vert
new file mode 100644
index 000000000..6a5cc91bf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bool_vert.vert
@@ -0,0 +1,55 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+
+
+struct sabcd
+{
+ bool a;
+ bool b;
+ bool c;
+ bool d;
+};
+
+
+
+void main (void)
+{
+ sabcd s1 = sabcd(bool(12), bool(0), bool(25.5), bool(0.0));
+ sabcd s2 = sabcd(bool(0.0), bool(0.0), bool(0.0), bool(0.0));
+ s2 = s1;
+ float gray = 0.0;
+ if( (s2.a==true) && (s2.b==false) && (s2.c == true) && (s2.d==false))
+ gray=1.0;
+ else
+ gray =0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_frag.frag
new file mode 100644
index 000000000..b279f0948
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_frag.frag
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct sabcd
+{
+ bvec2 a;
+ bvec3 b;
+ bvec4 c;
+};
+
+void main (void)
+{
+ sabcd s = sabcd( bvec2(12, 13), bvec3(14.0, 0.0, 139.0), bvec4(25.5, 17.0, 145, 163 ) );
+ sabcd s2 = sabcd( bvec2(0, 0), bvec3(0.0, 0.0, 0.0), bvec4(0.0, 0.0, 0.0, 0.0 ) );
+ s2 = s;
+ float gray = 0.0;
+ if( (s2.a[0]) && (s2.a[1]) && (s2.b[0]) && (!s2.b[1]) && (s2.b[2]) && (s2.c[0]) && (s2.c[1]) && (s2.c[2]) )
+ gray=1.0;
+ else
+ gray =0.0;
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_vert.vert
new file mode 100644
index 000000000..2d315fe38
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_vert.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct sabcd
+{
+ bvec2 a;
+ bvec3 b;
+ bvec4 c;
+};
+
+void main (void)
+{
+ sabcd s = sabcd( bvec2(12, 13), bvec3(14.0, 0.0, 139.0), bvec4(25.5, 17.0, 145, 163 ) );
+ sabcd s2 = sabcd( bvec2(0, 0), bvec3(0.0, 0.0, 0.0), bvec4(0.0, 0.0, 0.0, 0.0 ) );
+ s2 = s;
+ float gray = 0.0;
+ if( (s2.a[0]) && (s2.a[1]) && (s2.b[0]) && (!s2.b[1]) && (s2.b[2]) && (s2.c[0]) && (s2.c[1]) && (s2.c[2]) && (s2.c[3]) )
+ gray=1.0;
+ else
+ gray =0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_float_frag.frag
new file mode 100644
index 000000000..b685fa442
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_float_frag.frag
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct sabcd
+{
+ float a;
+ float b;
+ float c;
+ float d;
+};
+
+
+
+void main (void)
+{
+ sabcd s = sabcd(1.0, 2.0, 4.0, 8.0);
+ sabcd s2 = sabcd(0.0, 0.0, 0.0, 0.0);
+ s2 = s;
+ gl_FragColor = vec4((s.a + s.b + s.c + s.d) / 15.0, (s2.a + s2.b + s2.c + s2.d) / 15.0, 1.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_float_vert.vert
new file mode 100644
index 000000000..157e29221
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_float_vert.vert
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+
+
+struct sabcd
+{
+ float a;
+ float b;
+ float c;
+ float d;
+};
+
+
+
+void main (void)
+{
+ sabcd s = sabcd(1.0, 2.0, 4.0, 8.0);
+ sabcd s2 = sabcd(0.0, 0.0, 0.0, 0.0);
+ s2 = s;
+ color = vec4((s.a + s.b + s.c + s.d) / 15.0, (s2.a + s2.b + s2.c + s2.d) / 15.0, 1.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat2_frag.frag
new file mode 100644
index 000000000..38086d665
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat2_frag.frag
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+struct sabcd
+{
+ mat2 a;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(mat2(12.0, 29.0, 13.0, 26.0) );
+ sabcd s2 = sabcd(mat2(0.0, 0.0, 0.0, 0.0) );
+ s2 = s;
+ gl_FragColor = vec4( vec3( (s2.a[0][0] + s2.a[0][1] + s2.a[1][0] + s2.a[1][1]) / 80.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat2_vert.vert
new file mode 100644
index 000000000..9d1c3a917
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat2_vert.vert
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct sabcd
+{
+ mat2 a;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(mat2(12.0, 29.0, 13.0, 26.0) );
+ sabcd s2 = sabcd(mat2(0.0, 0.0, 0.0, 0.0) );
+ s2 = s;
+ color = vec4( vec3( (s2.a[0][0] + s2.a[0][1] + s2.a[1][0] + s2.a[1][1]) / 80.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat3_frag.frag
new file mode 100644
index 000000000..ff41c1c0f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat3_frag.frag
@@ -0,0 +1,55 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+struct sabcd
+{
+ mat3 a;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(mat3(12.0, 29.0, 13.0, 26.0, 71.0, 63.0, 90.0, 118.0, 128.0) );
+ sabcd s2 = sabcd(mat3(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) );
+ s2 = s;
+ float sum=0.0;
+ int i,j;
+
+ sum = sum + s2.a[0][0];
+ sum = sum + s2.a[0][1];
+ sum = sum + s2.a[0][2];
+ sum = sum + s2.a[1][0];
+ sum = sum + s2.a[1][1];
+ sum = sum + s2.a[1][2];
+ sum = sum + s2.a[2][0];
+ sum = sum + s2.a[2][1];
+ sum = sum + s2.a[2][2];
+
+ gl_FragColor = vec4( vec3( sum / 550.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat3_vert.vert
new file mode 100644
index 000000000..f6d8e90ff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat3_vert.vert
@@ -0,0 +1,56 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct sabcd
+{
+ mat3 a;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(mat3(12.0, 29.0, 13.0, 26.0, 71.0, 63.0, 90.0, 118.0, 128.0) );
+ sabcd s2 = sabcd(mat3(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) );
+ s2 = s;
+ float sum=0.0;
+
+ sum = sum + s2.a[0][0];
+ sum = sum + s2.a[0][1];
+ sum = sum + s2.a[0][2];
+
+ sum = sum + s2.a[1][0];
+ sum = sum + s2.a[1][1];
+ sum = sum + s2.a[1][2];
+
+ sum = sum + s2.a[2][0];
+ sum = sum + s2.a[2][1];
+ sum = sum + s2.a[2][2];
+
+ color = vec4( vec3( sum / 550.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat4_frag.frag
new file mode 100644
index 000000000..6484dd121
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat4_frag.frag
@@ -0,0 +1,68 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+struct sabcd
+{
+ mat4 a;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(mat4(12.0, 29.0, 13.0, 26.0,
+ 71.0, 63.0, 90.0, 118.0,
+ 128.0, 44.0, 57.0, 143.0,
+ 151.0, 14.0, 15.0, 21.0 ) );
+ sabcd s2 = sabcd(mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0 ) );
+ s2 = s;
+ float sum=0.0;
+ int i,j;
+
+ sum = sum + s2.a[0][0];
+ sum = sum + s2.a[0][1];
+ sum = sum + s2.a[0][2];
+ sum = sum + s2.a[0][3];
+ sum = sum + s2.a[1][0];
+ sum = sum + s2.a[1][1];
+ sum = sum + s2.a[1][2];
+ sum = sum + s2.a[1][3];
+ sum = sum + s2.a[2][0];
+ sum = sum + s2.a[2][1];
+ sum = sum + s2.a[2][2];
+ sum = sum + s2.a[2][3];
+ sum = sum + s2.a[3][0];
+ sum = sum + s2.a[3][1];
+ sum = sum + s2.a[3][2];
+ sum = sum + s2.a[3][3];
+
+ gl_FragColor = vec4( vec3( sum / 995.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat4_vert.vert
new file mode 100644
index 000000000..f01d4c9a2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat4_vert.vert
@@ -0,0 +1,70 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct sabcd
+{
+ mat4 a;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(mat4(12.0, 29.0, 13.0, 26.0,
+ 71.0, 63.0, 90.0, 118.0,
+ 128.0, 44.0, 57.0, 143.0,
+ 151.0, 14.0, 15.0, 21.0 ) );
+ sabcd s2 = sabcd(mat4(0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0 ) );
+ s2 = s;
+ float sum=0.0;
+
+ sum = sum + s2.a[0][0];
+ sum = sum + s2.a[0][1];
+ sum = sum + s2.a[0][2];
+ sum = sum + s2.a[0][3];
+
+ sum = sum + s2.a[1][0];
+ sum = sum + s2.a[1][1];
+ sum = sum + s2.a[1][2];
+ sum = sum + s2.a[1][3];
+
+ sum = sum + s2.a[2][0];
+ sum = sum + s2.a[2][1];
+ sum = sum + s2.a[2][2];
+ sum = sum + s2.a[2][3];
+
+ sum = sum + s2.a[3][0];
+ sum = sum + s2.a[3][1];
+ sum = sum + s2.a[3][2];
+ sum = sum + s2.a[3][3];
+
+ color = vec4( vec3( sum / 995.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec2_frag.frag
new file mode 100644
index 000000000..56c15b6e9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec2_frag.frag
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct sabcd
+{
+ vec2 a;
+ vec2 b;
+};
+
+
+void main (void)
+{
+ sabcd s1 = sabcd(vec2(12.0, 29.0), vec2(13.0, 26.0) );
+ sabcd s2 = sabcd(vec2(0.0, 0.0), vec2(0.0, 0.0) );
+ s2 = s1;
+ gl_FragColor = vec4( vec3( (s2.a[0] + s2.a[1] + s2.b[0] + s2.b[1]) / 80.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec2_vert.vert
new file mode 100644
index 000000000..1ec34123f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec2_vert.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+
+
+struct sabcd
+{
+ vec2 a;
+ vec2 b;
+};
+
+
+
+void main (void)
+{
+ sabcd s1 = sabcd(vec2(12.0, 29.0), vec2(13.0, 26.0) );
+ sabcd s2 = sabcd(vec2(0.0, 0.0), vec2(0.0, 0.0) );
+ s2 = s1;
+ color = vec4( vec3( (s2.a[0] + s2.a[1] + s2.b[0] + s2.b[1]) / 80.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec3_frag.frag
new file mode 100644
index 000000000..7d0530c81
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec3_frag.frag
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct sabcd
+{
+ vec3 a;
+ vec3 b;
+};
+
+
+void main (void)
+{
+ sabcd s = sabcd(vec3(12.0, 29.0, 32.0), vec3(13.0, 26.0, 38.0 ) );
+ sabcd s2 = sabcd(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0 ) );
+ s2 = s;
+ gl_FragColor = vec4( vec3( (s2.a[0] + s2.a[1] + s2.a[2] + s2.b[0] + s2.b[1] + s2.b[2]) / 150.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec3_vert.vert
new file mode 100644
index 000000000..a686f9c6d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec3_vert.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+
+
+struct sabcd
+{
+ vec3 a;
+ vec3 b;
+};
+
+
+
+void main (void)
+{
+ sabcd s1 = sabcd(vec3(12.0, 29.0, 32.0), vec3(13.0, 26.0, 38.0 ) );
+ sabcd s2 = sabcd(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0 ) );
+ s2 = s1;
+ color = vec4( vec3( (s2.a[0] + s2.a[1] + s2.a[2] + s2.b[0] + s2.b[1] + s2.b[2]) / 150.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec4_frag.frag
new file mode 100644
index 000000000..e628b8caf
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec4_frag.frag
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+struct sabcd
+{
+ vec4 a;
+ vec4 b;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(vec4(12.0, 29.0, 32.0, 47.0), vec4(13.0, 26.0, 38.0, 53.0 ) );
+ sabcd s2 = sabcd(vec4(0.0, 0.0, 0.0, 0.0), vec4(0.0, 0.0, 0.0, 0.0 ) );
+ s2 = s;
+ gl_FragColor = vec4( vec3( (s2.a[0] + s2.a[1] + s2.a[2] + s2.a[3] + s2.b[0] + s2.b[1] + s2.b[2] + s2.b[3]) / 250.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec4_vert.vert
new file mode 100644
index 000000000..70f46538a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec4_vert.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct sabcd
+{
+ vec4 a;
+ vec4 b;
+};
+
+void main (void)
+{
+ sabcd s = sabcd(vec4(12.0, 29.0, 32.0, 47.0), vec4(13.0, 26.0, 38.0, 53.0 ) );
+ sabcd s2 = sabcd(vec4(0.0, 0.0, 0.0, 0.0), vec4(0.0, 0.0, 0.0, 0.0 ) );
+ s2 = s;
+ color = vec4( vec3( (s2.a[0] + s2.a[1] + s2.a[2] + s2.a[3] + s2.b[0] + s2.b[1] + s2.b[2] + s2.b[3]) / 250.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bool_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bool_frag.frag
new file mode 100644
index 000000000..4fe547d2b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bool_frag.frag
@@ -0,0 +1,55 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct nestb
+{
+ bool b;
+};
+
+struct nesta
+{
+ bool a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta(bool(1.0), nestb(bool(0.0))));
+ float gray = 0.0;
+
+ if( (s.nest_a.a == true) && (s.nest_a.nest_b.b == false))
+ gray=1.0;
+ else
+ gray =0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bool_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bool_vert.vert
new file mode 100644
index 000000000..63e554ed5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bool_vert.vert
@@ -0,0 +1,58 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct nestb
+{
+ bool b;
+};
+
+struct nesta
+{
+ bool a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta(bool(1.0), nestb(bool(0.0))));
+ float gray = 0.0;
+
+ if( (s.nest_a.a == true) && (s.nest_a.nest_b.b == false))
+ gray=1.0;
+ else
+ gray =0.0;
+ color = vec4(gray, gray, gray, 1.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_frag.frag
new file mode 100644
index 000000000..44ad71d0e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_frag.frag
@@ -0,0 +1,71 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+struct nestb
+{
+ bvec2 a2;
+ bvec3 b2;
+ bvec4 c2;
+};
+
+struct nesta
+{
+ bvec2 a1;
+ bvec3 b1;
+ bvec4 c1;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest( nesta( bvec2(12, 13), bvec3(14.0, 0.0, 139.0), bvec4(25.5, 17.0, 145, 163 ),
+ nestb( bvec2(28, 0), bvec3(0.0, 0.0, 1.0), bvec4(0.0, 17.0, 145, 0 )
+ )
+ )
+ );
+ float gray = 0.0;
+ if( ( s.nest_a.a1[0] ) && ( s.nest_a.a1[1] ) &&
+ ( s.nest_a.b1[0] ) && (! (s.nest_a.b1[1]) ) && ( s.nest_a.b1[2] ) &&
+ ( s.nest_a.c1[0] ) && ( s.nest_a.c1[1] ) && ( s.nest_a.c1[2] ) && ( s.nest_a.c1[3] ) &&
+ ( s.nest_a.nest_b.a2[0] ) && ( !( s.nest_a.nest_b.a2[1] ) ) &&
+ (! ( s.nest_a.nest_b.b2[0] ) ) && (! ( s.nest_a.nest_b.b2[1] ) ) && (s.nest_a.nest_b.b2[2]) &&
+ (! ( s.nest_a.nest_b.c2[0] ) ) && (s.nest_a.nest_b.c2[1]) && (s.nest_a.nest_b.c2[2]) && (! ( s.nest_a.nest_b.c2[3] ) )
+ )
+ gray=1.0;
+ else
+ gray =0.0;
+
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_vert.vert
new file mode 100644
index 000000000..41485c25f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_vert.vert
@@ -0,0 +1,74 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct nestb
+{
+ bvec2 a2;
+ bvec3 b2;
+ bvec4 c2;
+};
+
+struct nesta
+{
+ bvec2 a1;
+ bvec3 b1;
+ bvec4 c1;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+
+ nest s = nest( nesta( bvec2(12, 13), bvec3(14.0, 0.0, 139.0), bvec4(25.5, 17.0, 145, 163 ),
+ nestb( bvec2(28, 0), bvec3(0.0, 0.0, 1.0), bvec4(0.0, 17.0, 145, 0 )
+ )
+ )
+ );
+
+ float gray = 0.0;
+
+ if( ( s.nest_a.a1[0] ) && ( s.nest_a.a1[1] ) &&
+ ( s.nest_a.b1[0] ) && (! (s.nest_a.b1[1]) ) && ( s.nest_a.b1[2] ) &&
+ ( s.nest_a.c1[0] ) && ( s.nest_a.c1[1] ) && ( s.nest_a.c1[2] ) && ( s.nest_a.c1[3] ) &&
+ ( s.nest_a.nest_b.a2[0] ) && ( !( s.nest_a.nest_b.a2[1] ) ) &&
+ (! ( s.nest_a.nest_b.b2[0] ) ) && (! ( s.nest_a.nest_b.b2[1] ) ) && (s.nest_a.nest_b.b2[2]) &&
+ (! ( s.nest_a.nest_b.c2[0] ) ) && (s.nest_a.nest_b.c2[1]) && (s.nest_a.nest_b.c2[2]) && (! ( s.nest_a.nest_b.c2[3] ) )
+ )
+ gray=1.0;
+ else
+ gray =0.0;
+ color = vec4(gray, gray, gray, 1.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_float_frag.frag
new file mode 100644
index 000000000..8cb2e49b0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_float_frag.frag
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct nestb
+{
+ float b;
+};
+
+struct nesta
+{
+ float a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta(1.0, nestb(2.0)));
+ gl_FragColor = vec4(vec3((s.nest_a.a + s.nest_a.nest_b.b) / 3.0), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_float_vert.vert
new file mode 100644
index 000000000..18b3353c2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_float_vert.vert
@@ -0,0 +1,51 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct nestb
+{
+ float b;
+};
+
+struct nesta
+{
+ float a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta(1.0, nestb(2.0)));
+ color = vec4(vec3((s.nest_a.a + s.nest_a.nest_b.b) / 3.0), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat2_frag.frag
new file mode 100644
index 000000000..d623090a1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat2_frag.frag
@@ -0,0 +1,51 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct nestb
+{
+ mat2 b;
+};
+
+struct nesta
+{
+ mat2 a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta( mat2(11, 13, 29, 33), nestb( mat2(12, 19, 79, 81) ) ) );
+
+
+ gl_FragColor = vec4( vec3( (s.nest_a.a[0][0] + s.nest_a.a[0][1] + s.nest_a.a[1][0] + s.nest_a.a[1][1] + s.nest_a.nest_b.b[0][0] + s.nest_a.nest_b.b[0][1] + s.nest_a.nest_b.b[1][0] + s.nest_a.nest_b.b[1][1] ) / 277.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat2_vert.vert
new file mode 100644
index 000000000..770b63d74
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat2_vert.vert
@@ -0,0 +1,51 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct nestb
+{
+ mat2 b;
+};
+
+struct nesta
+{
+ mat2 a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta( mat2(11, 13, 29, 33), nestb( mat2(12, 19, 79, 81) ) ) );
+ color = vec4( vec3( (s.nest_a.a[0][0] + s.nest_a.a[0][1] + s.nest_a.a[1][0] + s.nest_a.a[1][1] + s.nest_a.nest_b.b[0][0] + s.nest_a.nest_b.b[0][1] + s.nest_a.nest_b.b[1][0] + s.nest_a.nest_b.b[1][1] ) / 277.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat3_frag.frag
new file mode 100644
index 000000000..5a963a931
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat3_frag.frag
@@ -0,0 +1,79 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct nestb
+{
+ mat3 b;
+};
+
+struct nesta
+{
+ mat3 a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta( mat3(11, 13, 29, 33, 63, 13, 49, 57, 71), nestb( mat3(12, 19, 79, 81, 35, 51, 73, 66, 23) ) ) );
+ float sum1=0.0,sum2=0.0;
+ int i,j;
+
+ sum1 = sum1 + s.nest_a.a[0][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][0];
+
+ sum1 = sum1 + s.nest_a.a[0][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][1];
+
+ sum1 = sum1 + s.nest_a.a[0][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][2];
+
+ sum1 = sum1 + s.nest_a.a[1][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][0];
+
+ sum1 = sum1 + s.nest_a.a[1][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][1];
+
+ sum1 = sum1 + s.nest_a.a[1][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][2];
+
+ sum1 = sum1 + s.nest_a.a[2][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][0];
+
+ sum1 = sum1 + s.nest_a.a[2][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][1];
+
+ sum1 = sum1 + s.nest_a.a[2][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][2];
+
+ gl_FragColor = vec4( vec3( ( sum1 + sum2 )/ 778.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat3_vert.vert
new file mode 100644
index 000000000..25bd7cd2f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat3_vert.vert
@@ -0,0 +1,74 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct nestb
+{
+ mat3 b;
+};
+
+struct nesta
+{
+ mat3 a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta( mat3(11, 13, 29, 33, 63, 13, 49, 57, 71), nestb( mat3(12, 19, 79, 81, 35, 51, 73, 66, 23) ) ) );
+ float sum1=0.0,sum2=0.0;
+
+ sum1 = sum1 + s.nest_a.a[0][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][0];
+ sum1 = sum1 + s.nest_a.a[0][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][1];
+ sum1 = sum1 + s.nest_a.a[0][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][2];
+
+ sum1 = sum1 + s.nest_a.a[1][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][0];
+ sum1 = sum1 + s.nest_a.a[1][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][1];
+ sum1 = sum1 + s.nest_a.a[1][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][2];
+
+ sum1 = sum1 + s.nest_a.a[2][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][0];
+ sum1 = sum1 + s.nest_a.a[2][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][1];
+ sum1 = sum1 + s.nest_a.a[2][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][2];
+
+ color = vec4( vec3( ( sum1 + sum2 )/ 778.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat4_frag.frag
new file mode 100644
index 000000000..016621419
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat4_frag.frag
@@ -0,0 +1,100 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct nestb
+{
+ mat4 b;
+};
+
+struct nesta
+{
+ mat4 a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta( mat4(11, 13, 29, 33, 63, 13, 49, 57, 71, 47, 91, 101, 167, 21, 39, 41), nestb( mat4(12, 19, 79, 81, 35, 51, 73, 66, 23, 134, 121, 156, 76, 23, 24, 78) ) ) );
+ float sum1=0.0,sum2=0.0;
+ int i,j;
+
+ sum1 = sum1 + s.nest_a.a[0][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][0];
+
+ sum1 = sum1 + s.nest_a.a[0][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][1];
+
+ sum1 = sum1 + s.nest_a.a[0][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][2];
+
+ sum1 = sum1 + s.nest_a.a[0][3];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][3];
+
+ sum1 = sum1 + s.nest_a.a[1][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][0];
+
+ sum1 = sum1 + s.nest_a.a[1][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][1];
+
+ sum1 = sum1 + s.nest_a.a[1][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][2];
+
+ sum1 = sum1 + s.nest_a.a[1][3];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][3];
+
+ sum1 = sum1 + s.nest_a.a[2][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][0];
+
+ sum1 = sum1 + s.nest_a.a[2][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][1];
+
+ sum1 = sum1 + s.nest_a.a[2][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][2];
+
+ sum1 = sum1 + s.nest_a.a[2][3];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][3];
+
+ sum1 = sum1 + s.nest_a.a[3][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[3][0];
+
+ sum1 = sum1 + s.nest_a.a[3][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[3][1];
+
+ sum1 = sum1 + s.nest_a.a[3][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[3][2];
+
+ sum1 = sum1 + s.nest_a.a[3][3];
+ sum2 = sum2 + s.nest_a.nest_b.b[3][3];
+
+ gl_FragColor = vec4( vec3( ( sum1 + sum2 )/ 1897.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat4_vert.vert
new file mode 100644
index 000000000..d1aeb61c8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat4_vert.vert
@@ -0,0 +1,89 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct nestb
+{
+ mat4 b;
+};
+
+struct nesta
+{
+ mat4 a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta( mat4(11, 13, 29, 33, 63, 13, 49, 57, 71, 47, 91, 101, 167, 21, 39, 41), nestb( mat4(12, 19, 79, 81, 35, 51, 73, 66, 23, 134, 121, 156, 76, 23, 24, 78) ) ) );
+ float sum1=0.0,sum2=0.0;
+
+ sum1 = sum1 + s.nest_a.a[0][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][0];
+ sum1 = sum1 + s.nest_a.a[0][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][1];
+ sum1 = sum1 + s.nest_a.a[0][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][2];
+ sum1 = sum1 + s.nest_a.a[0][3];
+ sum2 = sum2 + s.nest_a.nest_b.b[0][3];
+
+ sum1 = sum1 + s.nest_a.a[1][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][0];
+ sum1 = sum1 + s.nest_a.a[1][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][1];
+ sum1 = sum1 + s.nest_a.a[1][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][2];
+ sum1 = sum1 + s.nest_a.a[1][3];
+ sum2 = sum2 + s.nest_a.nest_b.b[1][3];
+
+ sum1 = sum1 + s.nest_a.a[2][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][0];
+ sum1 = sum1 + s.nest_a.a[2][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][1];
+ sum1 = sum1 + s.nest_a.a[2][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][2];
+ sum1 = sum1 + s.nest_a.a[2][3];
+ sum2 = sum2 + s.nest_a.nest_b.b[2][3];
+
+ sum1 = sum1 + s.nest_a.a[3][0];
+ sum2 = sum2 + s.nest_a.nest_b.b[3][0];
+ sum1 = sum1 + s.nest_a.a[3][1];
+ sum2 = sum2 + s.nest_a.nest_b.b[3][1];
+ sum1 = sum1 + s.nest_a.a[3][2];
+ sum2 = sum2 + s.nest_a.nest_b.b[3][2];
+ sum1 = sum1 + s.nest_a.a[3][3];
+ sum2 = sum2 + s.nest_a.nest_b.b[3][3];
+
+ color = vec4( vec3( ( sum1 + sum2 )/ 1897.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec2_frag.frag
new file mode 100644
index 000000000..9beed3ac4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec2_frag.frag
@@ -0,0 +1,50 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct nestb
+{
+ vec2 b;
+};
+
+struct nesta
+{
+ vec2 a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta(vec2(11, 13), nestb(vec2(12, 19) ) ) );
+
+ gl_FragColor = vec4( vec3( (s.nest_a.a[0] + s.nest_a.a[1] + s.nest_a.nest_b.b[0] + s.nest_a.nest_b.b[1] ) / 55.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec2_vert.vert
new file mode 100644
index 000000000..d9db7a357
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec2_vert.vert
@@ -0,0 +1,51 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct nestb
+{
+ vec2 b;
+};
+
+struct nesta
+{
+ vec2 a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta(vec2(11, 13), nestb(vec2(12, 19) ) ) );
+ color = vec4( vec3( (s.nest_a.a[0] + s.nest_a.a[1] + s.nest_a.nest_b.b[0] + s.nest_a.nest_b.b[1] ) / 55.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec3_frag.frag
new file mode 100644
index 000000000..6f2308257
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec3_frag.frag
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct nestb
+{
+ vec3 b;
+};
+
+struct nesta
+{
+ vec3 a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta(vec3(11, 13, 17), nestb(vec3(12, 19, 29) ) ) );
+ gl_FragColor = vec4( vec3( (s.nest_a.a[0] + s.nest_a.a[1] + s.nest_a.a[2] + s.nest_a.nest_b.b[0] + s.nest_a.nest_b.b[1] + s.nest_a.nest_b.b[2]) / 101.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec3_vert.vert
new file mode 100644
index 000000000..b07d8f1fb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec3_vert.vert
@@ -0,0 +1,51 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct nestb
+{
+ vec3 b;
+};
+
+struct nesta
+{
+ vec3 a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta(vec3(11, 13, 17), nestb(vec3(12, 19, 29) ) ) );
+ color = vec4( vec3( (s.nest_a.a[0] + s.nest_a.a[1] + s.nest_a.a[2] + s.nest_a.nest_b.b[0] + s.nest_a.nest_b.b[1] + s.nest_a.nest_b.b[2]) / 101.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec4_frag.frag
new file mode 100644
index 000000000..0d365ea01
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec4_frag.frag
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+struct nestb
+{
+ vec4 b;
+};
+
+struct nesta
+{
+ vec4 a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta(vec4(11, 13, 17, 31), nestb(vec4(12, 19, 29, 69) ) ) );
+ gl_FragColor = vec4( vec3( (s.nest_a.a[0] + s.nest_a.a[1] + s.nest_a.a[2] + s.nest_a.a[3] + s.nest_a.nest_b.b[0] + s.nest_a.nest_b.b[1] + s.nest_a.nest_b.b[2] + s.nest_a.nest_b.b[3]) / 201.0 ), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec4_vert.vert
new file mode 100644
index 000000000..7dae13b12
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec4_vert.vert
@@ -0,0 +1,51 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+struct nestb
+{
+ vec4 b;
+};
+
+struct nesta
+{
+ vec4 a;
+ nestb nest_b;
+};
+
+struct nest
+{
+ nesta nest_a;
+};
+
+void main (void)
+{
+ nest s = nest(nesta(vec4(11, 13, 17, 31), nestb(vec4(12, 19, 29, 69) ) ) );
+ color = vec4( vec3( (s.nest_a.a[0] + s.nest_a.a[1] + s.nest_a.a[2] + s.nest_a.a[3] + s.nest_a.nest_b.b[0] + s.nest_a.nest_b.b[1] + s.nest_a.nest_b.b[2] + s.nest_a.nest_b.b[3]) / 201.0 ), 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/input.run.txt
new file mode 100644
index 000000000..11fe45566
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/input.run.txt
@@ -0,0 +1,16 @@
+# this file is auto-generated. DO NOT EDIT.
+swizzlers_001_to_008.html
+swizzlers_009_to_016.html
+swizzlers_017_to_024.html
+swizzlers_025_to_032.html
+swizzlers_033_to_040.html
+swizzlers_041_to_048.html
+swizzlers_049_to_056.html
+swizzlers_057_to_064.html
+swizzlers_065_to_072.html
+swizzlers_073_to_080.html
+swizzlers_081_to_088.html
+swizzlers_089_to_096.html
+swizzlers_097_to_104.html
+swizzlers_105_to_112.html
+swizzlers_113_to_120.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_001_to_008.html
new file mode 100644
index 000000000..3dbab0368
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_001_to_008.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_xyzw_1vec4_frag.frag"
+ },
+ "name": "vec4_xyzw_1vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_xyzw_1vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_xyzw_1vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_zwxy_1vec4_frag.frag"
+ },
+ "name": "vec4_zwxy_1vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_zwxy_1vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_zwxy_1vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_yxwz_1vec4_frag.frag"
+ },
+ "name": "vec4_yxwz_1vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_yxwz_1vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_yxwz_1vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_wxzy_1vec4_frag.frag"
+ },
+ "name": "vec4_wxzy_1vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_wxzy_1vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_wxzy_1vec4_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_009_to_016.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_009_to_016.html
new file mode 100644
index 000000000..f6ae7de75
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_009_to_016.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_009_to_016.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_xyz_w_1vec3_1float_frag.frag"
+ },
+ "name": "vec4_xyz_w_1vec3_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_xyz_w_1vec3_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_xyz_w_1vec3_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_zwx_y_1vec3_1float_frag.frag"
+ },
+ "name": "vec4_zwx_y_1vec3_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_zwx_y_1vec3_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_zwx_y_1vec3_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_yxw_z_1vec3_1float_frag.frag"
+ },
+ "name": "vec4_yxw_z_1vec3_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_yxw_z_1vec3_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_yxw_z_1vec3_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_wxz_y_1vec3_1float_frag.frag"
+ },
+ "name": "vec4_wxz_y_1vec3_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_wxz_y_1vec3_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_wxz_y_1vec3_1float_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_017_to_024.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_017_to_024.html
new file mode 100644
index 000000000..d28985800
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_017_to_024.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_017_to_024.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_xy_zw_2vec2_frag.frag"
+ },
+ "name": "vec4_xy_zw_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_xy_zw_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_xy_zw_2vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_zx_wy_2vec2_frag.frag"
+ },
+ "name": "vec4_zx_wy_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_zx_wy_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_zx_wy_2vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_yx_wz_2vec2_frag.frag"
+ },
+ "name": "vec4_yx_wz_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_yx_wz_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_yx_wz_2vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_wx_zy_2vec2_frag.frag"
+ },
+ "name": "vec4_wx_zy_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_wx_zy_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_wx_zy_2vec2_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_025_to_032.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_025_to_032.html
new file mode 100644
index 000000000..6ec581ca6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_025_to_032.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_025_to_032.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_x_y_z_w_4float_frag.frag"
+ },
+ "name": "vec4_x_y_z_w_4float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_x_y_z_w_4float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_x_y_z_w_4float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_xyz_1vec3_frag.frag"
+ },
+ "name": "vec3_xyz_1vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_xyz_1vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_xyz_1vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_yxz_1vec3_frag.frag"
+ },
+ "name": "vec3_yxz_1vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_yxz_1vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_yxz_1vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_zyx_1vec3_frag.frag"
+ },
+ "name": "vec3_zyx_1vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_zyx_1vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_zyx_1vec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_033_to_040.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_033_to_040.html
new file mode 100644
index 000000000..8850421ce
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_033_to_040.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_033_to_040.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_xy_z_1vec2_1float_frag.frag"
+ },
+ "name": "vec3_xy_z_1vec2_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_xy_z_1vec2_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_xy_z_1vec2_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_xz_y_1vec2_1float_frag.frag"
+ },
+ "name": "vec3_xz_y_1vec2_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_xz_y_1vec2_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_xz_y_1vec2_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_yz_x_1vec2_1float_frag.frag"
+ },
+ "name": "vec3_yz_x_1vec2_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_yz_x_1vec2_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_yz_x_1vec2_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_zx_y_1vec2_1float_frag.frag"
+ },
+ "name": "vec3_zx_y_1vec2_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_zx_y_1vec2_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_zx_y_1vec2_1float_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_041_to_048.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_041_to_048.html
new file mode 100644
index 000000000..7f534fc21
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_041_to_048.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_041_to_048.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_rgba_1vec4_frag.frag"
+ },
+ "name": "vec4_rgba_1vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_rgba_1vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_rgba_1vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_barg_1vec4_frag.frag"
+ },
+ "name": "vec4_barg_1vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_barg_1vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_barg_1vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_grab_1vec4_frag.frag"
+ },
+ "name": "vec4_grab_1vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_grab_1vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_grab_1vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_arbg_1vec4_frag.frag"
+ },
+ "name": "vec4_arbg_1vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_arbg_1vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_arbg_1vec4_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_049_to_056.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_049_to_056.html
new file mode 100644
index 000000000..9440071fb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_049_to_056.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_049_to_056.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_rgb_a_1vec3_1float_frag.frag"
+ },
+ "name": "vec4_rgb_a_1vec3_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_rgb_a_1vec3_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_rgb_a_1vec3_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_bar_g_1vec3_1float_frag.frag"
+ },
+ "name": "vec4_bar_g_1vec3_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_bar_g_1vec3_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_bar_g_1vec3_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_gra_b_1vec3_1float_frag.frag"
+ },
+ "name": "vec4_gra_b_1vec3_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_gra_b_1vec3_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_gra_b_1vec3_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_arb_g_1vec3_1float_frag.frag"
+ },
+ "name": "vec4_arb_g_1vec3_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_arb_g_1vec3_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_arb_g_1vec3_1float_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_057_to_064.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_057_to_064.html
new file mode 100644
index 000000000..aca148e59
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_057_to_064.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_057_to_064.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_rg_ba_2vec2_frag.frag"
+ },
+ "name": "vec4_rg_ba_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_rg_ba_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_rg_ba_2vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_br_ag_2vec2_frag.frag"
+ },
+ "name": "vec4_br_ag_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_br_ag_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_br_ag_2vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_gr_ab_2vec2_frag.frag"
+ },
+ "name": "vec4_gr_ab_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_gr_ab_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_gr_ab_2vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_ar_bg_2vec2_frag.frag"
+ },
+ "name": "vec4_ar_bg_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_ar_bg_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_ar_bg_2vec2_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_065_to_072.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_065_to_072.html
new file mode 100644
index 000000000..270a5c7ee
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_065_to_072.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_065_to_072.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_r_g_b_a_4float_frag.frag"
+ },
+ "name": "vec4_r_g_b_a_4float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_r_g_b_a_4float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_r_g_b_a_4float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_rgb_1vec3_frag.frag"
+ },
+ "name": "vec3_rgb_1vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_rgb_1vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_rgb_1vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_grb_1vec3_frag.frag"
+ },
+ "name": "vec3_grb_1vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_grb_1vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_grb_1vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_bgr_1vec3_frag.frag"
+ },
+ "name": "vec3_bgr_1vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_bgr_1vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_bgr_1vec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_073_to_080.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_073_to_080.html
new file mode 100644
index 000000000..7f21df7c4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_073_to_080.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_073_to_080.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_rg_b_1vec2_1float_frag.frag"
+ },
+ "name": "vec3_rg_b_1vec2_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_rg_b_1vec2_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_rg_b_1vec2_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_rb_g_1vec2_1float_frag.frag"
+ },
+ "name": "vec3_rb_g_1vec2_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_rb_g_1vec2_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_rb_g_1vec2_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_gb_r_1vec2_1float_frag.frag"
+ },
+ "name": "vec3_gb_r_1vec2_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_gb_r_1vec2_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_gb_r_1vec2_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_br_g_1vec2_1float_frag.frag"
+ },
+ "name": "vec3_br_g_1vec2_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_br_g_1vec2_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_br_g_1vec2_1float_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_081_to_088.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_081_to_088.html
new file mode 100644
index 000000000..3ae60cb43
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_081_to_088.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_081_to_088.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_stpq_1vec4_frag.frag"
+ },
+ "name": "vec4_stpq_1vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_stpq_1vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_stpq_1vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_pqst_1vec4_frag.frag"
+ },
+ "name": "vec4_pqst_1vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_pqst_1vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_pqst_1vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_tsqp_1vec4_frag.frag"
+ },
+ "name": "vec4_tsqp_1vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_tsqp_1vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_tsqp_1vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_qspt_1vec4_frag.frag"
+ },
+ "name": "vec4_qspt_1vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_qspt_1vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_qspt_1vec4_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_089_to_096.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_089_to_096.html
new file mode 100644
index 000000000..1659c8603
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_089_to_096.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_089_to_096.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_stp_q_1vec3_1float_frag.frag"
+ },
+ "name": "vec4_stp_q_1vec3_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_stp_q_1vec3_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_stp_q_1vec3_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_pqs_t_1vec3_1float_frag.frag"
+ },
+ "name": "vec4_pqs_t_1vec3_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_pqs_t_1vec3_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_pqs_t_1vec3_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_tsq_p_1vec3_1float_frag.frag"
+ },
+ "name": "vec4_tsq_p_1vec3_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_tsq_p_1vec3_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_tsq_p_1vec3_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_qsp_t_1vec3_1float_frag.frag"
+ },
+ "name": "vec4_qsp_t_1vec3_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_qsp_t_1vec3_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_qsp_t_1vec3_1float_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_097_to_104.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_097_to_104.html
new file mode 100644
index 000000000..9660f8faa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_097_to_104.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_097_to_104.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_st_pq_2vec2_frag.frag"
+ },
+ "name": "vec4_st_pq_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_st_pq_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_st_pq_2vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_ps_qt_2vec2_frag.frag"
+ },
+ "name": "vec4_ps_qt_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_ps_qt_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_ps_qt_2vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_ts_qp_2vec2_frag.frag"
+ },
+ "name": "vec4_ts_qp_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_ts_qp_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_ts_qp_2vec2_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_qs_pt_2vec2_frag.frag"
+ },
+ "name": "vec4_qs_pt_2vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_qs_pt_2vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_qs_pt_2vec2_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_105_to_112.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_105_to_112.html
new file mode 100644
index 000000000..4d0e7a50e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_105_to_112.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_105_to_112.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_s_t_p_q_4float_frag.frag"
+ },
+ "name": "vec4_s_t_p_q_4float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec4_s_t_p_q_4float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_s_t_p_q_4float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_stp_1vec3_frag.frag"
+ },
+ "name": "vec3_stp_1vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_stp_1vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_stp_1vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_tsp_1vec3_frag.frag"
+ },
+ "name": "vec3_tsp_1vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_tsp_1vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_tsp_1vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_pts_1vec3_frag.frag"
+ },
+ "name": "vec3_pts_1vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_pts_1vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_pts_1vec3_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_113_to_120.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_113_to_120.html
new file mode 100644
index 000000000..6cd1a8619
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_113_to_120.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: swizzlers_113_to_120.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_st_p_1vec2_1float_frag.frag"
+ },
+ "name": "vec3_st_p_1vec2_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_st_p_1vec2_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_st_p_1vec2_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_sp_t_1vec2_1float_frag.frag"
+ },
+ "name": "vec3_sp_t_1vec2_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_sp_t_1vec2_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_sp_t_1vec2_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_tp_s_1vec2_1float_frag.frag"
+ },
+ "name": "vec3_tp_s_1vec2_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_tp_s_1vec2_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_tp_s_1vec2_1float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_ps_t_1vec2_1float_frag.frag"
+ },
+ "name": "vec3_ps_t_1vec2_1float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "vec3_ps_t_1vec2_1float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_ps_t_1vec2_1float_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_bgr_1vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_bgr_1vec3_frag.frag
new file mode 100644
index 000000000..4729f7efe
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_bgr_1vec3_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.rgb;
+ vec3 t = m.bgr;
+ vec4 a = vec4(t.b, t.g, t.r ,al.a);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_bgr_1vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_bgr_1vec3_vert.vert
new file mode 100644
index 000000000..b4caea0ee
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_bgr_1vec3_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.rgb;
+ vec3 t = m.bgr;
+ vec4 a = vec4(t.b, t.g, t.r, lightloc.a);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_br_g_1vec2_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_br_g_1vec2_1float_frag.frag
new file mode 100644
index 000000000..94b618626
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_br_g_1vec2_1float_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.rgb;
+ float k = m.g;
+ vec2 n = m.br;
+ vec4 a = vec4(n.g, k, n.r, al.a);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_br_g_1vec2_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_br_g_1vec2_1float_vert.vert
new file mode 100644
index 000000000..615ad13e2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_br_g_1vec2_1float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.rgb;
+ vec2 t = m.br;
+ float k = m.g;
+ vec4 a = vec4(t.g, k, t.r, lightloc.a);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_gb_r_1vec2_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_gb_r_1vec2_1float_frag.frag
new file mode 100644
index 000000000..2b5c4c13b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_gb_r_1vec2_1float_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.rgb;
+ float k = m.r;
+ vec2 n = m.gb;
+ vec4 a = vec4(k, n.r, n.g, al.a);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_gb_r_1vec2_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_gb_r_1vec2_1float_vert.vert
new file mode 100644
index 000000000..99ea09fc4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_gb_r_1vec2_1float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.rgb;
+ vec2 t = m.gb;
+ float k = m.r;
+ vec4 a = vec4(k, t.r, t.g, lightloc.a);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_grb_1vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_grb_1vec3_frag.frag
new file mode 100644
index 000000000..18cac5c00
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_grb_1vec3_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.rgb;
+ vec3 t = m.grb;
+ vec4 a = vec4(t.g, t.r, t.b ,al.a);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_grb_1vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_grb_1vec3_vert.vert
new file mode 100644
index 000000000..1b87fd842
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_grb_1vec3_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.rgb;
+ vec3 t = m.grb;
+ vec4 a = vec4(t.g, t.r, t.b, lightloc.a);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_ps_t_1vec2_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_ps_t_1vec2_1float_frag.frag
new file mode 100644
index 000000000..9519bcd1b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_ps_t_1vec2_1float_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.stp;
+ float k = m.t;
+ vec2 n = m.ps;
+ vec4 a = vec4(n.t, k, n.s, al.q);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_ps_t_1vec2_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_ps_t_1vec2_1float_vert.vert
new file mode 100644
index 000000000..9ad785eda
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_ps_t_1vec2_1float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.stp;
+ vec2 t = m.ps;
+ float k = m.t;
+ vec4 a = vec4(t.t, k, t.s, lightloc.q);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_pts_1vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_pts_1vec3_frag.frag
new file mode 100644
index 000000000..2ae097c64
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_pts_1vec3_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.stp;
+ vec3 t = m.pts;
+ vec4 a = vec4(t.p, t.t, t.s ,al.q);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_pts_1vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_pts_1vec3_vert.vert
new file mode 100644
index 000000000..56dd2a5fd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_pts_1vec3_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.stp;
+ vec3 t = m.pts;
+ vec4 a = vec4(t.p, t.t, t.s, lightloc.q);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rb_g_1vec2_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rb_g_1vec2_1float_frag.frag
new file mode 100644
index 000000000..adf904288
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rb_g_1vec2_1float_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.rgb;
+ float k = m.g;
+ vec2 n = m.rb;
+ vec4 a = vec4(n.r, k, n.g, al.a);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rb_g_1vec2_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rb_g_1vec2_1float_vert.vert
new file mode 100644
index 000000000..eba6b3337
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rb_g_1vec2_1float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.rgb;
+ vec2 t = m.rb;
+ float k = m.g;
+ vec4 a = vec4(t.r, k, t.g, lightloc.a);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rg_b_1vec2_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rg_b_1vec2_1float_frag.frag
new file mode 100644
index 000000000..25429ea75
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rg_b_1vec2_1float_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.rgb;
+ float k = m.b;
+ vec2 n = m.rg;
+ vec4 a = vec4(n, k, al.a);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rg_b_1vec2_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rg_b_1vec2_1float_vert.vert
new file mode 100644
index 000000000..ff44c4bd3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rg_b_1vec2_1float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.rgb;
+ vec2 t = m.rg;
+ float k = m.b;
+ vec4 a = vec4(t, k, lightloc.a);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rgb_1vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rgb_1vec3_frag.frag
new file mode 100644
index 000000000..6c783be7d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rgb_1vec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.rgb;
+ vec4 a = vec4(m.rgb,al.a);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rgb_1vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rgb_1vec3_vert.vert
new file mode 100644
index 000000000..3cbb049d6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rgb_1vec3_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.rgb;
+ vec4 a = vec4(m.rgb,lightloc.a);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_sp_t_1vec2_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_sp_t_1vec2_1float_frag.frag
new file mode 100644
index 000000000..108d85653
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_sp_t_1vec2_1float_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.stp;
+ float k = m.t;
+ vec2 n = m.sp;
+ vec4 a = vec4(n.s, k, n.t, al.q);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_sp_t_1vec2_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_sp_t_1vec2_1float_vert.vert
new file mode 100644
index 000000000..4f3327c74
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_sp_t_1vec2_1float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.stp;
+ vec2 t = m.sp;
+ float k = m.t;
+ vec4 a = vec4(t.s, k, t.t, lightloc.q);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_st_p_1vec2_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_st_p_1vec2_1float_frag.frag
new file mode 100644
index 000000000..aee4b3ddd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_st_p_1vec2_1float_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.stp;
+ float k = m.p;
+ vec2 n = m.st;
+ vec4 a = vec4(n, k, al.q);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_st_p_1vec2_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_st_p_1vec2_1float_vert.vert
new file mode 100644
index 000000000..240354816
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_st_p_1vec2_1float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.stp;
+ vec2 t = m.st;
+ float k = m.p;
+ vec4 a = vec4(t, k, lightloc.q);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_stp_1vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_stp_1vec3_frag.frag
new file mode 100644
index 000000000..a363ee8b4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_stp_1vec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.stp;
+ vec4 a = vec4(m.stp,al.q);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_stp_1vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_stp_1vec3_vert.vert
new file mode 100644
index 000000000..985e8f298
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_stp_1vec3_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.stp;
+ vec4 a = vec4(m.stp,lightloc.q);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tp_s_1vec2_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tp_s_1vec2_1float_frag.frag
new file mode 100644
index 000000000..68c116336
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tp_s_1vec2_1float_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.stp;
+ float k = m.s;
+ vec2 n = m.tp;
+ vec4 a = vec4(k, n.s, n.t, al.q);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tp_s_1vec2_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tp_s_1vec2_1float_vert.vert
new file mode 100644
index 000000000..c6f48a25f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tp_s_1vec2_1float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.stp;
+ vec2 t = m.tp;
+ float k = m.s;
+ vec4 a = vec4(k, t.s, t.t, lightloc.q);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tsp_1vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tsp_1vec3_frag.frag
new file mode 100644
index 000000000..8eb24f2e5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tsp_1vec3_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.stp;
+ vec3 t = m.tsp;
+ vec4 a = vec4(t.t, t.s, t.p ,al.q);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tsp_1vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tsp_1vec3_vert.vert
new file mode 100644
index 000000000..0a031f395
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tsp_1vec3_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.stp;
+ vec3 t = m.tsp;
+ vec4 a = vec4(t.t, t.s, t.p, lightloc.q);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xy_z_1vec2_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xy_z_1vec2_1float_frag.frag
new file mode 100644
index 000000000..0b3e4b8b8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xy_z_1vec2_1float_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.xyz;
+ float k = m.z;
+ vec2 n = m.xy;
+ vec4 a = vec4(n, k, al.w);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xy_z_1vec2_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xy_z_1vec2_1float_vert.vert
new file mode 100644
index 000000000..03451256c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xy_z_1vec2_1float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.xyz;
+ vec2 t = m.xy;
+ float k = m.z;
+ vec4 a = vec4(t, k, lightloc.w);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xyz_1vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xyz_1vec3_frag.frag
new file mode 100644
index 000000000..20b6a6ba7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xyz_1vec3_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.xyz;
+ vec4 a = vec4(m.xyz,al.w);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xyz_1vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xyz_1vec3_vert.vert
new file mode 100644
index 000000000..ab46b50ff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xyz_1vec3_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.xyz;
+ vec4 a = vec4(m.xyz,lightloc.w);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xz_y_1vec2_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xz_y_1vec2_1float_frag.frag
new file mode 100644
index 000000000..e80787db2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xz_y_1vec2_1float_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.xyz;
+ float k = m.y;
+ vec2 n = m.xz;
+ vec4 a = vec4(n.x, k, n.y, al.w);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xz_y_1vec2_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xz_y_1vec2_1float_vert.vert
new file mode 100644
index 000000000..d747725f3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xz_y_1vec2_1float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.xyz;
+ vec2 t = m.xz;
+ float k = m.y;
+ vec4 a = vec4(t.x, k, t.y, lightloc.w);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yxz_1vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yxz_1vec3_frag.frag
new file mode 100644
index 000000000..940a5f2c9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yxz_1vec3_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.xyz;
+ vec3 t = m.yxz;
+ vec4 a = vec4(t.y, t.x, t.z ,al.w);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yxz_1vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yxz_1vec3_vert.vert
new file mode 100644
index 000000000..ebe9e6e63
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yxz_1vec3_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.xyz;
+ vec3 t = m.yxz;
+ vec4 a = vec4(t.y, t.x, t.z, lightloc.w);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yz_x_1vec2_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yz_x_1vec2_1float_frag.frag
new file mode 100644
index 000000000..736e53ef9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yz_x_1vec2_1float_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.xyz;
+ float k = m.x;
+ vec2 n = m.yz;
+ vec4 a = vec4(k, n.x, n.y, al.w);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yz_x_1vec2_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yz_x_1vec2_1float_vert.vert
new file mode 100644
index 000000000..4e43c5be2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yz_x_1vec2_1float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.xyz;
+ vec2 t = m.yz;
+ float k = m.x;
+ vec4 a = vec4(k, t.x, t.y, lightloc.w);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zx_y_1vec2_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zx_y_1vec2_1float_frag.frag
new file mode 100644
index 000000000..18d845ea5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zx_y_1vec2_1float_frag.frag
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.xyz;
+ float k = m.y;
+ vec2 n = m.zx;
+ vec4 a = vec4(n.y, k, n.x, al.w);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zx_y_1vec2_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zx_y_1vec2_1float_vert.vert
new file mode 100644
index 000000000..121ca1f67
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zx_y_1vec2_1float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.xyz;
+ vec2 t = m.zx;
+ float k = m.y;
+ vec4 a = vec4(t.y, k, t.x, lightloc.w);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zyx_1vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zyx_1vec3_frag.frag
new file mode 100644
index 000000000..925cef8fa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zyx_1vec3_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.xyz;
+ vec3 t = m.zyx;
+ vec4 a = vec4(t.z, t.y, t.x ,al.w);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zyx_1vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zyx_1vec3_vert.vert
new file mode 100644
index 000000000..aa1f2e2d1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zyx_1vec3_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.xyz;
+ vec3 t = m.zyx;
+ vec4 a = vec4(t.z, t.y, t.x, lightloc.w);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ar_bg_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ar_bg_2vec2_frag.frag
new file mode 100644
index 000000000..70f238c7b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ar_bg_2vec2_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec2 m = al.ar;
+ vec2 n = al.bg;
+ vec4 a = vec4(m.g, n.g, n.r, m.r);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ar_bg_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ar_bg_2vec2_vert.vert
new file mode 100644
index 000000000..4994e1093
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ar_bg_2vec2_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec2 m = lightloc.ar;
+ vec2 n = lightloc.bg;
+ vec4 a = vec4(m.g, n.g, n.r, m.r);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arb_g_1vec3_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arb_g_1vec3_1float_frag.frag
new file mode 100644
index 000000000..ec8c9ef38
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arb_g_1vec3_1float_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.arb;
+ float g = al.g;
+ vec4 a = vec4(m.g, g, m.b, m.r);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arb_g_1vec3_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arb_g_1vec3_1float_vert.vert
new file mode 100644
index 000000000..fe1e74fed
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arb_g_1vec3_1float_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.arb;
+ float g = lightloc.g;
+ vec4 a = vec4(m.g, g, m.b, m.r);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arbg_1vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arbg_1vec4_frag.frag
new file mode 100644
index 000000000..673828ad4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arbg_1vec4_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec4 m = al.arbg;
+ vec4 a = vec4(m.g, m.a, m.b, m.r);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arbg_1vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arbg_1vec4_vert.vert
new file mode 100644
index 000000000..e384b19ca
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arbg_1vec4_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec4 m = lightloc.arbg;
+ vec4 a = vec4(m.g, m.a, m.b, m.r);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_bar_g_1vec3_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_bar_g_1vec3_1float_frag.frag
new file mode 100644
index 000000000..23edf0e74
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_bar_g_1vec3_1float_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.bar;
+ float g = al.g;
+ vec4 a = vec4(m.b, g, m.r, m.g);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_bar_g_1vec3_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_bar_g_1vec3_1float_vert.vert
new file mode 100644
index 000000000..ab8b2b2dc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_bar_g_1vec3_1float_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.bar;
+ float g = lightloc.g;
+ vec4 a = vec4(m.b, g, m.r, m.g);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_barg_1vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_barg_1vec4_frag.frag
new file mode 100644
index 000000000..f6515119a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_barg_1vec4_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec4 m = al.barg;
+ vec4 a = vec4(m.b, m.a, m.r, m.g);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_barg_1vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_barg_1vec4_vert.vert
new file mode 100644
index 000000000..2142720d4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_barg_1vec4_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec4 m = lightloc.barg;
+ vec4 a = vec4(m.b, m.a, m.r, m.g);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_br_ag_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_br_ag_2vec2_frag.frag
new file mode 100644
index 000000000..45c35f7b7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_br_ag_2vec2_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec2 m = al.br;
+ vec2 n = al.ag;
+ vec4 a = vec4(m.g, n.g, m.r, n.r);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_br_ag_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_br_ag_2vec2_vert.vert
new file mode 100644
index 000000000..c181e0c0c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_br_ag_2vec2_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec2 m = lightloc.br;
+ vec2 n = lightloc.ag;
+ vec4 a = vec4(m.g, n.g, m.r, n.r);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gr_ab_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gr_ab_2vec2_frag.frag
new file mode 100644
index 000000000..116ea98ed
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gr_ab_2vec2_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec2 m = al.gr;
+ vec2 n = al.ab;
+ vec4 a = vec4(m.g, m.r, n.g, n.r);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gr_ab_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gr_ab_2vec2_vert.vert
new file mode 100644
index 000000000..bb3993f1b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gr_ab_2vec2_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec2 m = lightloc.gr;
+ vec2 n = lightloc.ab;
+ vec4 a = vec4(m.g, m.r, n.g, n.r);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gra_b_1vec3_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gra_b_1vec3_1float_frag.frag
new file mode 100644
index 000000000..8c0ebcba3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gra_b_1vec3_1float_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.gra;
+ float b = al.b;
+ vec4 a = vec4(m.g, m.r, b, m.b);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gra_b_1vec3_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gra_b_1vec3_1float_vert.vert
new file mode 100644
index 000000000..1ec63ed75
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gra_b_1vec3_1float_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.gra;
+ float b = lightloc.b;
+ vec4 a = vec4(m.g, m.r, b, m.b);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_grab_1vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_grab_1vec4_frag.frag
new file mode 100644
index 000000000..c3d9bd446
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_grab_1vec4_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec4 m = al.grab;
+ vec4 a = vec4(m.g, m.r, m.a, m.b);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_grab_1vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_grab_1vec4_vert.vert
new file mode 100644
index 000000000..85f8d0c75
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_grab_1vec4_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec4 m = lightloc.grab;
+ vec4 a = vec4(m.g, m.r, m.a, m.b);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqs_t_1vec3_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqs_t_1vec3_1float_frag.frag
new file mode 100644
index 000000000..c93c7d9c7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqs_t_1vec3_1float_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.pqs;
+ float t = al.t;
+ vec4 a = vec4(m.p, t, m.s, m.t);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqs_t_1vec3_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqs_t_1vec3_1float_vert.vert
new file mode 100644
index 000000000..1fa79b24b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqs_t_1vec3_1float_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.pqs;
+ float t = lightloc.t;
+ vec4 a = vec4(m.p, t, m.s, m.t);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqst_1vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqst_1vec4_frag.frag
new file mode 100644
index 000000000..5fd159a9e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqst_1vec4_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec4 m = al.pqst;
+ vec4 a = vec4(m.p, m.q, m.s, m.t);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqst_1vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqst_1vec4_vert.vert
new file mode 100644
index 000000000..1a4d502a4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqst_1vec4_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec4 m = lightloc.pqst;
+ vec4 a = vec4(m.p, m.q, m.s, m.t);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ps_qt_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ps_qt_2vec2_frag.frag
new file mode 100644
index 000000000..0ec501403
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ps_qt_2vec2_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec2 m = al.ps;
+ vec2 n = al.qt;
+ vec4 a = vec4(m.t, n.t, m.s, n.s);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ps_qt_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ps_qt_2vec2_vert.vert
new file mode 100644
index 000000000..7b6f4394d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ps_qt_2vec2_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec2 m = lightloc.ps;
+ vec2 n = lightloc.qt;
+ vec4 a = vec4(m.t, n.t, m.s, n.s);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qs_pt_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qs_pt_2vec2_frag.frag
new file mode 100644
index 000000000..5ad2f2a99
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qs_pt_2vec2_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec2 m = al.qs;
+ vec2 n = al.pt;
+ vec4 a = vec4(m.t, n.t, n.s, m.s);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qs_pt_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qs_pt_2vec2_vert.vert
new file mode 100644
index 000000000..0f36642ac
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qs_pt_2vec2_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec2 m = lightloc.qs;
+ vec2 n = lightloc.pt;
+ vec4 a = vec4(m.t, n.t, n.s, m.s);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qsp_t_1vec3_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qsp_t_1vec3_1float_frag.frag
new file mode 100644
index 000000000..edcdcc939
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qsp_t_1vec3_1float_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.qsp;
+ float t = al.t;
+ vec4 a = vec4(m.t, t, m.p, m.s);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qsp_t_1vec3_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qsp_t_1vec3_1float_vert.vert
new file mode 100644
index 000000000..cdf2a3934
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qsp_t_1vec3_1float_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.qsp;
+ float t = lightloc.t;
+ vec4 a = vec4(m.t, t, m.p, m.s);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qspt_1vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qspt_1vec4_frag.frag
new file mode 100644
index 000000000..b71f46821
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qspt_1vec4_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec4 m = al.qspt;
+ vec4 a = vec4(m.t, m.q, m.p, m.s);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qspt_1vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qspt_1vec4_vert.vert
new file mode 100644
index 000000000..dec21c445
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qspt_1vec4_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec4 m = lightloc.qspt;
+ vec4 a = vec4(m.t, m.q, m.p, m.s);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_r_g_b_a_4float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_r_g_b_a_4float_frag.frag
new file mode 100644
index 000000000..59fe5e4eb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_r_g_b_a_4float_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ float r = al.r;
+ float g = al.g;
+ float b = al.b;
+ float a = al.a;
+ vec4 m = vec4(r,g,b,a);
+ gl_FragColor = m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_r_g_b_a_4float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_r_g_b_a_4float_vert.vert
new file mode 100644
index 000000000..bd69ccbe2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_r_g_b_a_4float_vert.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ float r = lightloc.r;
+ float g = lightloc.g;
+ float b = lightloc.b;
+ float a = lightloc.a;
+ vec4 m = vec4(r, g, b, a);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rg_ba_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rg_ba_2vec2_frag.frag
new file mode 100644
index 000000000..25cbce4af
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rg_ba_2vec2_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec2 m = al.rg;
+ vec2 n = al.ba;
+ vec4 a = vec4(m,n);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rg_ba_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rg_ba_2vec2_vert.vert
new file mode 100644
index 000000000..1b1fa0e25
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rg_ba_2vec2_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec2 m = lightloc.rg;
+ vec2 n = lightloc.ba;
+ vec4 a = vec4(m,n);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgb_a_1vec3_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgb_a_1vec3_1float_frag.frag
new file mode 100644
index 000000000..2a433f072
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgb_a_1vec3_1float_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.rgb;
+ float a = al.a;
+ vec4 b = vec4(m, a);
+ gl_FragColor = b;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgb_a_1vec3_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgb_a_1vec3_1float_vert.vert
new file mode 100644
index 000000000..68e1a75b9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgb_a_1vec3_1float_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.rgb;
+ float a = lightloc.a;
+ vec4 b = vec4(m, a);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * b;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgba_1vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgba_1vec4_frag.frag
new file mode 100644
index 000000000..fddd35f4e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgba_1vec4_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec4 m = al.rgba;
+ gl_FragColor = m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgba_1vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgba_1vec4_vert.vert
new file mode 100644
index 000000000..adf605add
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgba_1vec4_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec4 m = lightloc.rgba;
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_s_t_p_q_4float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_s_t_p_q_4float_frag.frag
new file mode 100644
index 000000000..4a3885718
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_s_t_p_q_4float_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ float s = al.s;
+ float t = al.t;
+ float p = al.p;
+ float q = al.q;
+ vec4 m = vec4(s,t,p,q);
+ gl_FragColor = m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_s_t_p_q_4float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_s_t_p_q_4float_vert.vert
new file mode 100644
index 000000000..689d7d5e7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_s_t_p_q_4float_vert.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ float s = lightloc.s;
+ float t = lightloc.t;
+ float p = lightloc.p;
+ float q = lightloc.q;
+ vec4 m = vec4(s, t, p, q);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_st_pq_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_st_pq_2vec2_frag.frag
new file mode 100644
index 000000000..37de31441
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_st_pq_2vec2_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec2 m = al.st;
+ vec2 n = al.pq;
+ vec4 a = vec4(m,n);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_st_pq_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_st_pq_2vec2_vert.vert
new file mode 100644
index 000000000..9c57a8d5d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_st_pq_2vec2_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec2 m = lightloc.st;
+ vec2 n = lightloc.pq;
+ vec4 a = vec4(m,n);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stp_q_1vec3_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stp_q_1vec3_1float_frag.frag
new file mode 100644
index 000000000..74a2d9813
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stp_q_1vec3_1float_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.stp;
+ float q = al.q;
+ vec4 a = vec4(m, q);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stp_q_1vec3_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stp_q_1vec3_1float_vert.vert
new file mode 100644
index 000000000..93316f4eb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stp_q_1vec3_1float_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.stp;
+ float q = lightloc.q;
+ vec4 a = vec4(m, q);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stpq_1vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stpq_1vec4_frag.frag
new file mode 100644
index 000000000..b42f676c2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stpq_1vec4_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec4 m = al.stpq;
+ gl_FragColor = m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stpq_1vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stpq_1vec4_vert.vert
new file mode 100644
index 000000000..e84962163
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stpq_1vec4_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec4 m = lightloc.stpq;
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ts_qp_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ts_qp_2vec2_frag.frag
new file mode 100644
index 000000000..81d0648b3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ts_qp_2vec2_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec2 m = al.ts;
+ vec2 n = al.qp;
+ vec4 a = vec4(m.t, m.s, n.t, n.s);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ts_qp_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ts_qp_2vec2_vert.vert
new file mode 100644
index 000000000..d433805fd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ts_qp_2vec2_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec2 m = lightloc.ts;
+ vec2 n = lightloc.qp;
+ vec4 a = vec4(m.t, m.s, n.t, n.s);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsq_p_1vec3_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsq_p_1vec3_1float_frag.frag
new file mode 100644
index 000000000..7d3014b26
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsq_p_1vec3_1float_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.tsq;
+ float p = al.p;
+ vec4 a = vec4(m.t, m.s, p, m.p);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsq_p_1vec3_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsq_p_1vec3_1float_vert.vert
new file mode 100644
index 000000000..c30c6aa95
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsq_p_1vec3_1float_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.tsq;
+ float p = lightloc.p;
+ vec4 a = vec4(m.t, m.s, p, m.p);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsqp_1vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsqp_1vec4_frag.frag
new file mode 100644
index 000000000..82fe0de68
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsqp_1vec4_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec4 m = al.tsqp;
+ vec4 a = vec4(m.t, m.s, m.q, m.p);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsqp_1vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsqp_1vec4_vert.vert
new file mode 100644
index 000000000..7296ff0ae
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsqp_1vec4_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec4 m = lightloc.tsqp;
+ vec4 a = vec4(m.t, m.s, m.q, m.p);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wx_zy_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wx_zy_2vec2_frag.frag
new file mode 100644
index 000000000..f94933ca4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wx_zy_2vec2_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec2 m = al.wx;
+ vec2 n = al.zy;
+ vec4 a = vec4(m.y, n.y, n.x, m.x);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wx_zy_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wx_zy_2vec2_vert.vert
new file mode 100644
index 000000000..dd3af2d9f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wx_zy_2vec2_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec2 m = lightloc.wx;
+ vec2 n = lightloc.zy;
+ vec4 a = vec4(m.y, n.y, n.x, m.x);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxz_y_1vec3_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxz_y_1vec3_1float_frag.frag
new file mode 100644
index 000000000..e594be66a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxz_y_1vec3_1float_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.wxz;
+ float y = al.y;
+ vec4 a = vec4(m.y, y, m.z, m.x);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxz_y_1vec3_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxz_y_1vec3_1float_vert.vert
new file mode 100644
index 000000000..3229f29aa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxz_y_1vec3_1float_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.wxz;
+ float y = lightloc.y;
+ vec4 a = vec4(m.y, y, m.z, m.x);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxzy_1vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxzy_1vec4_frag.frag
new file mode 100644
index 000000000..357ae8fce
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxzy_1vec4_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec4 m = al.wxzy;
+ vec4 a = vec4(m.y, m.w, m.z, m.x);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxzy_1vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxzy_1vec4_vert.vert
new file mode 100644
index 000000000..147c13482
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxzy_1vec4_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec4 m = lightloc.wxzy;
+ vec4 a = vec4(m.y, m.w, m.z, m.x);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_x_y_z_w_4float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_x_y_z_w_4float_frag.frag
new file mode 100644
index 000000000..26e24a171
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_x_y_z_w_4float_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ float x = al.x;
+ float y = al.y;
+ float z = al.z;
+ float w = al.w;
+ vec4 m = vec4(x,y,z,w);
+ gl_FragColor = m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_x_y_z_w_4float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_x_y_z_w_4float_vert.vert
new file mode 100644
index 000000000..1b70abe6d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_x_y_z_w_4float_vert.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ float x = lightloc.x;
+ float y = lightloc.y;
+ float z = lightloc.z;
+ float w = lightloc.w;
+ vec4 m = vec4(x, y, z, w);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xy_zw_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xy_zw_2vec2_frag.frag
new file mode 100644
index 000000000..2328a66d4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xy_zw_2vec2_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec2 m = al.xy;
+ vec2 n = al.zw;
+ vec4 a = vec4(m,n);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xy_zw_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xy_zw_2vec2_vert.vert
new file mode 100644
index 000000000..b0b7c276c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xy_zw_2vec2_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec2 m = lightloc.xy;
+ vec2 n = lightloc.zw;
+ vec4 a = vec4(m,n);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyz_w_1vec3_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyz_w_1vec3_1float_frag.frag
new file mode 100644
index 000000000..f3a731f2b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyz_w_1vec3_1float_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.xyz;
+ float w = al.w;
+ vec4 a = vec4(m, w);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyz_w_1vec3_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyz_w_1vec3_1float_vert.vert
new file mode 100644
index 000000000..8ae968d18
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyz_w_1vec3_1float_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.xyz;
+ float w = lightloc.w;
+ vec4 a = vec4(m, w);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyzw_1vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyzw_1vec4_frag.frag
new file mode 100644
index 000000000..5aa9952c4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyzw_1vec4_frag.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec4 m = al.xyzw;
+ gl_FragColor = m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyzw_1vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyzw_1vec4_vert.vert
new file mode 100644
index 000000000..71b245113
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyzw_1vec4_vert.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec4 m = lightloc.xyzw;
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * m;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yx_wz_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yx_wz_2vec2_frag.frag
new file mode 100644
index 000000000..9353fac03
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yx_wz_2vec2_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec2 m = al.yx;
+ vec2 n = al.wz;
+ vec4 a = vec4(m.y, m.x, n.y, n.x);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yx_wz_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yx_wz_2vec2_vert.vert
new file mode 100644
index 000000000..0d05df101
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yx_wz_2vec2_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec2 m = lightloc.yx;
+ vec2 n = lightloc.wz;
+ vec4 a = vec4(m.y, m.x, n.y, n.x);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxw_z_1vec3_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxw_z_1vec3_1float_frag.frag
new file mode 100644
index 000000000..0b2675d81
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxw_z_1vec3_1float_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.yxw;
+ float z = al.z;
+ vec4 a = vec4(m.y, m.x, z, m.z);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxw_z_1vec3_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxw_z_1vec3_1float_vert.vert
new file mode 100644
index 000000000..00f5f2e7e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxw_z_1vec3_1float_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.yxw;
+ float z = lightloc.z;
+ vec4 a = vec4(m.y, m.x, z, m.z);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxwz_1vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxwz_1vec4_frag.frag
new file mode 100644
index 000000000..8e6fd39d4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxwz_1vec4_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec4 m = al.yxwz;
+ vec4 a = vec4(m.y, m.x, m.w, m.z);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxwz_1vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxwz_1vec4_vert.vert
new file mode 100644
index 000000000..99bf91c1e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxwz_1vec4_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec4 m = lightloc.yxwz;
+ vec4 a = vec4(m.y, m.x, m.w, m.z);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwx_y_1vec3_1float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwx_y_1vec3_1float_frag.frag
new file mode 100644
index 000000000..07c47e31b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwx_y_1vec3_1float_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec3 m = al.zwx;
+ float y = al.y;
+ vec4 a = vec4(m.z, y, m.x, m.y);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwx_y_1vec3_1float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwx_y_1vec3_1float_vert.vert
new file mode 100644
index 000000000..9bb3028eb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwx_y_1vec3_1float_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec3 m = lightloc.zwx;
+ float y = lightloc.y;
+ vec4 a = vec4(m.z, y, m.x, m.y);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwxy_1vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwxy_1vec4_frag.frag
new file mode 100644
index 000000000..2ef1689ca
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwxy_1vec4_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec4 m = al.zwxy;
+ vec4 a = vec4(m.z, m.w, m.x, m.y);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwxy_1vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwxy_1vec4_vert.vert
new file mode 100644
index 000000000..106077653
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwxy_1vec4_vert.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec4 m = lightloc.zwxy;
+ vec4 a = vec4(m.z, m.w, m.x, m.y);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zx_wy_2vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zx_wy_2vec2_frag.frag
new file mode 100644
index 000000000..32bb27036
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zx_wy_2vec2_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+void main (void)
+{
+ vec4 al = color;
+ vec2 m = al.zx;
+ vec2 n = al.wy;
+ vec4 a = vec4(m.y, n.y, m.x, n.x);
+ gl_FragColor = a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zx_wy_2vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zx_wy_2vec2_vert.vert
new file mode 100644
index 000000000..ff8513507
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zx_wy_2vec2_vert.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 lightloc = gtf_Vertex;
+ vec2 m = lightloc.zx;
+ vec2 n = lightloc.wy;
+ vec4 a = vec4(m.y, n.y, m.x, n.x);
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * a;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/input.run.txt
new file mode 100644
index 000000000..443a00f70
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+tan_001_to_006.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_001_to_006.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_001_to_006.html
new file mode 100644
index 000000000..a3855f748
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_001_to_006.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: tan_001_to_006.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "tan_float_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "tan_float_frag_xvary.frag"
+ },
+ "name": "tan_float_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "tan_vec2_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "tan_vec2_frag_xvary.frag"
+ },
+ "name": "tan_vec2_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "tan_vec3_frag_xvary_ref.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "tan_vec3_frag_xvary.frag"
+ },
+ "name": "tan_vec3_frag_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "tan_float_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "tan_float_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "tan_float_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "tan_vec2_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "tan_vec2_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "tan_vec2_vert_xvary.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "tan_vec3_vert_xvary_ref.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": "grid",
+ "testProgram": {
+ "vertexShader": "tan_vec3_vert_xvary.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "tan_vec3_vert_xvary.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_frag_xvary.frag
new file mode 100644
index 000000000..f5c02d045
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_frag_xvary.frag
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 0.5 * M_PI * 2.0 * (color.r - 0.5);
+ float o;
+
+ if(abs(c) < 0.5) // -45..45
+ o = 0.5 * tan(c) + 0.5;
+ else // 45..90, -45..-90
+ o = 0.5 / tan(c) + 0.5;
+ gl_FragColor = vec4(o, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_frag_xvary_ref.frag
new file mode 100644
index 000000000..65a820e13
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_frag_xvary_ref.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 0.5 * M_PI * 2.0 * (color.r - 0.5);
+ float o;
+ if(abs(c) < 0.5) // -45..45
+ o = 0.5 * (sin(c) / cos(c)) + 0.5;
+ else // 45..90, -45..-90
+ o = 0.5 * (cos(c) / sin(c)) + 0.5;
+ gl_FragColor = vec4(o, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_vert_xvary.vert
new file mode 100644
index 000000000..501b5725f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_vert_xvary.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 0.5 * M_PI * 2.0 * (gtf_Color.r - 0.5);
+ float o;
+
+ if(abs(c) < 0.5) // -45..45
+ o = 0.5 * tan(c) + 0.5;
+ else // 45..90, -45..-90
+ o = 0.5 / tan(c) + 0.5;
+ color = vec4(o, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_vert_xvary_ref.vert
new file mode 100644
index 000000000..97cd3cca2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_vert_xvary_ref.vert
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float c = 0.5 * M_PI * 2.0 * (gtf_Color.r - 0.5);
+ float o;
+ if(abs(c) < 0.5) // -45..45
+ o = 0.5 * (sin(c) / cos(c)) + 0.5;
+ else // 45..90, -45..-90
+ o = 0.5 * (cos(c) / sin(c)) + 0.5;
+ color = vec4(o, 0.0, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_frag_xvary.frag
new file mode 100644
index 000000000..759e622e9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_frag_xvary.frag
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 0.5 * M_PI * 2.0 * (color.rg - 0.5);
+ vec2 o;
+ if(abs(c.r) < 0.5) // -45..45
+ o.r = 0.5 * tan(c.r) + 0.5;
+ else // 45..90, -45..-90
+ o.r = 0.5 / tan(c.r) + 0.5;
+
+ if(abs(c.g) < 0.5) // -45..45
+ o.g = 0.5 * tan(c.g) + 0.5;
+ else // 45..90, -45..-90
+ o.g = 0.5 / tan(c.g) + 0.5;
+
+ gl_FragColor = vec4(o, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_frag_xvary_ref.frag
new file mode 100644
index 000000000..0b427094b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_frag_xvary_ref.frag
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 0.5 * M_PI * 2.0 * (color.rg - 0.5);
+ vec2 o;
+ if(abs(c.r) < 0.5) // -45..45
+ o.r = 0.5 * (sin(c.r) / cos(c.r)) + 0.5;
+ else // 45..90, -45..-90
+ o.r = 0.5 * (cos(c.r) / sin(c.r)) + 0.5;
+
+ if(abs(c.g) < 0.5) // -45..45
+ o.g = 0.5 * (sin(c.g) / cos(c.g)) + 0.5;
+ else // 45..90, -45..-90
+ o.g = 0.5 * (cos(c.g) / sin(c.g)) + 0.5;
+
+ gl_FragColor = vec4(o, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_vert_xvary.vert
new file mode 100644
index 000000000..9bb1d5b0f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_vert_xvary.vert
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 0.5 * M_PI * 2.0 * (gtf_Color.rg - 0.5);
+ vec2 o;
+ if(abs(c.r) < 0.5) // -45..45
+ o.r = 0.5 * tan(c.r) + 0.5;
+ else // 45..90, -45..-90
+ o.r = 0.5 / tan(c.r) + 0.5;
+
+ if(abs(c.g) < 0.5) // -45..45
+ o.g = 0.5 * tan(c.g) + 0.5;
+ else // 45..90, -45..-90
+ o.g = 0.5 / tan(c.g) + 0.5;
+
+ color = vec4(o, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_vert_xvary_ref.vert
new file mode 100644
index 000000000..fdd63bc2e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_vert_xvary_ref.vert
@@ -0,0 +1,48 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec2 c = 0.5 * M_PI * 2.0 * (gtf_Color.rg - 0.5);
+ vec2 o;
+ if(abs(c.r) < 0.5) // -45..45
+ o.r = 0.5 * (sin(c.r) / cos(c.r)) + 0.5;
+ else // 45..90, -45..-90
+ o.r = 0.5 * (cos(c.r) / sin(c.r)) + 0.5;
+
+ if(abs(c.g) < 0.5) // -45..45
+ o.g = 0.5 * (sin(c.g) / cos(c.g)) + 0.5;
+ else // 45..90, -45..-90
+ o.g = 0.5 * (cos(c.g) / sin(c.g)) + 0.5;
+
+ color = vec4(o, 0.0, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_frag_xvary.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_frag_xvary.frag
new file mode 100644
index 000000000..5e442b591
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_frag_xvary.frag
@@ -0,0 +1,52 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 0.5 * M_PI * 2.0 * (color.rgb - 0.5);
+ vec3 o;
+ if(abs(c.r) < 0.5) // -45..45
+ o.r = 0.5 * tan(c.r) + 0.5;
+ else // 45..90, -45..-90
+ o.r = 0.5 / tan(c.r) + 0.5;
+
+ if(abs(c.g) < 0.5) // -45..45
+ o.g = 0.5 * tan(c.g) + 0.5;
+ else // 45..90, -45..-90
+ o.g = 0.5 / tan(c.g) + 0.5;
+
+ if(abs(c.b) < 0.5) // -45..45
+ o.b = 0.5 * tan(c.b) + 0.5;
+ else // 45..90, -45..-90
+ o.b = 0.5 / tan(c.b) + 0.5;
+
+ gl_FragColor = vec4(o, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_frag_xvary_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_frag_xvary_ref.frag
new file mode 100644
index 000000000..09d152b25
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_frag_xvary_ref.frag
@@ -0,0 +1,52 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 0.5 * M_PI * 2.0 * (color.rgb - 0.5);
+ vec3 o;
+ if(abs(c.r) < 0.5) // -45..45
+ o.r = 0.5 * (sin(c.r) / cos(c.r)) + 0.5;
+ else // 45..90, -45..-90
+ o.r = 0.5 * (cos(c.r) / sin(c.r)) + 0.5;
+
+ if(abs(c.g) < 0.5) // -45..45
+ o.g = 0.5 * (sin(c.g) / cos(c.g)) + 0.5;
+ else // 45..90, -45..-90
+ o.g = 0.5 * (cos(c.g) / sin(c.g)) + 0.5;
+
+ if(abs(c.b) < 0.5) // -45..45
+ o.b = 0.5 * (sin(c.b) / cos(c.b)) + 0.5;
+ else // 45..90, -45..-90
+ o.b = 0.5 * (cos(c.b) / sin(c.b)) + 0.5;
+
+ gl_FragColor = vec4(o, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_vert_xvary.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_vert_xvary.vert
new file mode 100644
index 000000000..66929bae6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_vert_xvary.vert
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 0.5 * M_PI * 2.0 * (gtf_Color.rgb - 0.5);
+ vec3 o;
+ if(abs(c.r) < 0.5) // -45..45
+ o.r = 0.5 * tan(c.r) + 0.5;
+ else // 45..90, -45..-90
+ o.r = 0.5 / tan(c.r) + 0.5;
+
+ if(abs(c.g) < 0.5) // -45..45
+ o.g = 0.5 * tan(c.g) + 0.5;
+ else // 45..90, -45..-90
+ o.g = 0.5 / tan(c.g) + 0.5;
+
+ if(abs(c.b) < 0.5) // -45..45
+ o.b = 0.5 * tan(c.b) + 0.5;
+ else // 45..90, -45..-90
+ o.b = 0.5 / tan(c.b) + 0.5;
+
+ color = vec4(o, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_vert_xvary_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_vert_xvary_ref.vert
new file mode 100644
index 000000000..fd99616ba
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_vert_xvary_ref.vert
@@ -0,0 +1,53 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ vec3 c = 0.5 * M_PI * 2.0 * (gtf_Color.rgb - 0.5);
+ vec3 o;
+ if(abs(c.r) < 0.5) // -45..45
+ o.r = 0.5 * (sin(c.r) / cos(c.r)) + 0.5;
+ else // 45..90, -45..-90
+ o.r = 0.5 * (cos(c.r) / sin(c.r)) + 0.5;
+
+ if(abs(c.g) < 0.5) // -45..45
+ o.g = 0.5 * (sin(c.g) / cos(c.g)) + 0.5;
+ else // 45..90, -45..-90
+ o.g = 0.5 * (cos(c.g) / sin(c.g)) + 0.5;
+
+ if(abs(c.b) < 0.5) // -45..45
+ o.b = 0.5 * (sin(c.b) / cos(c.b)) + 0.5;
+ else // 45..90, -45..-90
+ o.b = 0.5 * (cos(c.b) / sin(c.b)) + 0.5;
+
+ color = vec4(o, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/bvec4_2int_2float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/bvec4_2int_2float_frag.frag
new file mode 100644
index 000000000..91f6ba069
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/bvec4_2int_2float_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ bvec4 a = bvec4(0, 23, 0.0, 23.0);
+ float gray;
+ if( (a[0] == false) && (a[1] == true) && (a[2] == false) && (a[3] == true) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/bvec4_2int_2float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/bvec4_2int_2float_vert.vert
new file mode 100644
index 000000000..9a672e0ef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/bvec4_2int_2float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ bvec4 a = bvec4(0, 23, 0.0, 23.0);
+ float gray;
+ if( (a[0] == false) && (a[1] == true) && (a[2] == false) && (a[3] == true) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/input.run.txt
new file mode 100644
index 000000000..e5ba07f12
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/input.run.txt
@@ -0,0 +1,4 @@
+# this file is auto-generated. DO NOT EDIT.
+vec_001_to_008.html
+vec_009_to_016.html
+vec_017_to_018.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/ivec3_3int_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/ivec3_3int_frag.frag
new file mode 100644
index 000000000..a603bad89
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/ivec3_3int_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ ivec3 a = ivec3(20, 13, 17);
+ float gray;
+ if( (a[0] == 20) && (a[1] == 13) && (a[2] == 17) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/ivec3_3int_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/ivec3_3int_vert.vert
new file mode 100644
index 000000000..81d0b3701
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/ivec3_3int_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ ivec3 a = ivec3(20, 13, 17);
+ float gray;
+ if( (a[0] == 20) && (a[1] == 13) && (a[2] == 17) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_2float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_2float_frag.frag
new file mode 100644
index 000000000..d2b17980a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_2float_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 a = vec2(13.0,53.0);
+ float gray;
+ if( (a[0] == 13.0) && (a[1] == 53.0) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_2float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_2float_vert.vert
new file mode 100644
index 000000000..0a1854c81
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_2float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 a = vec2(13.0,53.0);
+ float gray;
+ if( (a[0] == 13.0) && (a[1] == 53.0) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_vec3_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_vec3_frag.frag
new file mode 100644
index 000000000..6dae4e49b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_vec3_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 b = vec3(13.0, 53.0, 139.0);
+ vec2 a = vec2(b);
+ float gray;
+ if( (a[0] == 13.0) && (a[1] == 53.0) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_vec3_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_vec3_vert.vert
new file mode 100644
index 000000000..b0be5bb6f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_vec3_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 b = vec3(13.0, 53.0, 139.0);
+ vec2 a = vec2(b);
+ float gray;
+ if( (a[0] == 13.0) && (a[1] == 53.0) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_float_vec2_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_float_vec2_frag.frag
new file mode 100644
index 000000000..50f3b951b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_float_vec2_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 b = vec2(53.0, 139.0);
+ vec3 a = vec3(13.0, b);
+ float gray;
+ if( (a[0] == 13.0) && (a[1] == 53.0) && (a[2] == 139.0) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_float_vec2_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_float_vec2_vert.vert
new file mode 100644
index 000000000..cb6dbca18
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_float_vec2_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 b = vec2(53.0, 139.0);
+ vec3 a = vec3(13.0, b);
+ float gray;
+ if( (a[0] == 13.0) && (a[1] == 53.0) && (a[2] == 139.0) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec2_float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec2_float_frag.frag
new file mode 100644
index 000000000..d093aa29f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec2_float_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec2 b = vec2(13.0, 53.0);
+ vec3 a = vec3(b, 139.0);
+ float gray;
+ if( (a[0] == 13.0) && (a[1] == 53.0) && (a[2] == 139.0) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec2_float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec2_float_vert.vert
new file mode 100644
index 000000000..21da10689
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec2_float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec2 b = vec2(13.0, 53.0);
+ vec3 a = vec3(b,139.0);
+ float gray;
+ if( (a[0] == 13.0) && (a[1] == 53.0) && (a[2] == 139.0) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec4_frag.frag
new file mode 100644
index 000000000..b0c8e3b6c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec4_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec4 b = vec4(13.0, 53.0, 139.0, 217.0);
+ vec3 a = vec3(b);
+ float gray;
+ if( (a[0] == 13.0) && (a[1] == 53.0) && (a[2] == 139.0) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec4_vert.vert
new file mode 100644
index 000000000..60e3e4d79
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec4_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 b = vec4(13.0, 53.0, 139.0, 217.0);
+ vec3 a = vec3(b);
+ float gray;
+ if( (a[0] == 13.0) && (a[1] == 53.0) && (a[2] == 139.0) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_ivec4_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_ivec4_frag.frag
new file mode 100644
index 000000000..15ce47066
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_ivec4_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ ivec4 init = ivec4(2,3,5,9);
+ vec4 a = vec4(init);
+ float gray;
+ if( (a[0] == 2.0) && (a[1] == 3.0) && (a[2] == 5.0) && (a[3] == 9.0) )
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_ivec4_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_ivec4_vert.vert
new file mode 100644
index 000000000..510fd123a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_ivec4_vert.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ ivec4 init = ivec4(2,3,5,9);
+ vec4 a = vec4(init);
+ float gray;
+ if( (a[0] == 2.0) && (a[1] == 3.0) && (a[2] == 5.0) && (a[3] == 9.0) )
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_vec3_float_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_vec3_float_frag.frag
new file mode 100644
index 000000000..6e330f797
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_vec3_float_frag.frag
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ vec3 b = vec3(13.0, 53.0, 139.0);
+ vec4 a = vec4(b, 217.0);
+ float gray;
+ if( (a[0] == 13.0) && (a[1] == 53.0) && (a[2] == 139.0) && (a[3] == 217.0))
+ gray=1.0;
+ else gray=0.0;
+ gl_FragColor = vec4(gray, gray, gray, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_vec3_float_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_vec3_float_vert.vert
new file mode 100644
index 000000000..3ad46ce59
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_vec3_float_vert.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ vec3 b = vec3(13.0, 53.0, 139.0);
+ vec4 a = vec4(b, 217.0);
+ float gray;
+ if( (a[0] == 13.0) && (a[1] == 53.0) && (a[2] == 139.0) && (a[3] == 217.0))
+ gray=1.0;
+ else gray=0.0;
+ color = vec4(gray, gray, gray, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_001_to_008.html
new file mode 100644
index 000000000..307d8500d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_001_to_008.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: vec_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec2_2float_frag.frag"
+ },
+ "name": "vec2_2float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec2_2float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec2_2float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_ivec4_frag.frag"
+ },
+ "name": "vec4_ivec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec4_ivec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_ivec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "ivec3_3int_frag.frag"
+ },
+ "name": "ivec3_3int_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "ivec3_3int_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "ivec3_3int_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "bvec4_2int_2float_frag.frag"
+ },
+ "name": "bvec4_2int_2float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "bvec4_2int_2float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "bvec4_2int_2float_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_009_to_016.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_009_to_016.html
new file mode 100644
index 000000000..f66ce63b4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_009_to_016.html
@@ -0,0 +1,253 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: vec_009_to_016.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec2_vec3_frag.frag"
+ },
+ "name": "vec2_vec3_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec2_vec3_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec2_vec3_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_vec4_frag.frag"
+ },
+ "name": "vec3_vec4_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec3_vec4_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_vec4_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_vec2_float_frag.frag"
+ },
+ "name": "vec3_vec2_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec3_vec2_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_vec2_float_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec3_float_vec2_frag.frag"
+ },
+ "name": "vec3_float_vec2_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec3_float_vec2_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3_float_vec2_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_017_to_018.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_017_to_018.html
new file mode 100644
index 000000000..d9451df74
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_017_to_018.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: vec_017_to_018.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "vec4_vec3_float_frag.frag"
+ },
+ "name": "vec4_vec3_float_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 1.0,
+ 1.0,
+ 1.0,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec4_vec3_float_vert.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec4_vec3_float_vert.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/input.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/input.run.txt
new file mode 100644
index 000000000..1d1f9189d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/input.run.txt
@@ -0,0 +1,2 @@
+# this file is auto-generated. DO NOT EDIT.
+vec3_001_to_008.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3_001_to_008.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3_001_to_008.html
new file mode 100644
index 000000000..ab222c393
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3_001_to_008.html
@@ -0,0 +1,335 @@
+<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: vec3_001_to_008.html</title>
+<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
+<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script src="../../../resources/webgl-test-utils.js"></script>
+<script src="../../ogles-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run({
+ "tests": [
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "lightPosition": {
+ "count": 2,
+ "type": "uniform3fv",
+ "value": [
+ 0.25,
+ 0.75,
+ 0.0,
+ 0.75,
+ 0.25,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "vec3array_frag.frag"
+ },
+ "name": "vec3array_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.25,
+ 0.75,
+ 0.5,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec3single_vert.vert",
+ "uniforms": {
+ "lightPosition": {
+ "count": 1,
+ "type": "uniform3fv",
+ "value": [
+ 0.25,
+ 0.75,
+ 0.5
+ ]
+ }
+ },
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3single_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.5,
+ 0.5,
+ 0.5,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec3arrayindirect_vert.vert",
+ "uniforms": {
+ "lightPosition": {
+ "count": 2,
+ "type": "uniform3fv",
+ "value": [
+ 0.25,
+ 0.75,
+ 0.0,
+ 0.75,
+ 0.25,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3arrayindirect_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.5,
+ 0.5,
+ 0.5,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec3arraydirect_vert.vert",
+ "uniforms": {
+ "lightPosition": {
+ "count": 2,
+ "type": "uniform3fv",
+ "value": [
+ 0.25,
+ 0.75,
+ 0.0,
+ 0.75,
+ 0.25,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3arraydirect_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "fragmentShader": "../default/default.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "vec3array_vert.vert",
+ "uniforms": {
+ "lightPosition": {
+ "count": 2,
+ "type": "uniform3fv",
+ "value": [
+ 0.25,
+ 0.75,
+ 0.0,
+ 0.75,
+ 0.25,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/default.frag"
+ },
+ "name": "vec3array_vert.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.25,
+ 0.75,
+ 0.5,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "lightPosition": {
+ "count": 1,
+ "type": "uniform3fv",
+ "value": [
+ 0.25,
+ 0.75,
+ 0.5
+ ]
+ }
+ },
+ "fragmentShader": "vec3single_frag.frag"
+ },
+ "name": "vec3single_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.5,
+ 0.5,
+ 0.5,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "lightPosition": {
+ "count": 2,
+ "type": "uniform3fv",
+ "value": [
+ 0.25,
+ 0.75,
+ 0.0,
+ 0.75,
+ 0.25,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "vec3arrayindirect_frag.frag"
+ },
+ "name": "vec3arrayindirect_frag.test.html",
+ "pattern": "compare"
+ },
+ {
+ "referenceProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "result": {
+ "count": 1,
+ "type": "uniform4fv",
+ "value": [
+ 0.5,
+ 0.5,
+ 0.5,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "../default/expected.frag"
+ },
+ "model": null,
+ "testProgram": {
+ "vertexShader": "../default/default.vert",
+ "uniforms": {
+ "lightPosition": {
+ "count": 2,
+ "type": "uniform3fv",
+ "value": [
+ 0.25,
+ 0.75,
+ 0.0,
+ 0.75,
+ 0.25,
+ 1.0
+ ]
+ }
+ },
+ "fragmentShader": "vec3arraydirect_frag.frag"
+ },
+ "name": "vec3arraydirect_frag.test.html",
+ "pattern": "compare"
+ }
+ ]
+});
+var successfullyParsed = true;
+</script>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3array_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3array_frag.frag
new file mode 100644
index 000000000..4e79fa735
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3array_frag.frag
@@ -0,0 +1,49 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+//
+// vec3array_frag.frag: Simple Fragment shader using vec3 to get colors.
+//
+//
+
+varying vec4 color;
+
+uniform vec3 lightPosition[2];
+
+void main(void)
+{
+ vec3 v[2];
+
+ v[1] = vec3(color.r, color.g, color.b);
+
+
+ v[0] = lightPosition[1];
+
+
+ gl_FragColor = vec4(v[1] + v[1], 0.0)/2.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3array_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3array_vert.vert
new file mode 100644
index 000000000..7a45f45b0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3array_vert.vert
@@ -0,0 +1,47 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+//
+// vec3array_vert.vert: Simple vertex shader using vec3 to get colors.
+//
+//
+
+varying vec4 color;
+uniform vec3 lightPosition[2];
+
+void main(void)
+{
+ vec3 v[2];
+
+ v[1] = vec3(gtf_Color.r, gtf_Color.g, gtf_Color.b);
+
+ v[0] = lightPosition[1];
+
+ color = vec4(v[1] + v[1], 0.0)/2.0;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arraydirect_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arraydirect_frag.frag
new file mode 100644
index 000000000..ac74a0c1c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arraydirect_frag.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+//
+// vec3arraydirect_frag.frag: Fragment shader solid color
+//
+//
+//
+
+uniform vec3 lightPosition[2];
+varying vec4 color;
+
+void main(void)
+{
+ gl_FragColor = vec4(lightPosition[0] + lightPosition[1], 0.0) * 0.5;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arraydirect_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arraydirect_vert.vert
new file mode 100644
index 000000000..203a6f0bc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arraydirect_vert.vert
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+//
+// vec3arraydirect_vert.vert: Vertex shader solid color
+//
+//
+//
+
+uniform vec3 lightPosition[2];
+varying vec4 color;
+
+void main(void)
+{
+
+ color = vec4(lightPosition[0] + lightPosition[1], 0.0) * 0.5;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arrayindirect_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arrayindirect_frag.frag
new file mode 100644
index 000000000..0f7a74ef1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arrayindirect_frag.frag
@@ -0,0 +1,55 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+//
+// vec3arrayindirect_frag.frag: Fragment shader solid color
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform vec3 lightPosition[2];
+varying vec4 color;
+
+void main(void)
+{
+ int i;
+
+ gl_FragColor = vec4(0.0);
+
+ /*
+ // No indirect indexing in fragment shaders
+ for (i = 0; i < 2; i++)
+ {
+ gl_FragColor += vec4(lightPosition[i], 0.0);
+ }
+ */
+ gl_FragColor += vec4(lightPosition[0], 0.0);
+ gl_FragColor += vec4(lightPosition[1], 0.0);
+
+ gl_FragColor /= 2.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arrayindirect_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arrayindirect_vert.vert
new file mode 100644
index 000000000..8b4e1eded
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arrayindirect_vert.vert
@@ -0,0 +1,51 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+//
+// vec3arrayindirect_vert.vert: Vertex shader solid color
+// The vec3 values are determined at runtime.
+//
+//
+
+uniform vec3 lightPosition[2];
+varying vec4 color;
+
+void main(void)
+{
+ color = vec4(0.0);
+
+ for (int i = 0; i < 2; i++)
+ {
+ color += vec4(lightPosition[i], 0.0);
+ }
+
+ color /= 2.0;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3single_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3single_frag.frag
new file mode 100644
index 000000000..7096a0f1c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3single_frag.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+//
+// vec3Matrix_frag.frag: Fragment shader solid color
+//
+//
+//
+
+uniform vec3 lightPosition;
+varying vec4 color;
+
+void main(void)
+{
+ gl_FragColor = vec4(lightPosition, 0.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3single_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3single_vert.vert
new file mode 100644
index 000000000..2755eebb2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3single_vert.vert
@@ -0,0 +1,45 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+//
+// vec3Matrix_vert.vert: Vertex shader solid color
+//
+//
+//
+
+uniform vec3 lightPosition;
+varying vec4 color;
+
+void main(void)
+{
+
+ color = vec4(lightPosition, 0.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/compressed_paletted_texture/compressed_paletted_texture.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/compressed_paletted_texture/compressed_paletted_texture.frag
new file mode 100644
index 000000000..dc65a5a71
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/compressed_paletted_texture/compressed_paletted_texture.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D gtf_Texture0;
+varying vec4 color;
+varying vec4 gtf_TexCoord[1];
+
+void main (void)
+{
+ gl_FragColor = color * texture2D(gtf_Texture0, gtf_TexCoord[0].xy);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/compressed_paletted_texture/compressed_paletted_texture.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/compressed_paletted_texture/compressed_paletted_texture.vert
new file mode 100644
index 000000000..16a2c2a72
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/compressed_paletted_texture/compressed_paletted_texture.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 gtf_TexCoord[1];
+attribute vec4 gtf_MultiTexCoord0;
+varying vec4 color;
+
+void main (void)
+{
+ color = gtf_Color;
+ gtf_TexCoord[0] = gtf_MultiTexCoord0;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag.frag
new file mode 100644
index 000000000..e605bf758
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag.frag
@@ -0,0 +1,68 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#extension GL_OES_standard_derivatives : enable
+precision mediump float;
+#endif
+
+// setting a boundary for cases where screen sizes may exceed the precision
+// of the arithmetic used.
+#define SAFETY_BOUND 500.0
+
+// Macro to scale/bias the range of output. If input is [-1.0, 1.0], maps to [0.5, 1.0]..
+// Accounts for precision errors magnified by derivative operation.
+#define REDUCE_RANGE(A) ((A) + 3.0) / 4.0
+
+// This fragment shader computes an image representation of the derivative of
+// sine. The derivative of sine is cosine. This shader's output is compared to
+// the reference shader that computes an image representation of cosine
+// directly.
+
+uniform float viewportwidth;
+uniform float viewportheight;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float sine;
+ float cosine;
+
+#ifdef GL_OES_standard_derivatives
+ sine = sin(fract(gl_FragCoord.x / 128.0) * (2.0 * M_PI));
+ cosine = REDUCE_RANGE((128.0 / (2.0 * M_PI)) * dFdx(sine));
+#else
+ cosine = 0.5;
+#endif
+
+ if( gl_FragCoord.x < SAFETY_BOUND )
+ {
+ gl_FragColor = vec4(cosine, cosine, cosine, 1.0);
+ }
+ else discard;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag.vert
new file mode 100644
index 000000000..19f17bd5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ vertXY = gtf_Vertex.xy;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag_ref.frag
new file mode 100644
index 000000000..6cae5b955
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag_ref.frag
@@ -0,0 +1,61 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#extension GL_OES_standard_derivatives : enable
+precision mediump float;
+#endif
+
+// setting a boundary for cases where screen sizes may exceed the precision
+// of the arithmetic used.
+#define SAFETY_BOUND 500.0
+
+// Macro to scale/bias the range of output. If input is [-1.0, 1.0], maps to [0.5, 1.0]..
+// Accounts for precision errors magnified by derivative operation.
+#define REDUCE_RANGE(A) ((A) + 3.0) / 4.0
+
+uniform float viewportwidth;
+uniform float viewportheight;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float cosine;
+
+ if( gl_FragCoord.x < SAFETY_BOUND )
+ {
+ // horizontal cosine wave with a period of 128 pixels
+#ifdef GL_OES_standard_derivatives
+ cosine = REDUCE_RANGE(cos(fract(gl_FragCoord.x / 128.0) * (2.0 * M_PI)));
+#else
+ cosine = 0.5;
+#endif
+ gl_FragColor = vec4(cosine, cosine, cosine, 1.0);
+ }
+ else discard;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag_ref.vert
new file mode 100644
index 000000000..19f17bd5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ vertXY = gtf_Vertex.xy;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag.frag
new file mode 100644
index 000000000..dfeb3db7c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag.frag
@@ -0,0 +1,68 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#extension GL_OES_standard_derivatives : enable
+precision mediump float;
+#endif
+
+// setting a boundary for cases where screen sizes may exceed the precision
+// of the arithmetic used.
+#define SAFETY_BOUND 500.0
+
+// Macro to scale/bias the range of output. If input is [-1.0, 1.0], maps to [0.5, 1.0]..
+// Accounts for precision errors magnified by derivative operation.
+#define REDUCE_RANGE(A) ((A) + 3.0) / 4.0
+
+// This fragment shader computes an image representation of the derivative of
+// sine. The derivative of sine is cosine. This shader's output is compared to
+// the reference shader that computes an image representation of cosine
+// directly.
+
+uniform float viewportwidth;
+uniform float viewportheight;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float sine;
+ float cosine;
+
+#ifdef GL_OES_standard_derivatives
+ sine = sin(fract(gl_FragCoord.y / 128.0) * (2.0 * M_PI));
+ cosine = REDUCE_RANGE((128.0 / (2.0 * M_PI)) * dFdy(sine));
+#else
+ cosine = 0.5;
+#endif
+
+ if( gl_FragCoord.y < SAFETY_BOUND )
+ {
+ gl_FragColor = vec4(cosine, cosine, cosine, 1.0);
+ }
+ else discard;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag.vert
new file mode 100644
index 000000000..a373ce624
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ vertXY = gtf_Vertex.xy;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag_ref.frag
new file mode 100644
index 000000000..1036de455
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag_ref.frag
@@ -0,0 +1,64 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#extension GL_OES_standard_derivatives : enable
+precision mediump float;
+#endif
+
+// setting a boundary for cases where screen sizes may exceed the precision
+// of the arithmetic used.
+#define SAFETY_BOUND 500.0
+
+// Macro to scale/bias the range of output. If input is [-1.0, 1.0], maps to [0.5, 1.0]..
+// Accounts for precision errors magnified by derivative operation.
+#define REDUCE_RANGE(A) ((A) + 3.0) / 4.0
+
+uniform float viewportwidth;
+uniform float viewportheight;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float cosine;
+
+ if( gl_FragCoord.y < SAFETY_BOUND )
+ {
+ // vertical cosine wave with a period of 128 pixels
+
+#ifdef GL_OES_standard_derivatives
+ cosine = REDUCE_RANGE(cos(fract(gl_FragCoord.y / 128.0) * (2.0 * M_PI)));
+#else
+ cosine = 0.5;
+#endif
+
+ gl_FragColor = vec4(cosine, cosine, cosine, 1.0);
+ }
+ else discard;
+}
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag_ref.vert
new file mode 100644
index 000000000..a373ce624
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag_ref.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ vertXY = gtf_Vertex.xy;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default.frag
new file mode 100644
index 000000000..e9d460fb2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default.vert
new file mode 100644
index 000000000..4cb92aa77
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ gl_PointSize = 1.0;
+
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default_textured.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default_textured.frag
new file mode 100644
index 000000000..8db3c6954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default_textured.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D gtf_Texture0;
+varying vec4 color;
+varying vec4 gtf_TexCoord[1];
+
+void main (void)
+{
+ gl_FragColor = texture2D(gtf_Texture0, gtf_TexCoord[0].xy);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default_textured.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default_textured.vert
new file mode 100644
index 000000000..1b5b7831a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default_textured.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 gtf_TexCoord[1];
+attribute vec4 gtf_MultiTexCoord0;
+varying vec4 color;
+
+void main (void)
+{
+ color = gtf_Color;
+ gtf_TexCoord[0] = gtf_MultiTexCoord0;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ gl_PointSize = 1.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag.frag
new file mode 100644
index 000000000..cae6f5674
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag.frag
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#extension GL_OES_standard_derivatives : enable
+precision mediump float;
+#endif
+
+// setting a boundary for cases where screen sizes may exceed the precision
+// of the arithmetic used.
+#define SAFETY_BOUND 500.0
+
+// Macro to scale/bias the range of output. If input is [-1.0, 1.0], maps to [0.5, 1.0]..
+// Accounts for precision errors magnified by derivative operation.
+#define REDUCE_RANGE(A) ((A) + 3.0) / 4.0
+
+
+varying vec2 vertXY;
+
+uniform float viewportwidth;
+uniform float viewportheight;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float func;
+ float funcfwidth;
+
+#ifdef GL_OES_standard_derivatives
+ // fwidth of average of horizontal and vertical sine waves with periods of 128 pixels, scaled to go from -1 to +1
+ func = 0.5 * (sin(fract(gl_FragCoord.x / 128.0) * (2.0 * M_PI)) + sin(fract(gl_FragCoord.y / 128.0) * (2.0 * M_PI)));
+ funcfwidth = REDUCE_RANGE((128.0 / (2.0 * M_PI)) * fwidth(func));
+#else
+ funcfwidth = 0.5;
+#endif
+
+ if( (gl_FragCoord.x < SAFETY_BOUND) && (gl_FragCoord.y < SAFETY_BOUND) )
+ {
+ gl_FragColor = vec4(funcfwidth, funcfwidth, funcfwidth, 1.0);
+ }
+ else discard;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag.vert
new file mode 100644
index 000000000..19f17bd5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ vertXY = gtf_Vertex.xy;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dx.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dx.frag
new file mode 100644
index 000000000..023f07111
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dx.frag
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#extension GL_OES_standard_derivatives : enable
+precision mediump float;
+#endif
+
+// setting a boundary for cases where screen sizes may exceed the precision
+// of the arithmetic used.
+#define SAFETY_BOUND 500.0
+
+
+// Macro to scale/bias the range of output. If input is [-1.0, 1.0], maps to [0.5, 1.0]..
+// Accounts for precision errors magnified by derivative operation.
+#define REDUCE_RANGE(A) ((A) + 3.0) / 4.0
+
+varying vec2 vertXY;
+
+uniform float viewportwidth;
+uniform float viewportheight;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float cosine;
+ float sine;
+
+#ifdef GL_OES_standard_derivatives
+ // fwidth of horizontal sine wave with a period of 128 pixels, scaled to go from -1 to +1
+ sine = sin(fract(gl_FragCoord.x / 128.0) * (2.0 * M_PI));
+ cosine = REDUCE_RANGE((128.0 / (2.0 * M_PI)) * fwidth(sine));
+#else
+ cosine = 0.5;
+#endif
+
+ if( (gl_FragCoord.x < SAFETY_BOUND) && (gl_FragCoord.y < SAFETY_BOUND) )
+ {
+ gl_FragColor = vec4(cosine, cosine, cosine, 1.0);
+ }
+ else discard;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dx.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dx.vert
new file mode 100644
index 000000000..19f17bd5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dx.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ vertXY = gtf_Vertex.xy;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dy.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dy.frag
new file mode 100644
index 000000000..24e6be013
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dy.frag
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#extension GL_OES_standard_derivatives : enable
+precision mediump float;
+#endif
+
+// setting a boundary for cases where screen sizes may exceed the precision
+// of the arithmetic used.
+#define SAFETY_BOUND 500.0
+
+// Macro to scale/bias the range of output. If input is [-1.0, 1.0], maps to [0.5, 1.0]..
+// Accounts for precision errors magnified by derivative operation.
+#define REDUCE_RANGE(A) ((A) + 3.0) / 4.0
+
+
+varying vec2 vertXY;
+
+uniform float viewportwidth;
+uniform float viewportheight;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float cosine;
+ float sine;
+
+#ifdef GL_OES_standard_derivatives
+ // fwidth of vertical sine wave with a period of 128 pixels, scaled to go from -1 to +1
+ sine = sin(fract(gl_FragCoord.y / 128.0) * (2.0 * M_PI));
+ cosine = REDUCE_RANGE((128.0 / (2.0 * M_PI)) * fwidth(sine));
+#else
+ cosine = 0.5;
+#endif
+
+ if( (gl_FragCoord.x < SAFETY_BOUND) && (gl_FragCoord.y < SAFETY_BOUND) )
+ {
+ gl_FragColor = vec4(cosine, cosine, cosine, 1.0);
+ }
+ else discard;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dy.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dy.vert
new file mode 100644
index 000000000..19f17bd5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dy.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ vertXY = gtf_Vertex.xy;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref.frag
new file mode 100644
index 000000000..6dc825a78
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref.frag
@@ -0,0 +1,64 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#extension GL_OES_standard_derivatives : enable
+precision mediump float;
+#endif
+
+// setting a boundary for cases where screen sizes may exceed the precision
+// of the arithmetic used.
+#define SAFETY_BOUND 500.0
+
+// Macro to scale/bias the range of output. If input is [-1.0, 1.0], maps to [0.5, 1.0]..
+// Accounts for precision errors magnified by derivative operation.
+#define REDUCE_RANGE(A) ((A) + 3.0) / 4.0
+
+
+uniform float viewportwidth;
+uniform float viewportheight;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float func;
+
+ if( (gl_FragCoord.x < SAFETY_BOUND) && (gl_FragCoord.y < SAFETY_BOUND) )
+ {
+ // average of horizontal and vertical abs cosine waves with periods of 128 pixels
+
+#ifdef GL_OES_standard_derivatives
+ func = REDUCE_RANGE(0.5 * (abs(cos(fract(gl_FragCoord.x / 128.0) * (2.0 * M_PI))) + abs(cos(fract(gl_FragCoord.y / 128.0) * (2.0 * M_PI)))));
+#else
+ func = 0.5;
+#endif
+
+ gl_FragColor = vec4(func, func, func, 1.0);
+ }
+ else discard;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref.vert
new file mode 100644
index 000000000..19f17bd5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ vertXY = gtf_Vertex.xy;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dx.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dx.frag
new file mode 100644
index 000000000..5f7173c3e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dx.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#extension GL_OES_standard_derivatives : enable
+precision mediump float;
+#endif
+
+// setting a boundary for cases where screen sizes may exceed the precision
+// of the arithmetic used.
+#define SAFETY_BOUND 500.0
+
+// Macro to scale/bias the range of output. If input is [-1.0, 1.0], maps to [0.5, 1.0]..
+// Accounts for precision errors magnified by derivative operation.
+#define REDUCE_RANGE(A) ((A) + 3.0) / 4.0
+
+uniform float viewportwidth;
+uniform float viewportheight;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float cosine;
+
+ if( (gl_FragCoord.x < SAFETY_BOUND) && (gl_FragCoord.y < SAFETY_BOUND) )
+ {
+ // horizontal abs cosine wave with a period of 128 pixels
+
+#ifdef GL_OES_standard_derivatives
+ cosine = REDUCE_RANGE(abs(cos(fract(gl_FragCoord.x / 128.0) * (2.0 * M_PI))));
+#else
+ cosine = 0.5;
+#endif
+
+ gl_FragColor = vec4(cosine, cosine, cosine, 1.0);
+ }
+ else discard;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dx.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dx.vert
new file mode 100644
index 000000000..19f17bd5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dx.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ vertXY = gtf_Vertex.xy;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dy.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dy.frag
new file mode 100644
index 000000000..1f25729b4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dy.frag
@@ -0,0 +1,64 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+#extension GL_OES_standard_derivatives : enable
+precision mediump float;
+#endif
+
+// setting a boundary for cases where screen sizes may exceed the precision
+// of the arithmetic used.
+#define SAFETY_BOUND 500.0
+
+// Macro to scale/bias the range of output. If input is [-1.0, 1.0], maps to [0.5, 1.0].
+// Accounts for precision errors magnified by derivative operation.
+#define REDUCE_RANGE(A) ((A) + 3.0) / 4.0
+
+
+uniform float viewportwidth;
+uniform float viewportheight;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ const float M_PI = 3.14159265358979323846;
+ float cosine;
+
+ if( (gl_FragCoord.x < SAFETY_BOUND) && (gl_FragCoord.y < SAFETY_BOUND) )
+ {
+ // vertical abs cosine wave with a period of 128 pixels
+
+#ifdef GL_OES_standard_derivatives
+ cosine = REDUCE_RANGE(abs(cos(fract(gl_FragCoord.y / 128.0) * (2.0 * M_PI))));
+#else
+ cosine = 0.5;
+#endif
+
+ gl_FragColor = vec4(cosine, cosine, cosine, 1.0);
+ }
+ else discard;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dy.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dy.vert
new file mode 100644
index 000000000..19f17bd5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dy.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying vec2 vertXY;
+
+void main (void)
+{
+ vertXY = gtf_Vertex.xy;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects.frag
new file mode 100644
index 000000000..b25540e1e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D gtf_Texture0;
+varying vec4 color;
+varying vec4 gtf_TexCoord[1];
+
+void main (void)
+{
+ gl_FragColor = texture2D(gtf_Texture0, gtf_TexCoord[0].st, 1.0) * color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects.vert
new file mode 100644
index 000000000..3c0c0e076
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects.vert
@@ -0,0 +1,161 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_MultiTexCoord0;
+
+uniform mat4 gtf_ModelViewProjectionMatrix;
+uniform mat3 gtf_NormalMatrix;
+
+varying vec4 gtf_TexCoord[1];
+varying vec4 color;
+
+vec4 Ambient;
+vec4 Diffuse;
+vec4 Specular;
+
+const vec3 lightPosition = vec3(0.0, 0.0, 1.0);
+const vec3 spotDirection = vec3(0.0, 0.0, -1.0);
+const float spotCutoff = 180.0;
+const float spotExponent = 0.0;
+
+const float lightAttenuationConstant = 1.0;
+const float lightAttenuationLinear = 0.0;
+const float lightAttenuationQuadratic = 0.0;
+
+const vec4 lightAmbient = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 lightDiffuse = vec4(1.0, 1.0, 1.0, 1.0);
+vec4 lightSpecular = vec4(1.0, 1.0, 1.0, 1.0);
+
+const float materialShininess = 0.0;
+
+const vec4 sceneColor = vec4(0.0, 0.0, 0.0, 0.0);
+
+void spotLight(in int i,
+ in vec3 normal,
+ in vec3 eye,
+ in vec3 ecPosition3
+ )
+{
+ float nDotVP; // normal . light direction
+ float nDotHV; // normal . light half vector
+ float pf; // power factor
+ float spotDot; // cosine of angle between spotlight
+ float spotAttenuation; // spotlight attenuation factor
+ float attenuation; // computed attenuation factor
+ float d; // distance from surface to light source
+ vec3 VP; // direction from surface to light position
+ vec3 halfVector; // direction of maximum highlights
+
+ // Compute vector from surface to light position
+ VP = lightPosition - ecPosition3;
+
+ // Compute distance between surface and light position
+ d = length(VP);
+
+ // Normalize the vector from surface to light position
+ VP = normalize(VP);
+
+ // Compute attenuation
+ attenuation = 1.0 / (lightAttenuationConstant +
+ lightAttenuationLinear * d +
+ lightAttenuationQuadratic * d * d);
+
+ // See if point on surface is inside cone of illumination
+ spotDot = dot(-VP, normalize(spotDirection));
+
+ if (spotDot < cos(radians(spotCutoff)))
+ spotAttenuation = 0.0; // light adds no contribution
+ else
+ spotAttenuation = pow(spotDot, spotExponent);
+
+ // Combine the spotlight and distance attenuation.
+ attenuation *= spotAttenuation;
+
+ halfVector = normalize(VP + eye);
+
+ nDotVP = max(0.0, dot(normal, VP));
+ nDotHV = max(0.0, dot(normal, halfVector));
+
+ if (nDotVP == 0.0)
+ pf = 0.0;
+ else
+ pf = pow(nDotHV, materialShininess);
+
+ Ambient += lightAmbient * attenuation;
+ Diffuse += lightDiffuse * nDotVP * attenuation;
+ Specular += lightSpecular * pf * attenuation;
+}
+
+vec3 fnormal(void)
+{
+ //Compute the normal
+ vec3 normal = gtf_NormalMatrix * gtf_Normal;
+ normal = normalize(normal);
+
+ return normal;
+}
+
+void flight(in vec3 normal, in vec4 ecPosition, float alphaFade)
+{
+ vec3 ecPosition3;
+ vec3 eye;
+
+ ecPosition3 = (vec3 (ecPosition)) / ecPosition.w;
+ eye = vec3 (0.0, 0.0, 1.0);
+
+ // Clear the light intensity accumulators
+ Ambient = vec4 (0.0);
+ Diffuse = vec4 (0.0);
+ Specular = vec4 (0.0);
+
+ //lightSpecular = gtf_Color;
+
+ spotLight(0, normal, eye, ecPosition3);
+
+ color = sceneColor +
+ Ambient * gtf_Color +
+ Diffuse * gtf_Color;
+ color += Specular * gtf_Color;
+ color = clamp( color, 0.0, 1.0 );
+
+ color.a *= alphaFade;
+}
+
+void main (void)
+{
+ vec3 transformedNormal;
+ float alphaFade = 1.0;
+
+ vec4 ecPosition = gtf_Vertex;
+
+ color = gtf_Color;
+ gtf_TexCoord[0] = gtf_MultiTexCoord0;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ transformedNormal = fnormal();
+ flight(transformedNormal, ecPosition, alphaFade);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_multitexturing.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_multitexturing.frag
new file mode 100644
index 000000000..30115c372
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_multitexturing.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D gtf_Texture0;
+uniform sampler2D gtf_Texture1;
+
+varying vec4 color;
+varying vec4 gtf_TexCoord[2];
+
+void main (void)
+{
+ gl_FragColor = texture2D(gtf_Texture0, gtf_TexCoord[0].st, 1.0);
+ gl_FragColor += texture2D(gtf_Texture1, gtf_TexCoord[1].st, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_multitexturing.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_multitexturing.vert
new file mode 100644
index 000000000..a327a7e0d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_multitexturing.vert
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_MultiTexCoord0;
+attribute vec4 gtf_MultiTexCoord1;
+
+varying vec4 color;
+varying vec4 gtf_TexCoord[2];
+
+void main (void)
+{
+ color = gtf_Color;
+ gtf_TexCoord[0] = gtf_MultiTexCoord0;
+ gtf_TexCoord[1] = gtf_MultiTexCoord1;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_pointSize.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_pointSize.frag
new file mode 100644
index 000000000..e9d460fb2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_pointSize.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_pointSize.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_pointSize.vert
new file mode 100644
index 000000000..2811521b7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_pointSize.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+attribute float gtf_PointSize;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ gl_PointSize = gtf_PointSize;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/copy_texture/copy_texture.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/copy_texture/copy_texture.frag
new file mode 100644
index 000000000..3fc499ba0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/copy_texture/copy_texture.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D gtf_Texture0;
+varying vec4 color;
+varying vec4 gtf_TexCoord[1];
+
+void main (void)
+{
+ if (gtf_TexCoord[0].s == 1.0)
+ gl_FragColor = color;
+ else
+ gl_FragColor = texture2D(gtf_Texture0, gtf_TexCoord[0].st, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default.frag
new file mode 100644
index 000000000..e9d460fb2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default.vert
new file mode 100644
index 000000000..72e83fd03
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ gl_PointSize = 1.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default_textured.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default_textured.frag
new file mode 100644
index 000000000..8db3c6954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default_textured.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform sampler2D gtf_Texture0;
+varying vec4 color;
+varying vec4 gtf_TexCoord[1];
+
+void main (void)
+{
+ gl_FragColor = texture2D(gtf_Texture0, gtf_TexCoord[0].xy);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default_textured.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default_textured.vert
new file mode 100644
index 000000000..1b5b7831a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default_textured.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 gtf_TexCoord[1];
+attribute vec4 gtf_MultiTexCoord0;
+varying vec4 color;
+
+void main (void)
+{
+ color = gtf_Color;
+ gtf_TexCoord[0] = gtf_MultiTexCoord0;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ gl_PointSize = 1.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse.frag
new file mode 100644
index 000000000..2f751e706
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse.vert
new file mode 100644
index 000000000..aafe53fbb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse.vert
@@ -0,0 +1,149 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+uniform mat3 gtf_NormalMatrix;
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+attribute vec3 gtf_Normal;
+
+varying vec4 color;
+
+vec4 Ambient;
+vec4 Diffuse;
+vec4 Specular;
+
+const vec3 lightPosition = vec3(0.0, 0.0, 10.0);
+const float lightAttenuationConstant = 1.0;
+const float lightAttenuationLinear = 0.0;
+const float lightAttenuationQuadratic = 0.0;
+
+const vec4 lightAmbient = vec4(0.0, 0.0, 0.0, 0.0);
+vec4 lightDiffuse = vec4(1.0, 0.0, 0.0, 1.0);
+
+const vec4 materialAmbient = vec4(0.0, 0.0, 0.0, 1.0);
+const vec4 materialDiffuse = vec4(1.0, 1.0, 1.0, 1.0);
+const vec4 materialSpecular = vec4(0.0, 0.0, 0.0, 0.0);
+const float materialShininess = 20.0;
+
+const vec4 sceneColor = vec4(0.0, 0.0, 0.0, 0.0);
+
+
+void pointLight(in int i, in vec3 normal, in vec3 eye, in vec3 ecPosition3)
+{
+ float nDotVP; // normal . light direction
+ float nDotHV; // normal . light half vector
+ float pf; // power factor
+ float attenuation; // computed attenuation factor
+ float d; // distance from surface to light source
+ vec3 VP; // direction from surface to light position
+ vec3 halfVector; // direction of maximum highlights
+
+ // Compute vector from surface to light position
+ VP = lightPosition - ecPosition3;
+
+ // Compute distance between surface and light position
+ d = length(VP);
+
+ // Normalize the vector from surface to light position
+ VP = normalize(VP);
+
+ // Compute attenuation
+ attenuation = 1.0 / (lightAttenuationConstant +
+ lightAttenuationLinear * d +
+ lightAttenuationQuadratic * d * d);
+
+ halfVector = normalize(VP + eye);
+
+ nDotVP = max(0.0, dot(normal, VP));
+ nDotHV = max(0.0, dot(normal, halfVector));
+
+ if (nDotVP == 0.0)
+ {
+ pf = 0.0;
+ }
+ else
+ {
+ pf = pow(nDotHV, materialShininess);
+
+ }
+ Ambient += lightAmbient * attenuation;
+ Diffuse += lightDiffuse * nDotVP * attenuation;
+// Specular += lightSpecular * pf * attenuation;
+}
+
+vec3 fnormal(void)
+{
+ //Compute the normal
+ vec3 normal = gtf_Normal * gtf_NormalMatrix;
+ normal = normalize(normal);
+
+ // This should change to "return normal" but for this test, we force a normal pointing towards the light
+ // return normal
+ return vec3(0.0, 0.0, 1.0);
+}
+
+void flight(in vec3 normal, in vec4 ecPosition, float alphaFade)
+{
+ vec3 ecPosition3;
+ vec3 eye;
+
+ ecPosition3 = (vec3 (ecPosition)) / ecPosition.w;
+ eye = vec3 (0.0, 0.0, 1.0);
+
+ // Clear the light intensity accumulators
+ Ambient = vec4 (0.0);
+ Diffuse = vec4 (0.0);
+ Specular = vec4 (0.0);
+
+ lightDiffuse = gtf_Color;
+
+ pointLight(0, normal, eye, ecPosition3);
+
+ color = sceneColor +
+ Ambient * materialAmbient +
+ Diffuse * materialDiffuse;
+ color += Specular * materialSpecular;
+ color = clamp( color, 0.0, 1.0 );
+
+ color.a *= alphaFade;
+}
+
+
+void main (void)
+{
+ vec3 transformedNormal;
+ float alphaFade = 1.0;
+
+ // Eye-coordinate position of vertex, needed in various calculations
+ vec4 ecPosition = gtf_ModelViewMatrix * gtf_Vertex;
+
+ // Do fixed functionality vertex transform
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ transformedNormal = fnormal();
+ flight(transformedNormal, ecPosition, alphaFade);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse_ref.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse_ref.frag
new file mode 100644
index 000000000..e9d460fb2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse_ref.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse_ref.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse_ref.vert
new file mode 100644
index 000000000..da6387dcc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse_ref.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_rasterization/point_rasterization.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_rasterization/point_rasterization.frag
new file mode 100644
index 000000000..e9d460fb2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_rasterization/point_rasterization.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_rasterization/point_rasterization.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_rasterization/point_rasterization.vert
new file mode 100644
index 000000000..5ff012587
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_rasterization/point_rasterization.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+uniform float gtf_PointSize;
+varying vec4 color;
+
+void main (void)
+{
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ gl_PointSize = gtf_PointSize;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_sprites/point_sprites.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_sprites/point_sprites.frag
new file mode 100644
index 000000000..96a04a9ce
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_sprites/point_sprites.frag
@@ -0,0 +1,31 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+uniform sampler2D gtf_Texture0;
+
+void main (void)
+{
+ gl_FragColor = texture2D(gtf_Texture0, gl_PointCoord.st);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_sprites/point_sprites.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_sprites/point_sprites.vert
new file mode 100644
index 000000000..a85dd66bb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_sprites/point_sprites.vert
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute float gtf_PointSize;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+void main (void)
+{
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ gl_PointSize = gtf_PointSize;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/user_clip_planes/user_clip_planes.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/user_clip_planes/user_clip_planes.frag
new file mode 100644
index 000000000..f91d4b0e8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/user_clip_planes/user_clip_planes.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+varying vec4 color;
+varying float dotClip[2];
+
+void main (void)
+{
+ if (dotClip[0] >= 0.0 || dotClip[1] >= 0.0)
+ discard;
+
+ gl_FragColor = color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/user_clip_planes/user_clip_planes.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/user_clip_planes/user_clip_planes.vert
new file mode 100644
index 000000000..ed27fe77e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/user_clip_planes/user_clip_planes.vert
@@ -0,0 +1,44 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+varying float dotClip[2];
+
+void main (void)
+{
+ vec4 userClipPlanes[2];
+ userClipPlanes[0] = vec4(0.0, 1.0, 0.0, 0.0);
+ userClipPlanes[1] = vec4(-1.0, 0.0, 0.0, 0.0);
+
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+
+ dotClip[0] = dot(userClipPlanes[0], gl_Position);
+ dotClip[1] = dot(userClipPlanes[1], gl_Position);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/successfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/successfulcompile_frag.frag
new file mode 100644
index 000000000..906948954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/successfulcompile_frag.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float mortarThickness;
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/successfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/successfulcompile_vert.vert
new file mode 100644
index 000000000..3b42e9d15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/successfulcompile_vert.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform float Scale;
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex) * Scale;
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ lightIntensity = dot(normalize(LightPosition - vec3(pos)), tnorm) * 1.5;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/unsuccessfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/unsuccessfulcompile_frag.frag
new file mode 100644
index 000000000..fd4718885
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/unsuccessfulcompile_frag.frag
@@ -0,0 +1,83 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float GrainSize;
+uniform vec3 DarkColor;
+uniform vec3 colorSpread;
+
+varying float lightIntensity;
+varying vec3 Position;
+
+void main (void)
+{
+ //
+ // cheap noise
+ //
+ vec3 location = Position;
+
+ vec3 floorvec = vec3(floor(Position.x * 10.0), 0.0, floor(Position.z * 10.0));
+ vec3 noise = Position * 10.0 - floorvec - 0.5;
+ noise *= noise;
+ location += noise * 0.12;
+
+ //
+ // distance from axis
+ //
+ float dist = location.x * location.x + location.z * location.z;
+ float grain = dist / GrainSize;
+
+ //
+ // grain effects as function of distance
+ //
+ float brightness = fract(grain);
+ if (brightness > 0.5)
+ brightness = (1.0 - brightness);
+ vec3 color = DarkColor + 0.5 * brightness * (colorSpread);
+
+ brightness = fract(grain*7.0);
+ if (brightness > 0.5)
+ brightness = 1.0 - brightness;
+ color -= 0.5 * brightness * colorSpread;
+
+ //
+ // also as a function of lines parallel to the axis
+ //
+ brightness = fract(grain*47.0);
+ float line = fract(Position.z + Position.x);
+ float snap = floor(line * 30.0) * (1.0/30.0);
+ if (line < snap + 0.004)
+ color -= 0.5 * brightness * colorSpread;
+
+ //
+ // apply lighting effects from vertex processor
+ //
+ color *= lightIntensity;
+ color = clamp(color, 0.0, 1.0);
+
+ gl_FragColor = vec4(color, 0.1)
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/unsuccessfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/unsuccessfulcompile_vert.vert
new file mode 100644
index 000000000..c73892a4c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/unsuccessfulcompile_vert.vert
@@ -0,0 +1,60 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform vec3 NotActiveOne;
+attribute float myAttribute1;
+attribute float myAttribute2;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex_Color;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ //float spec = clamp(dot(reflectVec, viewVec), 0.0, 1.0);
+ float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/bind_attribute_location/brick.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/bind_attribute_location/brick.frag
new file mode 100644
index 000000000..870d53d05
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/bind_attribute_location/brick.frag
@@ -0,0 +1,64 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+uniform float mortarThickness;
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/bind_attribute_location/brick.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/bind_attribute_location/brick.vert
new file mode 100644
index 000000000..8895eba88
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/bind_attribute_location/brick.vert
@@ -0,0 +1,60 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform vec3 NotActiveOne;
+attribute float myAttribute1;
+attribute vec3 myAttribute2;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ //float spec = clamp(dot(reflectVec, viewVec), 0.0, 1.0);
+ float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2[1]);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/brick.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/brick.vert
new file mode 100644
index 000000000..c73892a4c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/brick.vert
@@ -0,0 +1,60 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform vec3 NotActiveOne;
+attribute float myAttribute1;
+attribute float myAttribute2;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex_Color;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ //float spec = clamp(dot(reflectVec, viewVec), 0.0, 1.0);
+ float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/texture.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/texture.frag
new file mode 100644
index 000000000..c37982eb2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/texture.frag
@@ -0,0 +1,52 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+//
+// wobble.frag: Fragment shader for wobbling a texture
+//
+// author: Antonio Tejada
+//
+//
+
+varying vec3 Position;
+varying float lightIntensity;
+
+/* Constants */
+
+uniform sampler2D sampler2d; // value of sampler2d = 0
+varying vec4 gtf_TexCoord[1];
+
+void main (void)
+{
+ vec3 lightColor = vec3(texture2D(sampler2d, vec2(gtf_TexCoord[0]))) * lightIntensity;
+
+ vec3 ct = clamp(lightColor, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/wood.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/wood.frag
new file mode 100644
index 000000000..fd4718885
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/wood.frag
@@ -0,0 +1,83 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float GrainSize;
+uniform vec3 DarkColor;
+uniform vec3 colorSpread;
+
+varying float lightIntensity;
+varying vec3 Position;
+
+void main (void)
+{
+ //
+ // cheap noise
+ //
+ vec3 location = Position;
+
+ vec3 floorvec = vec3(floor(Position.x * 10.0), 0.0, floor(Position.z * 10.0));
+ vec3 noise = Position * 10.0 - floorvec - 0.5;
+ noise *= noise;
+ location += noise * 0.12;
+
+ //
+ // distance from axis
+ //
+ float dist = location.x * location.x + location.z * location.z;
+ float grain = dist / GrainSize;
+
+ //
+ // grain effects as function of distance
+ //
+ float brightness = fract(grain);
+ if (brightness > 0.5)
+ brightness = (1.0 - brightness);
+ vec3 color = DarkColor + 0.5 * brightness * (colorSpread);
+
+ brightness = fract(grain*7.0);
+ if (brightness > 0.5)
+ brightness = 1.0 - brightness;
+ color -= 0.5 * brightness * colorSpread;
+
+ //
+ // also as a function of lines parallel to the axis
+ //
+ brightness = fract(grain*47.0);
+ float line = fract(Position.z + Position.x);
+ float snap = floor(line * 30.0) * (1.0/30.0);
+ if (line < snap + 0.004)
+ color -= 0.5 * brightness * colorSpread;
+
+ //
+ // apply lighting effects from vertex processor
+ //
+ color *= lightIntensity;
+ color = clamp(color, 0.0, 1.0);
+
+ gl_FragColor = vec4(color, 0.1)
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/wood.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/wood.vert
new file mode 100644
index 000000000..3b42e9d15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/wood.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform float Scale;
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex) * Scale;
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ lightIntensity = dot(normalize(LightPosition - vec3(pos)), tnorm) * 1.5;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/delete_object/successfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/delete_object/successfulcompile_frag.frag
new file mode 100644
index 000000000..906948954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/delete_object/successfulcompile_frag.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float mortarThickness;
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/delete_object/successfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/delete_object/successfulcompile_vert.vert
new file mode 100644
index 000000000..3b42e9d15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/delete_object/successfulcompile_vert.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform float Scale;
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex) * Scale;
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ lightIntensity = dot(normalize(LightPosition - vec3(pos)), tnorm) * 1.5;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/detach_shader/successfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/detach_shader/successfulcompile_frag.frag
new file mode 100644
index 000000000..906948954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/detach_shader/successfulcompile_frag.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float mortarThickness;
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/detach_shader/successfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/detach_shader/successfulcompile_vert.vert
new file mode 100644
index 000000000..3b42e9d15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/detach_shader/successfulcompile_vert.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform float Scale;
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex) * Scale;
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ lightIntensity = dot(normalize(LightPosition - vec3(pos)), tnorm) * 1.5;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/framebuffer_objects/fboShader0.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/framebuffer_objects/fboShader0.frag
new file mode 100644
index 000000000..92e465d7e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/framebuffer_objects/fboShader0.frag
@@ -0,0 +1,46 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+varying vec4 color;
+varying vec4 texCoord[1];
+
+uniform sampler2D gtf_Texture0;
+uniform int gtf_UseTexture;
+
+void main (void)
+{
+ if ( gtf_UseTexture == 1 )
+ {
+ gl_FragColor = texture2D(gtf_Texture0, texCoord[0].xy);
+ }
+ else
+ {
+ gl_FragColor = color;
+ }
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/framebuffer_objects/fboShader0.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/framebuffer_objects/fboShader0.vert
new file mode 100644
index 000000000..97b4bcf81
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/framebuffer_objects/fboShader0.vert
@@ -0,0 +1,40 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Color;
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_MultiTexCoord0;
+
+varying vec4 texCoord[1];
+varying vec4 color;
+
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+void main (void)
+{
+ color = gtf_Color;
+ texCoord[0] = gtf_MultiTexCoord0;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick.frag
new file mode 100644
index 000000000..906948954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float mortarThickness;
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat2.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat2.vert
new file mode 100644
index 000000000..2f30ce654
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat2.vert
@@ -0,0 +1,62 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec3 gtf_Normal;
+attribute mat2 myAttrib2m;
+
+uniform mat3 gtf_NormalMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ float f = myAttrib2m[0][0];
+
+ float spec = clamp(dot(reflectVec, viewVec), f, 1.0);
+ //float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat3.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat3.vert
new file mode 100644
index 000000000..6653570d6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat3.vert
@@ -0,0 +1,62 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec3 gtf_Normal;
+attribute mat3 myAttrib3m;
+
+uniform mat3 gtf_NormalMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ float f = myAttrib3m[0][0];
+
+ float spec = clamp(dot(reflectVec, viewVec), f, 1.0);
+ //float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat4.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat4.vert
new file mode 100644
index 000000000..41cbc95b2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat4.vert
@@ -0,0 +1,62 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec3 gtf_Normal;
+attribute mat4 myAttrib4m;
+
+uniform mat3 gtf_NormalMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ float f = myAttrib4m[0][0];
+
+ float spec = clamp(dot(reflectVec, viewVec), f, 1.0);
+ //float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_vec.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_vec.vert
new file mode 100644
index 000000000..cbb971545
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_vec.vert
@@ -0,0 +1,65 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec3 gtf_Normal;
+attribute float myAttrib1f;
+attribute vec2 myAttrib2f;
+attribute vec3 myAttrib3f;
+attribute vec4 myAttrib4f;
+
+uniform mat3 gtf_NormalMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ float f = myAttrib1f + myAttrib2f[0] + myAttrib3f[0] + myAttrib4f[0];
+
+ float spec = clamp(dot(reflectVec, viewVec), f, 1.0);
+ //float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_uniform/brick.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_uniform/brick.frag
new file mode 100644
index 000000000..41c8d30a2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_uniform/brick.frag
@@ -0,0 +1,62 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_uniform/brick.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_uniform/brick.vert
new file mode 100644
index 000000000..cc24e815f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_uniform/brick.vert
@@ -0,0 +1,88 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+varying float lightIntensity;
+varying vec3 Position;
+
+ // Used in the vertex shader.
+uniform mat3 gtf_NormalMatrix; //< 1
+uniform mat4 gtf_ModelViewMatrix; //< 2
+uniform mat4 gtf_ModelViewProjectionMatrix; //< 3
+uniform float myAttrib1f; //< 4
+uniform vec2 myAttrib2f; //< 5
+uniform vec3 LightPosition; //< 6
+uniform vec4 myAttrib4f; //< 7
+uniform int myAttrib1i; //< 8
+uniform ivec2 myAttrib2i; //< 9
+uniform ivec3 myAttrib3i; //< 10
+uniform ivec4 myAttrib4i; //< 11
+uniform bool myAttrib1b; //< 12
+uniform bvec2 myAttrib2b; //< 13
+uniform bvec3 myAttrib3b; //< 14
+uniform bvec4 myAttrib4b; //< 15
+uniform mat2 myAttrib2m; //< 16
+uniform mat3 myAttrib3m; //< 17
+uniform mat4 myAttrib4m; //< 18
+uniform float myUniformfv[5]; //< 19
+ // Used in the fragment shader.
+uniform vec3 brickColor; //< 20
+uniform vec3 mortarColor; //< 21
+uniform float brickMortarWidth; //< 22
+uniform float brickMortarHeight; //< 23
+uniform float mwf; //< 24
+uniform float mhf; //< 25
+
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ float f = myAttrib1f + myAttrib2f[0] + myAttrib4f[0]
+ + float(myAttrib1i) + float(myAttrib2i[0]) + float(myAttrib3i[0]) + float(myAttrib4i[0])
+ + float(myAttrib1b) + float(myAttrib2b[0]) + float(myAttrib3b[0]) + float(myAttrib4b[0])
+ + myAttrib2m[0][0] + myAttrib3m[0][0] + myAttrib4m[0][0]
+ + myUniformfv[0] + myUniformfv[1] + myUniformfv[2] + myUniformfv[3] + myUniformfv[4];
+
+ //float spec = clamp(dot(reflectVec, viewVec), 0.0, 1.0);
+ float spec = clamp(dot(reflectVec, viewVec), f, 1.0);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_attribute_location/brick.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_attribute_location/brick.frag
new file mode 100644
index 000000000..2bec40d3c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_attribute_location/brick.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec3 colors;
+
+void main (void)
+{
+ gl_FragColor = vec4 (colors, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_attribute_location/brick.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_attribute_location/brick.vert
new file mode 100644
index 000000000..2a94ead4f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_attribute_location/brick.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute float myAttribute1;
+attribute float myAttribute2;
+attribute float myAttribute3;
+
+varying vec3 colors;
+
+void main(void)
+{
+ colors = vec3(myAttribute1, 0, 0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_handle/successfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_handle/successfulcompile_frag.frag
new file mode 100644
index 000000000..906948954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_handle/successfulcompile_frag.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float mortarThickness;
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_handle/successfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_handle/successfulcompile_vert.vert
new file mode 100644
index 000000000..3b42e9d15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_handle/successfulcompile_vert.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform float Scale;
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex) * Scale;
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ lightIntensity = dot(normalize(LightPosition - vec3(pos)), tnorm) * 1.5;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_uniform_location/brick.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_uniform_location/brick.frag
new file mode 100644
index 000000000..906948954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_uniform_location/brick.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float mortarThickness;
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_uniform_location/brick.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_uniform_location/brick.vert
new file mode 100644
index 000000000..24227d48f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_uniform_location/brick.vert
@@ -0,0 +1,60 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform vec3 NotActiveOne;
+attribute float myAttribute1;
+attribute float myAttribute2;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ //float spec = clamp(dot(reflectVec, viewVec), 0.0, 1.0);
+ float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramInfoLog_2.0/simple.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramInfoLog_2.0/simple.frag
new file mode 100644
index 000000000..99c78e207
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramInfoLog_2.0/simple.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec3 tc;
+
+void main (void)
+{
+ vec3 foo = tc;
+ gl_FragColor = vec4 (foo, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramInfoLog_2.0/simple.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramInfoLog_2.0/simple.vert
new file mode 100644
index 000000000..cc4028a5f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramInfoLog_2.0/simple.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+uniform vec3 triangleColor;
+varying vec3 tc;
+
+void main(void)
+{
+ tc = triangleColor;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramiv_2.0/brick.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramiv_2.0/brick.frag
new file mode 100644
index 000000000..906948954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramiv_2.0/brick.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float mortarThickness;
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramiv_2.0/brick.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramiv_2.0/brick.vert
new file mode 100644
index 000000000..24227d48f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramiv_2.0/brick.vert
@@ -0,0 +1,60 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform vec3 NotActiveOne;
+attribute float myAttribute1;
+attribute float myAttribute2;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ //float spec = clamp(dot(reflectVec, viewVec), 0.0, 1.0);
+ float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetShaderInfoLog_2.0/simple.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetShaderInfoLog_2.0/simple.frag
new file mode 100644
index 000000000..99c78e207
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetShaderInfoLog_2.0/simple.frag
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec3 tc;
+
+void main (void)
+{
+ vec3 foo = tc;
+ gl_FragColor = vec4 (foo, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetShaderInfoLog_2.0/simple.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetShaderInfoLog_2.0/simple.vert
new file mode 100644
index 000000000..cc4028a5f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetShaderInfoLog_2.0/simple.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+uniform vec3 triangleColor;
+varying vec3 tc;
+
+void main(void)
+{
+ tc = triangleColor;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.frag
new file mode 100644
index 000000000..5ca53807e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.frag
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform bool funi1;
+uniform bvec2 funi2;
+uniform bvec3 funi3;
+uniform bvec4 funi4;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 temp = vec4(0.0, 0.0, 0.0, 0.0);
+ if(funi1 || funi2[0] && funi2[1] && funi3[0] && funi3[1] && funi3[2] || funi4[0] && funi4[1] && funi4[2] && funi4[3])
+ temp = vec4(1.0, 0.0, 0.5, 1.0);
+ gl_FragColor = temp + color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.vert
new file mode 100644
index 000000000..1d9153361
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+uniform bool vuni1;
+uniform bvec2 vuni2;
+uniform bvec3 vuni3;
+uniform bvec4 vuni4;
+varying vec4 color;
+
+void main (void)
+{
+ if(vuni1 || vuni2[0] && vuni2[1] && vuni3[0] && vuni3[1] && vuni3[2] || vuni4[0] && vuni4[1] && vuni4[2] && vuni4[3])
+ color = vec4(1.0, 0.0, 0.5, 1.0);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.frag
new file mode 100644
index 000000000..6d7e37eba
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform int funi1;
+uniform ivec2 funi2;
+uniform ivec3 funi3;
+uniform ivec4 funi4;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 temp = vec4(float(funi1), float(funi2[0] + funi2[1]), float(funi3[0] + funi3[1] + funi3[2]), float(funi4[0] + funi4[1] + funi4[2] + funi4[3]));
+ gl_FragColor = temp + color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.vert
new file mode 100644
index 000000000..d854d0f4b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+uniform int vuni1;
+uniform ivec2 vuni2;
+uniform ivec3 vuni3;
+uniform ivec4 vuni4;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(float(vuni1), float(vuni2[0] + vuni2[1]), float(vuni3[0] + vuni3[1] + vuni3[2]), float(vuni4[0] + vuni4[1] + vuni4[2] + vuni4[3]) );
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/mat_tests.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/mat_tests.frag
new file mode 100644
index 000000000..ea3f85995
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/mat_tests.frag
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform mat2 funi2;
+uniform mat3 funi3;
+uniform mat4 funi4;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 temp = vec4( funi2[0][0] + funi2[0][1] + funi2[1][0] + funi2[1][1],
+
+ funi3[0][0] + funi3[0][1] + funi3[0][2] + funi3[1][0] + funi3[1][1] + funi3[1][2] + funi3[2][0] + funi3[2][1] + funi3[2][2],
+
+ funi4[0][0] + funi4[0][1] + funi4[0][2] + funi4[0][3] + funi4[1][0] + funi4[1][1] + funi4[1][2] + funi4[1][3] + funi4[2][0] + funi4[2][1] + funi4[2][2] + funi4[2][3] + funi4[3][0] + funi4[3][1] + funi4[3][2] + funi4[3][3], 1.0 );
+ gl_FragColor = temp + color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/mat_tests.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/mat_tests.vert
new file mode 100644
index 000000000..f3f6e0dcc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/mat_tests.vert
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+uniform mat2 vuni2;
+uniform mat3 vuni3;
+uniform mat4 vuni4;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4( vuni2[0][0] + vuni2[0][1] + vuni2[1][0] + vuni2[1][1],
+
+ vuni3[0][0] + vuni3[0][1] + vuni3[0][2] + vuni3[1][0] + vuni3[1][1] + vuni3[1][2] + vuni3[2][0] + vuni3[2][1] + vuni3[2][2],
+
+ vuni4[0][0] + vuni4[0][1] + vuni4[0][2] + vuni4[0][3] + vuni4[1][0] + vuni4[1][1] + vuni4[1][2] + vuni4[1][3] + vuni4[2][0] + vuni4[2][1] + vuni4[2][2] + vuni4[2][3] + vuni4[3][0] + vuni4[3][1] + vuni4[3][2] + vuni4[3][3], 1.0 );
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/vec_tests.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/vec_tests.frag
new file mode 100644
index 000000000..e3f2c84db
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/vec_tests.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float funi1;
+uniform vec2 funi2;
+uniform vec3 funi3;
+uniform vec4 funi4;
+varying vec4 color;
+
+void main (void)
+{
+ vec4 temp = vec4(funi1, funi2[0] + funi2[1], funi3[0] + funi3[1] + funi3[2], funi4[0] + funi4[1] + funi4[2] + funi4[3]);
+ gl_FragColor = temp + color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/vec_tests.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/vec_tests.vert
new file mode 100644
index 000000000..86138149d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/vec_tests.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+uniform float vuni1;
+uniform vec2 vuni2;
+uniform vec3 vuni3;
+uniform vec4 vuni4;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(vuni1, vuni2[0] + vuni2[1], vuni3[0] + vuni3[1] + vuni3[2], vuni4[0] + vuni4[1] + vuni4[2] + vuni4[3]);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/mat_tests.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/mat_tests.vert
new file mode 100644
index 000000000..e9b83a490
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/mat_tests.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute mat3 att3;
+attribute mat4 att4;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4( 1.0,
+
+ att3[0][0] + att3[0][1] + att3[0][2] + att3[1][0] + att3[1][1] + att3[1][2] + att3[2][0] + att3[2][1] + att3[2][2],
+
+ att4[0][0] + att4[0][1] + att4[0][2] + att4[0][3] + att4[1][0] + att4[1][1] + att4[1][2] + att4[1][3] + att4[2][0] + att4[2][1] + att4[2][2] + att4[2][3] + att4[3][0] + att4[3][1] + att4[3][2] + att4[3][3], 1.0 );
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/mat_tests2.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/mat_tests2.vert
new file mode 100644
index 000000000..2d0fbeea7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/mat_tests2.vert
@@ -0,0 +1,41 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute mat2 att2;
+attribute mat3 att3;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4( att2[0][0] + att2[0][1] + att2[1][0] + att2[1][1],
+
+ att3[0][0] + att3[0][1] + att3[0][2] + att3[1][0] + att3[1][1] + att3[1][2] + att3[2][0] + att3[2][1] + att3[2][2],
+
+ 1.0, 1.0 );
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/vec_tests.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/vec_tests.vert
new file mode 100644
index 000000000..fc870e739
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/vec_tests.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute float att1;
+attribute vec2 att2;
+attribute vec3 att3;
+attribute vec4 att4;
+varying vec4 color;
+
+void main (void)
+{
+ color = vec4(att1, att2.x + att2.y, att3.x + att3.y + att3.z, att4.x + att4.y + att4.z + att4.w);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_frag.frag
new file mode 100644
index 000000000..a8d9f3fe4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform bool color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (float(color), 0.0, 0.0, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_vert.frag
new file mode 100644
index 000000000..ba62f2f2d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_vert.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying float col;
+
+void main (void)
+{
+ gl_FragColor = vec4 (col, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_vert.vert
new file mode 100644
index 000000000..a28e76a77
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute vec4 gtf_Color;
+uniform bool color;
+varying float col;
+void main (void)
+{
+ col = float(color);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_frag.frag
new file mode 100644
index 000000000..9156be3c0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (color, 0.0, 0.0, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_vert.frag
new file mode 100644
index 000000000..ac8f2b4cc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_vert.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying float col;
+void main (void)
+{
+ gl_FragColor = vec4 (col, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_vert.vert
new file mode 100644
index 000000000..066994397
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute vec4 gtf_Color;
+uniform float color;
+varying float col;
+void main (void)
+{
+ col = color;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_frag.frag
new file mode 100644
index 000000000..35d70bce9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform int color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (color, 0.0, 0.0, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_vert.frag
new file mode 100644
index 000000000..ac8f2b4cc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_vert.frag
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying float col;
+void main (void)
+{
+ gl_FragColor = vec4 (col, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_vert.vert
new file mode 100644
index 000000000..7f22a9674
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute vec4 gtf_Color;
+uniform int color;
+varying float col;
+void main (void)
+{
+ col = float(color);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/21f_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/21f_frag.frag
new file mode 100644
index 000000000..c60e5e07d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/21f_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float color[2];
+
+void main (void)
+{
+ gl_FragColor = vec4 (color[0], color[1], 0.0, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/21i_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/21i_frag.frag
new file mode 100644
index 000000000..16960a59b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/21i_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform int color[2];
+
+void main (void)
+{
+ float r = float(color[0]);
+ float g = float(color[1]);
+ gl_FragColor = vec4 (r/256.0, g/256.0, 0.0, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/22f_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/22f_frag.frag
new file mode 100644
index 000000000..dd823e361
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/22f_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform vec2 color[2];
+
+void main (void)
+{
+ gl_FragColor = vec4 (color[0][0], color[0][1], color[1][0], color[1][1]);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/22i_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/22i_frag.frag
new file mode 100644
index 000000000..67577430b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/22i_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform ivec2 color[2];
+
+void main (void)
+{
+ float r = float(color[0][0]);
+ float g = float(color[0][1]);
+ float b = float(color[1][0]);
+ float a = float(color[1][1]);
+
+ gl_FragColor = vec4 (r/256.0, g/256.0, b/256.0, a/256.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/23f_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/23f_frag.frag
new file mode 100644
index 000000000..8d7a6c3ba
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/23f_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform vec3 color[2];
+
+void main (void)
+{
+ gl_FragColor = vec4 (color[0][0] + color[0][1] + color[0][2],
+ color[1][0] + color[1][1] + color[1][2],
+ 0.0, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/23i_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/23i_frag.frag
new file mode 100644
index 000000000..c4574b870
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/23i_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform ivec3 color[2];
+
+void main (void)
+{
+ float r = float(color[0][0] + color[0][1] + color[0][2]);
+ float g = float(color[1][0] + color[1][1] + color[1][2]);
+
+ gl_FragColor = vec4(r/256.0, g/256.0, 0.0, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/24f_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/24f_frag.frag
new file mode 100644
index 000000000..5363d5e49
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/24f_frag.frag
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform vec4 color[2];
+
+void main (void)
+{
+ gl_FragColor = vec4 (color[0][0] + color[0][1] + color[0][2] + color[0][3],
+ color[1][0] + color[1][1] + color[1][2] + color[1][3],
+ 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/24i_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/24i_frag.frag
new file mode 100644
index 000000000..842735415
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/24i_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform ivec4 color[2];
+
+void main (void)
+{
+ float r = float(color[0][0] + color[0][1] + color[0][2] + color[0][3]);
+ float g = float(color[1][0] + color[1][1] + color[1][2] + color[1][3]);
+
+ gl_FragColor = vec4 (r/256.0, g/256.0, 0.0, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_frag.frag
new file mode 100644
index 000000000..83e9039ca
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform bvec2 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (vec2(color), 0.0, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_vert.frag
new file mode 100644
index 000000000..7ce39a191
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_vert.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec2 col;
+
+void main (void)
+{
+ gl_FragColor = vec4 (col[0], col[1], 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_vert.vert
new file mode 100644
index 000000000..b40967528
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute vec4 gtf_Color;
+uniform bvec2 color;
+varying vec2 col;
+void main (void)
+{
+ col = vec2(color);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_frag.frag
new file mode 100644
index 000000000..655e0d31d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform vec2 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (color, 0.0, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_vert.frag
new file mode 100644
index 000000000..14a4b2959
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_vert.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec2 col;
+
+void main (void)
+{
+ gl_FragColor = vec4 (col, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_vert.vert
new file mode 100644
index 000000000..41ecaf70e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute vec4 gtf_Color;
+uniform vec2 color;
+varying vec2 col;
+void main (void)
+{
+ col = color;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_frag.frag
new file mode 100644
index 000000000..edb986a0b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform ivec2 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (color[0], color[1], 0.0, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_vert.frag
new file mode 100644
index 000000000..14a4b2959
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_vert.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec2 col;
+
+void main (void)
+{
+ gl_FragColor = vec4 (col, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_vert.vert
new file mode 100644
index 000000000..8cd247668
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute vec4 gtf_Color;
+uniform ivec2 color;
+varying vec2 col;
+void main (void)
+{
+ col = vec2(color);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2m_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2m_frag.frag
new file mode 100644
index 000000000..98e98ac4a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2m_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform mat2 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (color[0][0] + color[0][1], color[1][0] + color[1][1], 0.0, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_frag.frag
new file mode 100644
index 000000000..80f1ef9f8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform bvec3 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (vec3(color), 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_vert.frag
new file mode 100644
index 000000000..be8e7b195
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_vert.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec3 col;
+
+void main (void)
+{
+ gl_FragColor = vec4 (col[0], col[1], col[2], 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_vert.vert
new file mode 100644
index 000000000..d74e4a37f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute vec4 gtf_Color;
+uniform bvec3 color;
+varying vec3 col;
+void main (void)
+{
+ col = vec3(color);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_frag.frag
new file mode 100644
index 000000000..00e8aa71d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform vec3 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (color, 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_vert.frag
new file mode 100644
index 000000000..603ba0d65
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_vert.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec3 col;
+
+void main (void)
+{
+ gl_FragColor = vec4 (col, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_vert.vert
new file mode 100644
index 000000000..d35becff1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute vec4 gtf_Color;
+uniform vec3 color;
+varying vec3 col;
+void main (void)
+{
+ col = color;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_frag.frag
new file mode 100644
index 000000000..a2f0a3cdd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform ivec3 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (color[0], color[1], color[2], 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_vert.frag
new file mode 100644
index 000000000..603ba0d65
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_vert.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec3 col;
+
+void main (void)
+{
+ gl_FragColor = vec4 (col, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_vert.vert
new file mode 100644
index 000000000..d27c38f58
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute vec4 gtf_Color;
+uniform ivec3 color;
+varying vec3 col;
+void main (void)
+{
+ col = vec3(color);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3m_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3m_frag.frag
new file mode 100644
index 000000000..9de572884
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3m_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform mat3 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (color[0][0] + color[0][1] + color[0][2],
+ color[1][0] + color[1][1] + color[1][2],
+ color[2][0] + color[2][1] + color[2][2],
+ 1.0);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_firstthree_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_firstthree_frag.frag
new file mode 100644
index 000000000..1700c2b76
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_firstthree_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform bvec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (float(color[0]), float(color[1]), float(color[2]), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_firstthree_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_firstthree_vert.frag
new file mode 100644
index 000000000..ee81a869b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_firstthree_vert.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 col;
+
+void main (void)
+{
+ gl_FragColor = vec4 (col[0], col[1], col[2], 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_lastthree_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_lastthree_frag.frag
new file mode 100644
index 000000000..024f3ca54
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_lastthree_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform bvec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (float(color[1]), float(color[2]), float(color[3]), 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_lastthree_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_lastthree_vert.frag
new file mode 100644
index 000000000..408d60354
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_lastthree_vert.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 col;
+
+void main (void)
+{
+ gl_FragColor = vec4 (col[1], col[2], col[3], 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_vert.vert
new file mode 100644
index 000000000..a8ce5e1d7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute vec4 gtf_Color;
+uniform bvec4 color;
+varying vec4 col;
+void main (void)
+{
+ col = vec4(color);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_frag.frag
new file mode 100644
index 000000000..bda6bc139
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform vec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (color[0], color[1], color[2], color[3]);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_vert.frag
new file mode 100644
index 000000000..4f771b09f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_vert.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 col;
+
+void main (void)
+{
+ gl_FragColor = vec4 (col[0], col[1], col[2], col[3]);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_vert.vert
new file mode 100644
index 000000000..531294884
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute vec4 gtf_Color;
+uniform vec4 color;
+varying vec4 col;
+void main (void)
+{
+ col = color;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_frag.frag
new file mode 100644
index 000000000..bd00e3c33
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_frag.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform ivec4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (color[0], color[1], color[2], color[3]);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_vert.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_vert.frag
new file mode 100644
index 000000000..4f771b09f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_vert.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 col;
+
+void main (void)
+{
+ gl_FragColor = vec4 (col[0], col[1], col[2], col[3]);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_vert.vert
new file mode 100644
index 000000000..ea97a4255
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_vert.vert
@@ -0,0 +1,35 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute vec4 gtf_Color;
+uniform ivec4 color;
+varying vec4 col;
+void main (void)
+{
+ col = vec4(color);
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4m_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4m_frag.frag
new file mode 100644
index 000000000..030ef608f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4m_frag.frag
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform mat4 color;
+
+void main (void)
+{
+ gl_FragColor = vec4 (color[0][0] + color[0][1] + color[0][2] + color[0][3],
+ color[1][0] + color[1][1] + color[1][2] + color[1][3],
+ color[2][0] + color[2][1] + color[2][2] + color[2][3],
+ color[3][0] + color[3][1] + color[3][2] + color[3][3]);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/default.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/default.vert
new file mode 100644
index 000000000..45426238d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/default.vert
@@ -0,0 +1,33 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+void main (void)
+{
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+ gl_PointSize = 1.0;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2VSU.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2VSU.frag
new file mode 100644
index 000000000..fc4b633d3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2VSU.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = color; // Apply it on a per vertex level
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2VSU.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2VSU.vert
new file mode 100644
index 000000000..c5908900a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2VSU.vert
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+uniform mat4 transforms;
+uniform mat4 anotherMatrix;
+
+varying vec4 color;
+
+void main(void)
+{
+ color = gtf_Color; // color is per vertex and matches glColor already used by Vertex
+
+ gl_Position = gtf_ModelViewProjectionMatrix* transforms * anotherMatrix * gtf_Vertex;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2arrayVSU.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2arrayVSU.frag
new file mode 100644
index 000000000..fc4b633d3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2arrayVSU.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = color; // Apply it on a per vertex level
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2arrayVSU.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2arrayVSU.vert
new file mode 100644
index 000000000..b28a0a52e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2arrayVSU.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+uniform mat4 transforms[2];
+
+varying vec4 color;
+
+void main(void)
+{
+ color = gtf_Color; // color is per vertex and matches glColor already used by Vertex
+
+ gl_Position = gtf_ModelViewProjectionMatrix* transforms[0] * transforms[1] * gtf_Vertex;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrixVSU.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrixVSU.frag
new file mode 100644
index 000000000..fc4b633d3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrixVSU.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 color;
+
+void main (void)
+{
+ gl_FragColor = color; // Apply it on a per vertex level
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrixVSU.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrixVSU.vert
new file mode 100644
index 000000000..1e4264cbc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrixVSU.vert
@@ -0,0 +1,38 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+uniform mat4 transforms;
+varying vec4 color;
+
+void main(void)
+{
+ color = gtf_Color; // color is per vertex and matches glColor used
+
+ gl_Position = gtf_ModelViewProjectionMatrix* transforms * gtf_Vertex;
+
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/successfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/successfulcompile_frag.frag
new file mode 100644
index 000000000..906948954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/successfulcompile_frag.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float mortarThickness;
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/successfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/successfulcompile_vert.vert
new file mode 100644
index 000000000..3b42e9d15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/successfulcompile_vert.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform float Scale;
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex) * Scale;
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ lightIntensity = dot(normalize(LightPosition - vec3(pos)), tnorm) * 1.5;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/unsuccessfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/unsuccessfulcompile_frag.frag
new file mode 100644
index 000000000..fd4718885
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/unsuccessfulcompile_frag.frag
@@ -0,0 +1,83 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float GrainSize;
+uniform vec3 DarkColor;
+uniform vec3 colorSpread;
+
+varying float lightIntensity;
+varying vec3 Position;
+
+void main (void)
+{
+ //
+ // cheap noise
+ //
+ vec3 location = Position;
+
+ vec3 floorvec = vec3(floor(Position.x * 10.0), 0.0, floor(Position.z * 10.0));
+ vec3 noise = Position * 10.0 - floorvec - 0.5;
+ noise *= noise;
+ location += noise * 0.12;
+
+ //
+ // distance from axis
+ //
+ float dist = location.x * location.x + location.z * location.z;
+ float grain = dist / GrainSize;
+
+ //
+ // grain effects as function of distance
+ //
+ float brightness = fract(grain);
+ if (brightness > 0.5)
+ brightness = (1.0 - brightness);
+ vec3 color = DarkColor + 0.5 * brightness * (colorSpread);
+
+ brightness = fract(grain*7.0);
+ if (brightness > 0.5)
+ brightness = 1.0 - brightness;
+ color -= 0.5 * brightness * colorSpread;
+
+ //
+ // also as a function of lines parallel to the axis
+ //
+ brightness = fract(grain*47.0);
+ float line = fract(Position.z + Position.x);
+ float snap = floor(line * 30.0) * (1.0/30.0);
+ if (line < snap + 0.004)
+ color -= 0.5 * brightness * colorSpread;
+
+ //
+ // apply lighting effects from vertex processor
+ //
+ color *= lightIntensity;
+ color = clamp(color, 0.0, 1.0);
+
+ gl_FragColor = vec4(color, 0.1)
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/unsuccessfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/unsuccessfulcompile_vert.vert
new file mode 100644
index 000000000..c73892a4c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/unsuccessfulcompile_vert.vert
@@ -0,0 +1,60 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform vec3 NotActiveOne;
+attribute float myAttribute1;
+attribute float myAttribute2;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex_Color;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ //float spec = clamp(dot(reflectVec, viewVec), 0.0, 1.0);
+ float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/precision_specifiers/precision_specifiers.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/precision_specifiers/precision_specifiers.frag
new file mode 100644
index 000000000..9010f5a12
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/precision_specifiers/precision_specifiers.frag
@@ -0,0 +1,31 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+varying mediump vec4 color;
+
+void main (void)
+{
+ gl_FragColor = color;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/precision_specifiers/precision_specifiers.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/precision_specifiers/precision_specifiers.vert
new file mode 100644
index 000000000..4cc0174c8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/precision_specifiers/precision_specifiers.vert
@@ -0,0 +1,42 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute highp vec4 gtf_Color;
+attribute highp vec4 gtf_Vertex;
+uniform highp mat4 gtf_ModelViewProjectionMatrix;
+varying highp vec4 color;
+
+void main (void)
+{
+ mediump int x = 5;
+ lowp int y = 3;
+ mediump float x2 = 5.0;
+ lowp float y2 = 1.0;
+
+ color = vec4(x + y, x2 * y2, x, 1.0);
+
+ color = gtf_Color;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/relink_program/simple.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/relink_program/simple.frag
new file mode 100644
index 000000000..966495e61
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/relink_program/simple.frag
@@ -0,0 +1,34 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+varying vec4 tc;
+
+void main (void)
+{
+ gl_FragColor = tc;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/relink_program/simple.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/relink_program/simple.vert
new file mode 100644
index 000000000..703847d5f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/relink_program/simple.vert
@@ -0,0 +1,37 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+attribute float gtf_Color;
+
+varying vec4 tc;
+
+void main (void)
+{
+ tc = vec4(gtf_Color, 0.0, 0.0, 1.0);
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/successfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/successfulcompile_frag.frag
new file mode 100644
index 000000000..906948954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/successfulcompile_frag.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float mortarThickness;
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/successfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/successfulcompile_vert.vert
new file mode 100644
index 000000000..3b42e9d15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/successfulcompile_vert.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform float Scale;
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex) * Scale;
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ lightIntensity = dot(normalize(LightPosition - vec3(pos)), tnorm) * 1.5;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/unsuccessfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/unsuccessfulcompile_frag.frag
new file mode 100644
index 000000000..fd4718885
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/unsuccessfulcompile_frag.frag
@@ -0,0 +1,83 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float GrainSize;
+uniform vec3 DarkColor;
+uniform vec3 colorSpread;
+
+varying float lightIntensity;
+varying vec3 Position;
+
+void main (void)
+{
+ //
+ // cheap noise
+ //
+ vec3 location = Position;
+
+ vec3 floorvec = vec3(floor(Position.x * 10.0), 0.0, floor(Position.z * 10.0));
+ vec3 noise = Position * 10.0 - floorvec - 0.5;
+ noise *= noise;
+ location += noise * 0.12;
+
+ //
+ // distance from axis
+ //
+ float dist = location.x * location.x + location.z * location.z;
+ float grain = dist / GrainSize;
+
+ //
+ // grain effects as function of distance
+ //
+ float brightness = fract(grain);
+ if (brightness > 0.5)
+ brightness = (1.0 - brightness);
+ vec3 color = DarkColor + 0.5 * brightness * (colorSpread);
+
+ brightness = fract(grain*7.0);
+ if (brightness > 0.5)
+ brightness = 1.0 - brightness;
+ color -= 0.5 * brightness * colorSpread;
+
+ //
+ // also as a function of lines parallel to the axis
+ //
+ brightness = fract(grain*47.0);
+ float line = fract(Position.z + Position.x);
+ float snap = floor(line * 30.0) * (1.0/30.0);
+ if (line < snap + 0.004)
+ color -= 0.5 * brightness * colorSpread;
+
+ //
+ // apply lighting effects from vertex processor
+ //
+ color *= lightIntensity;
+ color = clamp(color, 0.0, 1.0);
+
+ gl_FragColor = vec4(color, 0.1)
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/unsuccessfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/unsuccessfulcompile_vert.vert
new file mode 100644
index 000000000..6e3536513
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/unsuccessfulcompile_vert.vert
@@ -0,0 +1,61 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Vertex_Color;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform vec3 NotActiveOne;
+attribute float myAttribute1;
+attribute float myAttribute2;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex_Color;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos);
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ //float spec = clamp(dot(reflectVec, viewVec), 0.0, 1.0);
+ float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/three_uniforms/4f_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/three_uniforms/4f_frag.frag
new file mode 100644
index 000000000..b37c5a0e0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/three_uniforms/4f_frag.frag
@@ -0,0 +1,39 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform vec4 color;
+uniform ivec4 icolor;
+uniform bool flag;
+
+void main (void)
+{
+ if(flag)
+ gl_FragColor = vec4 (icolor[0], icolor[1], icolor[2], icolor[3]);
+ else
+ gl_FragColor = vec4 (color[0], color[1], color[2], color[3]);
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/successfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/successfulcompile_frag.frag
new file mode 100644
index 000000000..906948954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/successfulcompile_frag.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float mortarThickness;
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/successfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/successfulcompile_vert.vert
new file mode 100644
index 000000000..3b42e9d15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/successfulcompile_vert.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform float Scale;
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex) * Scale;
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ lightIntensity = dot(normalize(LightPosition - vec3(pos)), tnorm) * 1.5;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/unsuccessfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/unsuccessfulcompile_frag.frag
new file mode 100644
index 000000000..fd4718885
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/unsuccessfulcompile_frag.frag
@@ -0,0 +1,83 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float GrainSize;
+uniform vec3 DarkColor;
+uniform vec3 colorSpread;
+
+varying float lightIntensity;
+varying vec3 Position;
+
+void main (void)
+{
+ //
+ // cheap noise
+ //
+ vec3 location = Position;
+
+ vec3 floorvec = vec3(floor(Position.x * 10.0), 0.0, floor(Position.z * 10.0));
+ vec3 noise = Position * 10.0 - floorvec - 0.5;
+ noise *= noise;
+ location += noise * 0.12;
+
+ //
+ // distance from axis
+ //
+ float dist = location.x * location.x + location.z * location.z;
+ float grain = dist / GrainSize;
+
+ //
+ // grain effects as function of distance
+ //
+ float brightness = fract(grain);
+ if (brightness > 0.5)
+ brightness = (1.0 - brightness);
+ vec3 color = DarkColor + 0.5 * brightness * (colorSpread);
+
+ brightness = fract(grain*7.0);
+ if (brightness > 0.5)
+ brightness = 1.0 - brightness;
+ color -= 0.5 * brightness * colorSpread;
+
+ //
+ // also as a function of lines parallel to the axis
+ //
+ brightness = fract(grain*47.0);
+ float line = fract(Position.z + Position.x);
+ float snap = floor(line * 30.0) * (1.0/30.0);
+ if (line < snap + 0.004)
+ color -= 0.5 * brightness * colorSpread;
+
+ //
+ // apply lighting effects from vertex processor
+ //
+ color *= lightIntensity;
+ color = clamp(color, 0.0, 1.0);
+
+ gl_FragColor = vec4(color, 0.1)
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/unsuccessfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/unsuccessfulcompile_vert.vert
new file mode 100644
index 000000000..c73892a4c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/unsuccessfulcompile_vert.vert
@@ -0,0 +1,60 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform vec3 NotActiveOne;
+attribute float myAttribute1;
+attribute float myAttribute2;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex_Color;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ //float spec = clamp(dot(reflectVec, viewVec), 0.0, 1.0);
+ float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/successfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/successfulcompile_frag.frag
new file mode 100644
index 000000000..906948954
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/successfulcompile_frag.frag
@@ -0,0 +1,63 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float mortarThickness;
+uniform vec3 brickColor;
+uniform vec3 mortarColor;
+
+uniform float brickMortarWidth;
+uniform float brickMortarHeight;
+uniform float mwf;
+uniform float mhf;
+
+varying vec3 Position;
+varying float lightIntensity;
+
+void main (void)
+{
+ vec3 ct;
+ float ss, tt, w, h;
+
+ vec3 pos = Position;
+
+ ss = pos.x / brickMortarWidth;
+ tt = pos.z / brickMortarHeight;
+
+ if (fract (tt * 0.5) > 0.5)
+ ss += 0.5;
+
+ ss = fract (ss);
+ tt = fract (tt);
+
+ w = step (mwf, ss) - step (1.0 - mwf, ss);
+ h = step (mhf, tt) - step (1.0 - mhf, tt);
+
+ ct = clamp(mix (mortarColor, brickColor, w * h) * lightIntensity, 0.0, 1.0);
+
+ gl_FragColor = vec4 (ct, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/successfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/successfulcompile_vert.vert
new file mode 100644
index 000000000..3b42e9d15
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/successfulcompile_vert.vert
@@ -0,0 +1,43 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform float Scale;
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex;
+ Position = vec3(gtf_Vertex) * Scale;
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ lightIntensity = dot(normalize(LightPosition - vec3(pos)), tnorm) * 1.5;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/unsuccessfulcompile_frag.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/unsuccessfulcompile_frag.frag
new file mode 100644
index 000000000..fd4718885
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/unsuccessfulcompile_frag.frag
@@ -0,0 +1,83 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+#ifdef GL_ES
+precision mediump float;
+#endif
+uniform float GrainSize;
+uniform vec3 DarkColor;
+uniform vec3 colorSpread;
+
+varying float lightIntensity;
+varying vec3 Position;
+
+void main (void)
+{
+ //
+ // cheap noise
+ //
+ vec3 location = Position;
+
+ vec3 floorvec = vec3(floor(Position.x * 10.0), 0.0, floor(Position.z * 10.0));
+ vec3 noise = Position * 10.0 - floorvec - 0.5;
+ noise *= noise;
+ location += noise * 0.12;
+
+ //
+ // distance from axis
+ //
+ float dist = location.x * location.x + location.z * location.z;
+ float grain = dist / GrainSize;
+
+ //
+ // grain effects as function of distance
+ //
+ float brightness = fract(grain);
+ if (brightness > 0.5)
+ brightness = (1.0 - brightness);
+ vec3 color = DarkColor + 0.5 * brightness * (colorSpread);
+
+ brightness = fract(grain*7.0);
+ if (brightness > 0.5)
+ brightness = 1.0 - brightness;
+ color -= 0.5 * brightness * colorSpread;
+
+ //
+ // also as a function of lines parallel to the axis
+ //
+ brightness = fract(grain*47.0);
+ float line = fract(Position.z + Position.x);
+ float snap = floor(line * 30.0) * (1.0/30.0);
+ if (line < snap + 0.004)
+ color -= 0.5 * brightness * colorSpread;
+
+ //
+ // apply lighting effects from vertex processor
+ //
+ color *= lightIntensity;
+ color = clamp(color, 0.0, 1.0);
+
+ gl_FragColor = vec4(color, 0.1)
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/unsuccessfulcompile_vert.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/unsuccessfulcompile_vert.vert
new file mode 100644
index 000000000..c73892a4c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/unsuccessfulcompile_vert.vert
@@ -0,0 +1,60 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec3 gtf_Normal;
+attribute vec4 gtf_Vertex;
+uniform mat3 gtf_NormalMatrix;
+uniform mat4 gtf_ModelViewMatrix;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying float lightIntensity;
+varying vec3 Position;
+uniform vec3 LightPosition;
+uniform vec3 NotActiveOne;
+attribute float myAttribute1;
+attribute float myAttribute2;
+
+const float specularContribution = 0.7;
+const float diffuseContribution = (1.0 - specularContribution);
+
+void main(void) {
+ vec4 pos = gtf_ModelViewMatrix * gtf_Vertex_Color;
+ Position = vec3(gtf_Vertex);
+ vec3 tnorm = normalize(gtf_NormalMatrix * gtf_Normal);
+ vec3 lightVec = normalize(LightPosition - vec3(pos));
+ vec3 reflectVec = reflect(lightVec, tnorm);
+ vec3 viewVec = normalize(vec3(pos));
+
+ //float spec = clamp(dot(reflectVec, viewVec), 0.0, 1.0);
+ float spec = clamp(dot(reflectVec, viewVec), myAttribute1, myAttribute2);
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+ spec = spec * spec;
+
+ lightIntensity = diffuseContribution * dot(lightVec, tnorm) +
+ specularContribution * spec;
+
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/vertex_program_point_size/point_size.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/vertex_program_point_size/point_size.vert
new file mode 100644
index 000000000..6d5b454fb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/vertex_program_point_size/point_size.vert
@@ -0,0 +1,36 @@
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+attribute vec4 gtf_Vertex;
+attribute vec4 gtf_Color;
+uniform mat4 gtf_ModelViewProjectionMatrix;
+varying vec4 color;
+
+void main (void)
+{
+ color = gtf_Color;
+ gl_PointSize = 20.0;
+ gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/README.md b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/README.md
new file mode 100644
index 000000000..e44d84eae
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/README.md
@@ -0,0 +1,20 @@
+OpenGL ES 2.0 GLSL conformance tests
+====================================
+
+The python script, process-ogles2-tests.py, in this folder generates some
+WebGL conformance tests from a subset of the OpenGL ES 2.0 conformance
+tests.
+
+To run it you must have a copy of the OpenGL ES 2.0 conformance test
+source then run it like this
+
+ python process-ogles2-tests.py <path/to/ogles2tests>/GTF_ES/glsl/GTF/mustpass.run
+
+Note: Before running you can safely delete the GTF_ES folder in this
+folder. Everything inside will be regenerated by the script above.
+
+IMPORTANT: From the OpenGL ES 2.0 conformance tests only the .vert and
+.frag files are open source licenesed. All other files in that suite are
+not open source.
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/mustpass.run.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/mustpass.run.txt
new file mode 100644
index 000000000..e6b87db93
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/mustpass.run.txt
@@ -0,0 +1,64 @@
+# this file is auto-generated. DO NOT EDIT.
+GL/abs/input.run.txt
+GL/acos/input.run.txt
+GL/all/input.run.txt
+GL/any/input.run.txt
+GL/array/input.run.txt
+GL/asin/input.run.txt
+GL/atan/input.run.txt
+GL/biConstants/input.run.txt
+GL/biuDepthRange/input.run.txt
+GL/build/input.run.txt
+GL/built_in_varying_array_out_of_bounds/input.run.txt
+GL/ceil/input.run.txt
+GL/clamp/input.run.txt
+GL/control_flow/input.run.txt
+GL/cos/input.run.txt
+GL/cross/input.run.txt
+GL/default/input.run.txt
+GL/degrees/input.run.txt
+GL/discard/input.run.txt
+GL/distance/input.run.txt
+GL/dot/input.run.txt
+GL/equal/input.run.txt
+GL/exp/input.run.txt
+GL/exp2/input.run.txt
+GL/faceforward/input.run.txt
+GL/floor/input.run.txt
+GL/fract/input.run.txt
+GL/functions/input.run.txt
+GL/gl_FragCoord/input.run.txt
+GL/gl_FrontFacing/input.run.txt
+GL/greaterThan/input.run.txt
+GL/greaterThanEqual/input.run.txt
+GL/inversesqrt/input.run.txt
+GL/length/input.run.txt
+GL/lessThan/input.run.txt
+GL/lessThanEqual/input.run.txt
+GL/log/input.run.txt
+GL/log2/input.run.txt
+GL/mat/input.run.txt
+GL/mat3/input.run.txt
+GL/matrixCompMult/input.run.txt
+GL/max/input.run.txt
+GL/min/input.run.txt
+GL/mix/input.run.txt
+GL/mod/input.run.txt
+GL/normalize/input.run.txt
+GL/not/input.run.txt
+GL/notEqual/input.run.txt
+GL/operators/input.run.txt
+GL/pow/input.run.txt
+GL/radians/input.run.txt
+GL/reflect/input.run.txt
+GL/refract/input.run.txt
+GL/sign/input.run.txt
+GL/sin/input.run.txt
+GL/smoothstep/input.run.txt
+GL/sqrt/input.run.txt
+GL/step/input.run.txt
+GL/struct/input.run.txt
+GL/swizzlers/input.run.txt
+GL/tan/input.run.txt
+GL/vec/input.run.txt
+GL/vec3/input.run.txt
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/ogles-utils.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/ogles-utils.js
new file mode 100644
index 000000000..73be9240e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/ogles-utils.js
@@ -0,0 +1,785 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+OpenGLESTestRunner = (function(){
+var wtu = WebGLTestUtils;
+var gl;
+
+var HALF_GRID_MAX_SIZE = 32;
+var KNOWN_ATTRIBS = [
+ "gtf_Vertex",
+ "gtf_Color"
+];
+
+var GTFPIXELTOLERANCE = 24;
+var GTFACCEPTABLEFAILURECONT = 10;
+var GTFAMDPIXELTOLERANCE = 12;
+var GTFSCORETOLERANCE = 0.65;
+var GTFNCCTOLARANCEZERO = 0.25;
+var GTFKERNALSIZE = 5;
+
+function log(msg) {
+ // debug(msg);
+}
+
+function compareImages(refData, tstData, width, height, diff) {
+ function isPixelSame(offset) {
+ // First do simple check
+ if (Math.abs(refData[offset + 0] - tstData[offset + 0]) <= GTFPIXELTOLERANCE &&
+ Math.abs(refData[offset + 1] - tstData[offset + 1]) <= GTFPIXELTOLERANCE &&
+ Math.abs(refData[offset + 2] - tstData[offset + 2]) <= GTFPIXELTOLERANCE) {
+ return true;
+ }
+
+ // TODO: Implement crazy check that's used in OpenGL ES 2.0 conformance tests.
+ // NOTE: on Desktop things seem to be working. Maybe the more complex check
+ // is needed for embedded systems?
+ return false;
+ }
+
+ var same = true;
+ for (var yy = 0; yy < height; ++yy) {
+ for (var xx = 0; xx < width; ++xx) {
+ var offset = (yy * width + xx) * 4;
+ var diffOffset = ((height - yy - 1) * width + xx) * 4;
+ diff[diffOffset + 0] = 0;
+ diff[diffOffset + 1] = 0;
+ diff[diffOffset + 2] = 0;
+ diff[diffOffset + 3] = 255;
+ if (!isPixelSame(offset)) {
+ diff[diffOffset] = 255;
+ if (same) {
+ same = false;
+ testFailed("pixel @ (" + xx + ", " + yy + " was [" +
+ tstData[offset + 0] + "," +
+ tstData[offset + 1] + "," +
+ tstData[offset + 2] + "," +
+ tstData[offset + 3] + "] expected [" +
+ refData[offset + 0] + "," +
+ refData[offset + 1] + "," +
+ refData[offset + 2] + "," +
+ refData[offset + 3] + "]")
+ }
+ }
+ }
+ }
+ return same;
+}
+
+function persp(fovy, aspect, n, f) {
+ var dz = f - n;
+ var rad = fovy / 2.0 * 3.14159265 / 180;
+
+ var s = Math.sin(rad);
+ if (dz == 0 || s == 0 || aspect == 0)
+ return;
+
+ var cot = Math.cos(rad) / s;
+
+ return [
+ cot / aspect,
+ 0.0,
+ 0.0,
+ 0.0,
+
+ 0.0,
+ cot,
+ 0.0,
+ 0.0,
+
+ 0.0,
+ 0.0,
+ -(f + n) / dz,
+ -1.0,
+
+ 0.0,
+ 0.0,
+ -2.0 * f * n / dz,
+ 0.0
+ ];
+}
+
+function setAttribs(attribs, buffers) {
+ for (var name in attribs) {
+ var buffer = buffers[name];
+ if (!buffer) {
+ testFailed("no buffer for attrib:" + name);
+ continue;
+ }
+ var loc = attribs[name];
+ log("setup attrib: " + loc + " as " + name);
+ var buf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(buffer.data), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(loc);
+ gl.vertexAttribPointer(loc, buffer.numComponents, gl.FLOAT, false, 0, 0);
+ }
+}
+
+function drawSquare(attribs) {
+ var buffers = {
+ "gtf_Vertex": {
+ data: [
+ 1.0, -1.0, -2.0,
+ 1.0, 1.0, -2.0,
+ -1.0, -1.0, -2.0,
+ -1.0, 1.0, -2.0
+ ],
+ numComponents: 3
+ },
+ "gtf_Color": {
+ data: [
+ 0.5, 1.0, 0.0,
+ 0.0, 1.0, 1.0,
+ 1.0, 0.0, 0.0,
+ 0.5, 0.0, 1.0
+ ],
+ numComponents: 3,
+ },
+ "gtf_SecondaryColor": {
+ data: [
+ 0.5, 0.0, 1.0,
+ 1.0, 0.0, 0.0,
+ 0.0, 1.0, 1.0,
+ 0.5, 1.0, 0.0
+ ],
+ numComponents: 3,
+ },
+ "gtf_Normal": {
+ data: [
+ 0.5, 0.0, 1.0,
+ 1.0, 0.0, 0.0,
+ 0.0, 1.0, 1.0,
+ 0.5, 1.0, 0.0
+ ],
+ numComponents: 3,
+ },
+ "gtf_MultiTexCoord0": {
+ data: [
+ 1.0, 0.0,
+ 1.0, 1.0,
+ 0.0, 0.0,
+ 0.0, 1.0
+ ],
+ numComponents: 2,
+ },
+ "gtf_FogCoord": {
+ data: [
+ 0.0,
+ 1.0,
+ 0.0,
+ 1.0
+ ],
+ numComponents: 1,
+ }
+ };
+ setAttribs(attribs, buffers);
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
+}
+
+function drawFrontBackSquare(attribs) {
+ var front = {
+ "gtf_Vertex": {
+ data: [
+ 1.0, -1.0, -2.0,
+ 1.0, 0.0, -2.0,
+ -1.0, -1.0, -2.0,
+ -1.0, 0.0, -2.0
+ ],
+ numComponents: 3
+ },
+ "gtf_Color": {
+ data: [
+ 0.0, 1.0, 0.0,
+ 0.0, 1.0, 0.0,
+ 0.0, 1.0, 0.0,
+ 0.0, 1.0, 0.0
+ ],
+ numComponents: 3,
+ },
+ "gtf_MultiTexCoord0": {
+ data: [
+ 1.0, 0.0,
+ 1.0, 0.5,
+ 0.0, 0.0,
+ 0.0, 0.5
+ ],
+ numComponents: 2,
+ }
+ };
+ setAttribs(attribs, front);
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
+
+ var back = {
+ "gtf_Vertex": {
+ data: [
+ 1.0, 1.0, -2.0,
+ 1.0, 0.0, -2.0,
+ -1.0, 1.0, -2.0,
+ -1.0, 0.0, -2.0
+ ],
+ numComponents: 3
+ },
+ "gtf_Color": {
+ data: [
+ 1.0, 0.0, 0.0,
+ 1.0, 0.0, 0.0,
+ 1.0, 0.0, 0.0,
+ 1.0, 0.0, 0.0
+ ],
+ numComponents: 3,
+ },
+ "gtf_MultiTexCoord0": {
+ data: [
+ 1.0, 0.1,
+ 1.0, 0.5,
+ 0.0, 0.1,
+ 0.0, 0.5
+ ],
+ numComponents: 2,
+ }
+ };
+ setAttribs(attribs, back);
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
+}
+
+function drawGrid(attribs, width, height) {
+ var n = Math.min(Math.floor(Math.max(width, height) / 4), HALF_GRID_MAX_SIZE);
+
+ var numVertices = (n + n) * (n + n) * 6;
+
+ var gridVertices = [];
+ var gridColors = [];
+ var gridSecColors = [];
+ var gridNormals = [];
+ var gridFogCoords = [];
+ var gridTexCoords0 = [];
+
+ var currentVertex = 0;
+ var currentColor = 0;
+ var currentSecColor = 0;
+ var currentTexCoord0 = 0;
+ var currentNormal = 0;
+ var currentFogCoord = 0;
+
+ var z = -2.0;
+ for(var i = -n; i < n; ++i)
+ {
+ var x1 = i / n;
+ var x2 = (i + 1) / n;
+ for(var j = -n; j < n; ++j)
+ {
+ var y1 = j / n;
+ var y2 = (j + 1) / n;
+
+ // VERTEX 0
+ gridVertices[currentVertex++] = x1;
+ gridVertices[currentVertex++] = y1;
+ gridVertices[currentVertex++] = z;
+ gridColors[currentColor++] = 1.0 - (x1 + y1 + 2.0) / 4.0;
+ gridColors[currentColor++] = (x1 + 1.0) / 2.0;
+ gridColors[currentColor++] = (y1 + 1.0) / 2.0;
+ gridSecColors[currentSecColor++] = 1.0 - (x2 + y2 + 2.0) / 4.0;
+ gridSecColors[currentSecColor++] = (x2 + 1.0) / 2.0;
+ gridSecColors[currentSecColor++] = (y2 + 1.0) / 2.0;
+ gridTexCoords0[currentTexCoord0++] = (x1 + 1.0) / 2.0;
+ gridTexCoords0[currentTexCoord0++] = (y1 + 1.0) / 2.0;
+ gridNormals[currentNormal++] = 1.0 - (x2 + y2 + 2.0) / 4.0;
+ gridNormals[currentNormal++] = (x2 + 1.0) / 2.0;
+ gridNormals[currentNormal++] = (y2 + 1.0) / 2.0;
+ gridFogCoords[currentFogCoord++] = (y1 + 1.0) / 2.0;
+
+ // VERTEX 1
+ gridVertices[currentVertex++] = x2;
+ gridVertices[currentVertex++] = y1;
+ gridVertices[currentVertex++] = z;
+ gridColors[currentColor++] = 1.0 - (x2 + y1 + 2.0) / 4.0;
+ gridColors[currentColor++] = (x2 + 1.0) / 2.0;
+ gridColors[currentColor++] = (y1 + 1.0) / 2.0;
+ gridSecColors[currentSecColor++] = 1.0 - (x1 + y2 + 2.0) / 4.0;
+ gridSecColors[currentSecColor++] = (x1 + 1.0) / 2.0;
+ gridSecColors[currentSecColor++] = (y2 + 1.0) / 2.0;
+ gridTexCoords0[currentTexCoord0++] = (x2 + 1.0) / 2.0;
+ gridTexCoords0[currentTexCoord0++] = (y1 + 1.0) / 2.0;
+ gridNormals[currentNormal++] = 1.0 - (x1 + y2 + 2.0) / 4.0;
+ gridNormals[currentNormal++] = (x1 + 1.0) / 2.0;
+ gridNormals[currentNormal++] = (y2 + 1.0) / 2.0;
+ gridFogCoords[currentFogCoord++] = (y1 + 1.0) / 2.0;
+
+ // VERTEX 2
+ gridVertices[currentVertex++] = x2;
+ gridVertices[currentVertex++] = y2;
+ gridVertices[currentVertex++] = z;
+ gridColors[currentColor++] = 1.0 - (x2 + y2 + 2.0) / 4.0;
+ gridColors[currentColor++] = (x2 + 1.0) / 2.0;
+ gridColors[currentColor++] = (y2 + 1.0) / 2.0;
+ gridSecColors[currentSecColor++] = 1.0 - (x1 + y1 + 2.0) / 4.0;
+ gridSecColors[currentSecColor++] = (x1 + 1.0) / 2.0;
+ gridSecColors[currentSecColor++] = (y1 + 1.0) / 2.0;
+ gridTexCoords0[currentTexCoord0++] = (x2 + 1.0) / 2.0;
+ gridTexCoords0[currentTexCoord0++] = (y2 + 1.0) / 2.0;
+ gridNormals[currentNormal++] = 1.0 - (x1 + y1 + 2.0) / 4.0;
+ gridNormals[currentNormal++] = (x1 + 1.0) / 2.0;
+ gridNormals[currentNormal++] = (y1 + 1.0) / 2.0;
+ gridFogCoords[currentFogCoord++] = (y2 + 1.0) / 2.0;
+
+ // VERTEX 2
+ gridVertices[currentVertex++] = x2;
+ gridVertices[currentVertex++] = y2;
+ gridVertices[currentVertex++] = z;
+ gridColors[currentColor++] = 1.0 - (x2 + y2 + 2.0) / 4.0;
+ gridColors[currentColor++] = (x2 + 1.0) / 2.0;
+ gridColors[currentColor++] = (y2 + 1.0) / 2.0;
+ gridSecColors[currentSecColor++] = 1.0 - (x1 + y1 + 2.0) / 4.0;
+ gridSecColors[currentSecColor++] = (x1 + 1.0) / 2.0;
+ gridSecColors[currentSecColor++] = (y1 + 1.0) / 2.0;
+ gridTexCoords0[currentTexCoord0++] = (x2 + 1.0) / 2.0;
+ gridTexCoords0[currentTexCoord0++] = (y2 + 1.0) / 2.0;
+ gridNormals[currentNormal++] = 1.0 - (x1 + y1 + 2.0) / 4.0;
+ gridNormals[currentNormal++] = (x1 + 1.0) / 2.0;
+ gridNormals[currentNormal++] = (y1 + 1.0) / 2.0;
+ gridFogCoords[currentFogCoord++] = (y2 + 1.0) / 2.0;
+
+ // VERTEX 3
+ gridVertices[currentVertex++] = x1;
+ gridVertices[currentVertex++] = y2;
+ gridVertices[currentVertex++] = z;
+ gridColors[currentColor++] = 1.0 - (x1 + y2 + 2.0) / 4.0;
+ gridColors[currentColor++] = (x1 + 1.0) / 2.0;
+ gridColors[currentColor++] = (y2 + 1.0) / 2.0;
+ gridSecColors[currentSecColor++] = 1.0 - (x2 + y1 + 2.0) / 4.0;
+ gridSecColors[currentSecColor++] = (x2 + 1.0) / 2.0;
+ gridSecColors[currentSecColor++] = (y1 + 1.0) / 2.0;
+ gridTexCoords0[currentTexCoord0++] = (x1 + 1.0) / 2.0;
+ gridTexCoords0[currentTexCoord0++] = (y2 + 1.0) / 2.0;
+ gridNormals[currentNormal++] = 1.0 - (x2 + y1 + 2.0) / 4.0;
+ gridNormals[currentNormal++] = (x2 + 1.0) / 2.0;
+ gridNormals[currentNormal++] = (y1 + 1.0) / 2.0;
+ gridFogCoords[currentFogCoord++] = (y2 + 1.0) / 2.0;
+
+ // VERTEX 0
+ gridVertices[currentVertex++] = x1;
+ gridVertices[currentVertex++] = y1;
+ gridVertices[currentVertex++] = z;
+ gridColors[currentColor++] = 1.0 - (x1 + y1 + 2.0) / 4.0;
+ gridColors[currentColor++] = (x1 + 1.0) / 2.0;
+ gridColors[currentColor++] = (y1 + 1.0) / 2.0;
+ gridSecColors[currentSecColor++] = 1.0 - (x2 + y2 + 2.0) / 4.0;
+ gridSecColors[currentSecColor++] = (x2 + 1.0) / 2.0;
+ gridSecColors[currentSecColor++] = (y2 + 1.0) / 2.0;
+ gridTexCoords0[currentTexCoord0++] = (x1 + 1.0) / 2.0;
+ gridTexCoords0[currentTexCoord0++] = (y1 + 1.0) / 2.0;
+ gridNormals[currentNormal++] = 1.0 - (x2 + y2 + 2.0) / 4.0;
+ gridNormals[currentNormal++] = (x2 + 1.0) / 2.0;
+ gridNormals[currentNormal++] = (y2 + 1.0) / 2.0;
+ gridFogCoords[currentFogCoord++] = (y1 + 1.0) / 2.0;
+ }
+ }
+
+ var buffers = {
+ "gtf_Vertex": { data: gridVertices, numComponents: 3 },
+ "gtf_Color": { data: gridColors, numComponents: 3 },
+ "gtf_SecondaryColor": { data: gridSecColors, numComponents: 3 },
+ "gtf_Normal": { data: gridNormals, numComponents: 3 },
+ "gtf_FogCoord": { data: gridFogCoords, numComponents: 1 },
+ "gtf_MultiTexCoord0": { data: gridTexCoords0, numComponents: 2 }
+ };
+ setAttribs(attribs, buffers);
+ gl.drawArrays(gl.TRIANGLES, 0, numVertices);
+}
+
+var MODEL_FUNCS = {
+ square: drawSquare,
+ frontbacksquare: drawFrontBackSquare,
+ grid: drawGrid
+};
+
+function drawWithProgram(program, programInfo, test) {
+ gl.useProgram(program);
+ var attribs = { };
+
+ var numAttribs = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES);
+ for (var ii = 0; ii < numAttribs; ++ii) {
+ var info = gl.getActiveAttrib(program, ii);
+ var name = info.name;
+ var location = gl.getAttribLocation(program, name);
+ attribs[name] = location;
+
+ if (KNOWN_ATTRIBS.indexOf(name) < 0) {
+ testFailed("unknown attrib:" + name)
+ }
+ }
+
+ var uniforms = { };
+ var numUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);
+ for (var ii = 0; ii < numUniforms; ++ii) {
+ var info = gl.getActiveUniform(program, ii);
+ var name = info.name;
+ if (name.match(/\[0\]$/)) {
+ name = name.substr(0, name.length - 3);
+ }
+ var location = gl.getUniformLocation(program, name);
+ uniforms[name] = {location: location};
+ }
+
+ var getUniformLocation = function(name) {
+ var uniform = uniforms[name];
+ if (uniform) {
+ uniform.used = true;
+ return uniform.location;
+ }
+ return null;
+ }
+
+ // Set known uniforms
+ var loc = getUniformLocation("gtf_ModelViewProjectionMatrix");
+ if (loc) {
+ gl.uniformMatrix4fv(
+ loc,
+ false,
+ persp(60, 1, 1, 30));
+ }
+ var loc = getUniformLocation("viewportwidth");
+ if (loc) {
+ gl.uniform1f(loc, gl.canvas.width);
+ }
+ var loc = getUniformLocation("viewportheight");
+ if (loc) {
+ gl.uniform1f(loc, gl.canvas.height);
+ }
+
+ // Set test specific uniforms
+ for (var name in programInfo.uniforms) {
+ var location = getUniformLocation(name);
+ if (!location) {
+ continue;
+ }
+ var uniform = programInfo.uniforms[name];
+ var type = uniform.type;
+ var value = uniform.value;
+ var transpose = uniform.transpose;
+ if (transpose !== undefined) {
+ log("gl." + type + '("' + name + '", ' + transpose + ", " + value + ")");
+ gl[type](location, transpose, value);
+ } else if (!type.match("v$")) {
+ var args = [location];
+ for (var ii = 0; ii < value.length; ++ii) {
+ args.push(value[ii]);
+ }
+ gl[type].apply(gl, args);
+ log("gl." + type + '("' + name + '", ' + args.slice(1) + ")");
+ } else {
+ log("gl." + type + '("' + name + '", ' + value + ")");
+ gl[type](location, value);
+ }
+ var err = gl.getError();
+ if (err != gl.NO_ERROR) {
+ testFailed(wtu.glEnumToString(gl, err) + " generated setting uniform: " + name);
+ }
+ }
+
+ // Check for unset uniforms
+ for (var name in uniforms) {
+ var uniform = uniforms[name];
+ if (name.indexOf("gl_") == 0) {
+ continue;
+ }
+ if (!uniform.used) {
+ testFailed("uniform " + name + " never set");
+ }
+ }
+
+
+ for (var state in test.state) {
+ var fields = test.state[state];
+ switch (state) {
+ case 'depthrange':
+ gl.depthRange(fields.near, fields.far);
+ break;
+ default:
+ testFailed("unknown state: " + state)
+ }
+ }
+
+ gl.clearColor(0, 0, 0, 0);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ var model = test.model || "square";
+ var fn = MODEL_FUNCS[model];
+ if (!fn) {
+ testFailed("unknown model type: " + model)
+ } else {
+ log("draw as: " + model)
+ fn(attribs, gl.canvas.width, gl.canvas.height);
+ }
+
+ var pixels = new Uint8Array(gl.canvas.width * gl.canvas.height * 4);
+ gl.readPixels(0, 0, gl.canvas.width, gl.canvas.height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
+ return {
+ width: gl.canvas.width,
+ height: gl.canvas.height,
+ pixels: pixels,
+ img: wtu.makeImageFromCanvas(gl.canvas)
+ };
+}
+
+function runProgram(programInfo, test, label, callback) {
+ var shaders = [];
+ var source = [];
+ var count = 0;
+
+ function loadShader(path, type, index) {
+ wtu.loadTextFileAsync(path, function(success, text) {
+ addShader(success, text, type, path, index);
+ });
+ }
+
+ function addShader(success, text, type, path, index) {
+ ++count;
+ if (!success) {
+ testFailed("could not load: " + path);
+ } else {
+ var shader = wtu.loadShader(gl, text, type);
+ shaders.push(shader);
+ source[index] = text;
+ }
+ if (count == 2) {
+ var result;
+ if (shaders.length == 2) {
+ debug("");
+ var consoleDiv = document.getElementById("console");
+ wtu.addShaderSources(
+ gl, consoleDiv, label + " vertex shader", shaders[0], source[0],
+ programInfo.vertexShader);
+ wtu.addShaderSources(
+ gl, consoleDiv, label + " fragment shader", shaders[1], source[1],
+ programInfo.fragmentShader);
+ var program = wtu.createProgram(gl, shaders[0], shaders[1]);
+ result = drawWithProgram(program, programInfo, test);
+ }
+ callback(result);
+ }
+ }
+
+ loadShader(programInfo.vertexShader, gl.VERTEX_SHADER, 0);
+ loadShader(programInfo.fragmentShader, gl.FRAGMENT_SHADER, 1);
+}
+
+function compareResults(expected, actual) {
+ var width = expected.width;
+ var height = expected.height;
+ var canvas = document.createElement("canvas");
+ canvas.width = width;
+ canvas.height = height;
+ var ctx = canvas.getContext("2d");
+ var imgData = ctx.getImageData(0, 0, width, height);
+ var tolerance = 0;
+
+ var expData = expected.pixels;
+ var actData = actual.pixels;
+
+ var same = compareImages(expData, actData, width, height, imgData.data);
+
+ var console = document.getElementById("console");
+ var diffImg = null;
+ if (!same) {
+ ctx.putImageData(imgData, 0, 0);
+ diffImg = wtu.makeImageFromCanvas(canvas);
+ }
+
+ var div = document.createElement("div");
+ div.className = "testimages";
+ wtu.insertImage(div, "reference", expected.img);
+ wtu.insertImage(div, "test", actual.img);
+ if (diffImg) {
+ wtu.insertImage(div, "diff", diffImg);
+ }
+ div.appendChild(document.createElement('br'));
+
+ console.appendChild(div);
+
+ if (!same) {
+ testFailed("images are different");
+ } else {
+ testPassed("images are the same");
+ }
+
+ console.appendChild(document.createElement('hr'));
+}
+
+function runCompareTest(test, callback) {
+ debug("");
+ debug("test: " + test.name);
+ var results = [];
+ var count = 0;
+
+ function storeResults(index) {
+ return function(result) {
+ results[index] = result;
+ ++count;
+ if (count == 2) {
+ compareResults(results[0], results[1]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+ callback();
+ }
+ }
+ }
+
+ runProgram(test.referenceProgram, test, "reference", storeResults(0));
+ runProgram(test.testProgram, test, "test", storeResults(1));
+}
+
+function runBuildTest(test, callback) {
+ debug("");
+ debug("test: " + test.name);
+
+ var shaders = [null, null];
+ var source = ["",""];
+ var success = [undefined, undefined];
+ var count = 0;
+
+ function loadShader(path, type, index) {
+ if (path == "empty") {
+ shaders[index] = gl.createShader();
+ success[index] = true;
+ source[index] = "/* empty */";
+ attachAndLink();
+ } else {
+ wtu.loadTextFileAsync(path, function(loadSuccess, text) {
+ if (!loadSuccess) {
+ success[index] = false;
+ source[index] = "/* could not load */";
+ testFailed("could not load:" + path);
+ } else {
+ source[index] = text;
+ shaders[index] = wtu.loadShader(gl, text, type, function(index) {
+ return function(msg) {
+ success[index] = false
+ }
+ }(index));
+ if (success[index] === undefined) {
+ success[index] = true;
+ }
+ }
+ attachAndLink();
+ });
+ }
+ }
+
+ function attachAndLink() {
+ ++count;
+ if (count == 2) {
+ debug("");
+ var c = document.getElementById("console");
+ wtu.addShaderSource(
+ c, "vertex shader", source[0], test.testProgram.vertexShader);
+ debug("compile: " + (success[0] ? "success" : "fail"));
+ wtu.addShaderSource(
+ c, "fragment shader", source[1], test.testProgram.fragmentShader);
+ debug("compile: " + (success[1] ? "success" : "fail"));
+ compileSuccess = (success[0] && success[1]);
+ if (!test.compstat) {
+ if (compileSuccess) {
+ testFailed("expected compile failure but was successful");
+ } else {
+ testPassed("expected compile failure and it failed");
+ }
+ } else {
+ if (compileSuccess) {
+ testPassed("expected compile success and it was successful");
+ } else {
+ testFailed("expected compile success but it failed");
+ }
+ var linkSuccess = true;
+ var program = wtu.createProgram(gl, shaders[0], shaders[1], function() {
+ linkSuccess = false;
+ });
+ if (linkSuccess !== test.linkstat) {
+ testFailed("expected link to " + (test.linkstat ? "succeed" : "fail"));
+ } else {
+ testPassed("shaders compiled and linked as expected.");
+ }
+ }
+ callback();
+ }
+ }
+
+ loadShader(test.testProgram.vertexShader, gl.VERTEX_SHADER, 0);
+ loadShader(test.testProgram.fragmentShader, gl.FRAGMENT_SHADER, 1);
+}
+
+var testPatterns = {
+ compare: runCompareTest,
+ build: runBuildTest,
+
+ dummy: null // just here to mark the end
+};
+
+function LogGLCall(functionName, args) {
+ console.log("gl." + functionName + "(" +
+ WebGLDebugUtils.glFunctionArgsToString(functionName, args) + ")");
+}
+
+// Runs the tests async since they will load shaders.
+function run(obj) {
+ description();
+
+ var canvas = document.getElementById("example");
+ gl = wtu.create3DContext(canvas);
+ if (window.WebGLDebugUtils) {
+ gl = WebGLDebugUtils.makeDebugContext(gl, undefined, LogGLCall);
+ }
+ if (!gl) {
+ testFailed("context does not exist");
+ finishTest();
+ return;
+ }
+
+ if (gl.canvas.width != 500 || gl.canvas.height != 500) {
+ testFailed("canvas must be 500x500 pixels: Several shaders are hard coded to this size.");
+ }
+
+ var tests = obj.tests;
+ var ndx = 0;
+
+ function runNextTest() {
+ if (ndx < tests.length) {
+ var test = tests[ndx++];
+ var fn = testPatterns[test.pattern];
+ if (!fn) {
+ testFailed("test pattern: " + test.pattern + " not supoprted")
+ runNextTest();
+ } else {
+ fn(test, runNextTest);
+ }
+ } else {
+ finishTest();
+ }
+ }
+ runNextTest();
+}
+
+return {
+ run: run,
+};
+}());
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/process-ogles2-tests.py b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/process-ogles2-tests.py
new file mode 100644
index 000000000..c7afc6ae6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/ogles/process-ogles2-tests.py
@@ -0,0 +1,586 @@
+#!/usr/bin/python
+
+"""generates tests from OpenGL ES 2.0 .run/.test files."""
+
+import os
+import os.path
+import sys
+import re
+import json
+import shutil
+from optparse import OptionParser
+from xml.dom.minidom import parse
+
+if sys.version < '2.6':
+ print 'Wrong Python Version !!!: Need >= 2.6'
+ sys.exit(1)
+
+# each shader test generates up to 3 512x512 images.
+# a 512x512 image takes 1meg of memory so set this
+# number apporpriate for the platform with
+# the smallest memory issue. At 8 that means
+# at least 24 meg is needed to run the test.
+MAX_TESTS_PER_SET = 8
+
+VERBOSE = False
+
+FILTERS = [
+ re.compile("GL/"),
+]
+
+LICENSE = """
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+"""
+
+COMMENT_RE = re.compile("/\*\n\*\*\s+Copyright.*?\*/",
+ re.IGNORECASE | re.DOTALL)
+REMOVE_COPYRIGHT_RE = re.compile("\/\/\s+Copyright.*?\n",
+ re.IGNORECASE | re.DOTALL)
+MATRIX_RE = re.compile("Matrix(\\d)")
+
+VALID_UNIFORM_TYPES = [
+ "uniform1f",
+ "uniform1fv",
+ "uniform1fv",
+ "uniform1i",
+ "uniform1iv",
+ "uniform1iv",
+ "uniform2f",
+ "uniform2fv",
+ "uniform2fv",
+ "uniform2i",
+ "uniform2iv",
+ "uniform2iv",
+ "uniform3f",
+ "uniform3fv",
+ "uniform3fv",
+ "uniform3i",
+ "uniform3iv",
+ "uniform3iv",
+ "uniform4f",
+ "uniform4fv",
+ "uniform4fv",
+ "uniform4i",
+ "uniform4iv",
+ "uniform4ivy",
+ "uniformMatrix2fv",
+ "uniformMatrix2fv",
+ "uniformMatrix3fv",
+ "uniformMatrix3fv",
+ "uniformMatrix4fv",
+ "uniformMatrix4fv",
+]
+
+SUBSTITUTIONS = [
+ ("uniformmat3fv", "uniformMatrix3fv"),
+ ("uniformmat4fv", "uniformMatrix4fv"),
+]
+
+
+def Log(msg):
+ global VERBOSE
+ if VERBOSE:
+ print msg
+
+
+def TransposeMatrix(values, dim):
+ size = dim * dim
+ count = len(values) / size
+ for m in range(0, count):
+ offset = m * size
+ for i in range(0, dim):
+ for j in range(i + 1, dim):
+ t = values[offset + i * dim + j]
+ values[offset + i * dim + j] = values[offset + j * dim + i]
+ values[offset + j * dim + i] = t
+
+
+def GetValidTypeName(type_name):
+ global VALID_UNIFORM_TYPES
+ global SUBSTITUTIONS
+ for subst in SUBSTITUTIONS:
+ type_name = type_name.replace(subst[0], subst[1])
+ if not type_name in VALID_UNIFORM_TYPES:
+ print "unknown type name: ", type_name
+ raise SyntaxError
+ return type_name
+
+
+def WriteOpen(filename):
+ dirname = os.path.dirname(filename)
+ if len(dirname) > 0 and not os.path.exists(dirname):
+ os.makedirs(dirname)
+ return open(filename, "wb")
+
+
+class TxtWriter():
+ def __init__(self, filename):
+ self.filename = filename
+ self.lines = []
+
+ def Write(self, line):
+ self.lines.append(line)
+
+ def Close(self):
+ if len(self.lines) > 0:
+ Log("Writing: %s" % self.filename)
+ f = WriteOpen(self.filename)
+ f.write("# this file is auto-generated. DO NOT EDIT.\n")
+ f.write("".join(self.lines))
+ f.close()
+
+
+def ReadFileAsLines(filename):
+ f = open(filename, "r")
+ lines = f.readlines()
+ f.close()
+ return [line.strip() for line in lines]
+
+
+def ReadFile(filename):
+ f = open(filename, "r")
+ content = f.read()
+ f.close()
+ return content.replace("\r\n", "\n")
+
+
+def Chunkify(list, chunk_size):
+ """divides an array into chunks of chunk_size"""
+ return [list[i:i + chunk_size] for i in range(0, len(list), chunk_size)]
+
+
+def GetText(nodelist):
+ """Gets the text of from a list of nodes"""
+ rc = []
+ for node in nodelist:
+ if node.nodeType == node.TEXT_NODE:
+ rc.append(node.data)
+ return ''.join(rc)
+
+
+def GetElementText(node, name):
+ """Gets the text of an element"""
+ elements = node.getElementsByTagName(name)
+ if len(elements) > 0:
+ return GetText(elements[0].childNodes)
+ else:
+ return None
+
+
+def GetBoolElement(node, name):
+ text = GetElementText(node, name)
+ return text.lower() == "true"
+
+
+def GetModel(node):
+ """Gets the model"""
+ model = GetElementText(node, "model")
+ if model and len(model.strip()) == 0:
+ elements = node.getElementsByTagName("model")
+ if len(elements) > 0:
+ model = GetElementText(elements[0], "filename")
+ return model
+
+
+def RelativizePaths(base, paths, template):
+ """converts paths to relative paths"""
+ rels = []
+ for p in paths:
+ #print "---"
+ #print "base: ", os.path.abspath(base)
+ #print "path: ", os.path.abspath(p)
+ relpath = os.path.relpath(os.path.abspath(p), os.path.dirname(os.path.abspath(base))).replace("\\", "/")
+ #print "rel : ", relpath
+ rels.append(template % relpath)
+ return "\n".join(rels)
+
+
+def CopyFile(filename, src, dst):
+ s = os.path.abspath(os.path.join(os.path.dirname(src), filename))
+ d = os.path.abspath(os.path.join(os.path.dirname(dst), filename))
+ dst_dir = os.path.dirname(d)
+ if not os.path.exists(dst_dir):
+ os.makedirs(dst_dir)
+ shutil.copyfile(s, d)
+
+
+def CopyShader(filename, src, dst):
+ s = os.path.abspath(os.path.join(os.path.dirname(src), filename))
+ d = os.path.abspath(os.path.join(os.path.dirname(dst), filename))
+ text = ReadFile(s)
+ # By agreement with the Khronos OpenGL working group we are allowed
+ # to open source only the .vert and .frag files from the OpenGL ES 2.0
+ # conformance tests. All other files from the OpenGL ES 2.0 conformance
+ # tests are not included.
+ marker = "insert-copyright-here"
+ new_text = COMMENT_RE.sub(marker, text)
+ if new_text == text:
+ print "no matching license found:", s
+ raise RuntimeError
+ new_text = REMOVE_COPYRIGHT_RE.sub("", new_text)
+ new_text = new_text.replace(marker, LICENSE)
+ f = WriteOpen(d)
+ f.write(new_text)
+ f.close()
+
+
+def IsOneOf(string, regexs):
+ for regex in regexs:
+ if re.match(regex, string):
+ return True
+ return False
+
+
+def CheckForUnknownTags(valid_tags, node, depth=1):
+ """do a hacky check to make sure we're not missing something."""
+ for child in node.childNodes:
+ if child.localName and not IsOneOf(child.localName, valid_tags[0]):
+ print "unsupported tag:", child.localName
+ print "depth:", depth
+ raise SyntaxError
+ else:
+ if len(valid_tags) > 1:
+ CheckForUnknownTags(valid_tags[1:], child, depth + 1)
+
+
+def IsFileWeWant(filename):
+ for f in FILTERS:
+ if f.search(filename):
+ return True
+ return False
+
+
+class TestReader():
+ """class to read and parse tests"""
+
+ def __init__(self, basepath):
+ self.tests = []
+ self.modes = {}
+ self.patterns = {}
+ self.basepath = basepath
+
+ def Print(self, msg):
+ if self.verbose:
+ print msg
+
+ def MakeOutPath(self, filename):
+ relpath = os.path.relpath(os.path.abspath(filename), os.path.dirname(os.path.abspath(self.basepath)))
+ return relpath
+
+ def ReadTests(self, filename):
+ """reads a .run file and parses."""
+ Log("reading %s" % filename)
+ outname = self.MakeOutPath(filename + ".txt")
+ f = TxtWriter(outname)
+ dirname = os.path.dirname(filename)
+ lines = ReadFileAsLines(filename)
+ count = 0
+ tests_data = []
+ for line in lines:
+ if len(line) > 0 and not line.startswith("#"):
+ fname = os.path.join(dirname, line)
+ if line.endswith(".run"):
+ if self.ReadTests(fname):
+ f.Write(line + ".txt\n")
+ count += 1
+ elif line.endswith(".test"):
+ tests_data.extend(self.ReadTest(fname))
+ else:
+ print "Error in %s:%d:%s" % (filename, count, line)
+ raise SyntaxError()
+ if len(tests_data):
+ global MAX_TESTS_PER_SET
+ sets = Chunkify(tests_data, MAX_TESTS_PER_SET)
+ id = 1
+ for set in sets:
+ suffix = "_%03d_to_%03d" % (id, id + len(set) - 1)
+ test_outname = self.MakeOutPath(filename + suffix + ".html")
+ if os.path.basename(test_outname).startswith("input.run"):
+ dname = os.path.dirname(test_outname)
+ folder_name = os.path.basename(dname)
+ test_outname = os.path.join(dname, folder_name + suffix + ".html")
+ self.WriteTests(filename, test_outname, {"tests":set})
+ f.Write(os.path.basename(test_outname) + "\n")
+ id += len(set)
+ count += 1
+ f.Close()
+ return count
+
+ def ReadTest(self, filename):
+ """reads a .test file and parses."""
+ Log("reading %s" % filename)
+ dom = parse(filename)
+ tests = dom.getElementsByTagName("test")
+ tests_data = []
+ outname = self.MakeOutPath(filename + ".html")
+ for test in tests:
+ if not IsFileWeWant(filename):
+ self.CopyShaders(test, filename, outname)
+ else:
+ test_data = self.ProcessTest(test, filename, outname, len(tests_data))
+ if test_data:
+ tests_data.append(test_data)
+ return tests_data
+
+ def ProcessTest(self, test, filename, outname, id):
+ """Process a test"""
+ mode = test.getAttribute("mode")
+ pattern = test.getAttribute("pattern")
+ self.modes[mode] = 1
+ self.patterns[pattern] = 1
+ Log ("%d: mode: %s pattern: %s" % (id, mode, pattern))
+ method = getattr(self, 'Process_' + pattern)
+ test_data = method(test, filename, outname)
+ if test_data:
+ test_data["pattern"] = pattern
+ return test_data
+
+ def WriteTests(self, filename, outname, tests_data):
+ Log("Writing %s" % outname)
+ template = """<!DOCTYPE html>
+<!-- this file is auto-generated. DO NOT EDIT.
+%(license)s
+-->
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL GLSL conformance test: %(title)s</title>
+%(css)s
+%(scripts)s
+</head>
+<body>
+<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+<script>
+"use strict";
+OpenGLESTestRunner.run(%(tests_data)s);
+var successfullyParsed = true;
+</script>
+</html>
+"""
+ css = [
+ "../../resources/js-test-style.css",
+ "../resources/ogles-tests.css",
+ ]
+ scripts = [
+ "../../resources/js-test-pre.js",
+ "../resources/webgl-test-utils.js",
+ "ogles-utils.js",
+ ]
+ css_html = RelativizePaths(outname, css, '<link rel="stylesheet" href="%s" />')
+ scripts_html = RelativizePaths(outname, scripts, '<script src="%s"></script>')
+
+ f = WriteOpen(outname)
+ f.write(template % {
+ "license": LICENSE,
+ "css": css_html,
+ "scripts": scripts_html,
+ "title": os.path.basename(outname),
+ "tests_data": json.dumps(tests_data, indent=2)
+ })
+ f.close()
+
+
+ def CopyShaders(self, test, filename, outname):
+ """For tests we don't actually support yet, at least copy the shaders"""
+ shaders = test.getElementsByTagName("shader")
+ for shader in shaders:
+ for name in ["vertshader", "fragshader"]:
+ s = GetElementText(shader, name)
+ if s and s != "empty":
+ CopyShader(s, filename, outname)
+
+ #
+ # pattern handlers.
+ #
+
+ def Process_compare(self, test, filename, outname):
+ global MATRIX_RE
+
+ valid_tags = [
+ ["shader", "model", "glstate"],
+ ["uniform", "vertshader", "fragshader", "filename", "depthrange"],
+ ["name", "count", "transpose", "uniform*", "near", "far"],
+ ]
+ CheckForUnknownTags(valid_tags, test)
+
+ # parse the test
+ shaders = test.getElementsByTagName("shader")
+ shaderInfos = []
+ for shader in shaders:
+ v = GetElementText(shader, "vertshader")
+ f = GetElementText(shader, "fragshader")
+ CopyShader(v, filename, outname)
+ CopyShader(f, filename, outname)
+ info = {
+ "vertexShader": v,
+ "fragmentShader": f,
+ }
+ shaderInfos.append(info)
+ uniformElems = shader.getElementsByTagName("uniform")
+ if len(uniformElems) > 0:
+ uniforms = {}
+ info["uniforms"] = uniforms
+ for uniformElem in uniformElems:
+ uniform = {"count": 1}
+ for child in uniformElem.childNodes:
+ if child.localName == None:
+ pass
+ elif child.localName == "name":
+ uniforms[GetText(child.childNodes)] = uniform
+ elif child.localName == "count":
+ uniform["count"] = int(GetText(child.childNodes))
+ elif child.localName == "transpose":
+ uniform["transpose"] = (GetText(child.childNodes) == "true")
+ else:
+ if "type" in uniform:
+ print "utype was:", uniform["type"], " found ", child.localName
+ raise SyntaxError
+ type_name = GetValidTypeName(child.localName)
+ uniform["type"] = type_name
+ valueText = GetText(child.childNodes).replace(",", " ")
+ uniform["value"] = [float(t) for t in valueText.split()]
+ m = MATRIX_RE.search(type_name)
+ if m:
+ # Why are these backward from the API?!?!?
+ TransposeMatrix(uniform["value"], int(m.group(1)))
+ data = {
+ "name": os.path.basename(outname),
+ "model": GetModel(test),
+ "referenceProgram": shaderInfos[1],
+ "testProgram": shaderInfos[0],
+ }
+ gl_states = test.getElementsByTagName("glstate")
+ if len(gl_states) > 0:
+ state = {}
+ data["state"] = state
+ for gl_state in gl_states:
+ for state_name in gl_state.childNodes:
+ if state_name.localName:
+ values = {}
+ for field in state_name.childNodes:
+ if field.localName:
+ values[field.localName] = GetText(field.childNodes)
+ state[state_name.localName] = values
+ return data
+
+ def Process_shaderload(self, test, filename, outname):
+ """no need for shaderload tests"""
+ self.CopyShaders(test, filename, outname)
+
+ def Process_extension(self, test, filename, outname):
+ """no need for extension tests"""
+ self.CopyShaders(test, filename, outname)
+
+ def Process_createtests(self, test, filename, outname):
+ Log("createtests Not implemented: %s" % filename)
+ self.CopyShaders(test, filename, outname)
+
+ def Process_GL2Test(self, test, filename, outname):
+ Log("GL2Test Not implemented: %s" % filename)
+ self.CopyShaders(test, filename, outname)
+
+ def Process_uniformquery(self, test, filename, outname):
+ Log("uniformquery Not implemented: %s" % filename)
+ self.CopyShaders(test, filename, outname)
+
+ def Process_egl_image_external(self, test, filename, outname):
+ """no need for egl_image_external tests"""
+ self.CopyShaders(test, filename, outname)
+
+ def Process_dismount(self, test, filename, outname):
+ Log("dismount Not implemented: %s" % filename)
+ self.CopyShaders(test, filename, outname)
+
+ def Process_build(self, test, filename, outname):
+ """don't need build tests"""
+ valid_tags = [
+ ["shader", "compstat", "linkstat"],
+ ["vertshader", "fragshader"],
+ ]
+ CheckForUnknownTags(valid_tags, test)
+
+ shader = test.getElementsByTagName("shader")
+ if not shader:
+ return None
+ vs = GetElementText(shader[0], "vertshader")
+ fs = GetElementText(shader[0], "fragshader")
+ if vs and vs != "empty":
+ CopyShader(vs, filename, outname)
+ if fs and fs != "empty":
+ CopyShader(fs, filename, outname)
+ data = {
+ "name": os.path.basename(outname),
+ "compstat": bool(GetBoolElement(test, "compstat")),
+ "linkstat": bool(GetBoolElement(test, "linkstat")),
+ "testProgram": {
+ "vertexShader": vs,
+ "fragmentShader": fs,
+ },
+ }
+ attach = test.getElementsByTagName("attach")
+ if len(attach) > 0:
+ data["attachError"] = GetElementText(attach[0], "attacherror")
+ return data
+
+ def Process_coverage(self, test, filename, outname):
+ Log("coverage Not implemented: %s" % filename)
+ self.CopyShaders(test, filename, outname)
+
+ def Process_attributes(self, test, filename, outname):
+ Log("attributes Not implemented: %s" % filename)
+ self.CopyShaders(test, filename, outname)
+
+ def Process_fixed(self, test, filename, outname):
+ """no need for fixed function tests"""
+ self.CopyShaders(test, filename, outname)
+
+
+def main(argv):
+ """This is the main function."""
+ global VERBOSE
+
+ parser = OptionParser()
+ parser.add_option(
+ "-v", "--verbose", action="store_true",
+ help="prints more output.")
+
+ (options, args) = parser.parse_args(args=argv)
+
+ if len(args) < 1:
+ pass # fix me
+
+ os.chdir(os.path.dirname(__file__) or '.')
+
+ VERBOSE = options.verbose
+
+ filename = args[0]
+ test_reader = TestReader(filename)
+ test_reader.ReadTests(filename)
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1:]))
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/00_test_list.txt
new file mode 100644
index 000000000..fd5efc736
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/00_test_list.txt
@@ -0,0 +1,10 @@
+get-active-test.html
+gl-bind-attrib-location-test.html
+--min-version 1.0.2 gl-bind-attrib-location-long-names-test.html
+gl-get-active-attribute.html
+gl-get-active-uniform.html
+gl-getshadersource.html
+gl-shader-test.html
+invalid-UTF-16.html
+program-test.html
+--min-version 1.0.2 use-program-crash-with-discard-in-fragment-shader.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/get-active-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/get-active-test.html
new file mode 100644
index 000000000..0f7b6d13b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/get-active-test.html
@@ -0,0 +1,142 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Test of getActiveAttrib and getActiveUniform");
+
+var wtu = WebGLTestUtils;
+var context = wtu.create3DContext();
+var context2 = wtu.create3DContext();
+var program = wtu.loadStandardProgram(context);
+var program2 = wtu.loadProgramFromFile(context2,
+ "../resources/intArrayUniformShader.vert",
+ "../resources/noopUniformShader.frag");
+
+wtu.glErrorShouldBe(context, context.NO_ERROR);
+shouldBe("context.getActiveUniform(program, 0).name", "'u_modelViewProjMatrix'");
+shouldBe("context.getActiveUniform(program, 0).type", "context.FLOAT_MAT4");
+shouldBe("context.getActiveUniform(program, 0).size", "1");
+shouldBeNull("context.getActiveUniform(program, 1)");
+wtu.glErrorShouldBe(context, context.INVALID_VALUE);
+shouldBeNull("context.getActiveUniform(program, -1)");
+wtu.glErrorShouldBe(context, context.INVALID_VALUE);
+shouldBeNull("context.getActiveUniform(null, 0)");
+wtu.glErrorShouldBe(context, context.INVALID_VALUE);
+
+// we don't know the order the attribs will appear.
+var info = [
+ context.getActiveAttrib(program, 0),
+ context.getActiveAttrib(program, 1)
+];
+for (var ii = 0; ii < info.length; ++ii)
+ shouldBeNonNull("info[ii]");
+
+var expected = [
+ { name: 'a_normal', type: context.FLOAT_VEC3, size: 1 },
+ { name: 'a_vertex', type: context.FLOAT_VEC4, size: 1 }
+];
+
+if (info[0].name != expected[0].name) {
+ var t = info[0];
+ info[0] = info[1];
+ info[1] = t;
+}
+
+for (var ii = 0; ii < info.length; ++ii) {
+ shouldBe("info[ii].name", "expected[ii].name");
+ shouldBe("info[ii].type", "expected[ii].type");
+ shouldBe("info[ii].size", "expected[ii].size");
+}
+
+// we don't know the order the uniforms will appear.
+var info2 = [
+ context2.getActiveUniform(program2, 0),
+ context2.getActiveUniform(program2, 1)
+];
+for (var ii = 0; ii < info2.length; ++ii)
+ shouldBeNonNull("info2[ii]");
+
+var expected2 = [
+ { name: 'ival', type: context2.INT, size: 1 },
+ { name: 'ival2[0]', type: context2.INT, size: 2 }
+];
+
+if (info2[0].name != expected2[0].name) {
+ t = info2[0];
+ info2[0] = info2[1];
+ info2[1] = t;
+}
+
+for (var ii = 0; ii < info2.length; ++ii) {
+ shouldBe("info2[ii].name", "expected2[ii].name");
+ shouldBe("info2[ii].type", "expected2[ii].type");
+ shouldBe("info2[ii].size", "expected2[ii].size");
+}
+
+shouldBeNull("context.getActiveAttrib(program, 2)");
+wtu.glErrorShouldBe(context, context.INVALID_VALUE);
+shouldBeNull("context.getActiveAttrib(program, -1)");
+wtu.glErrorShouldBe(context, context.INVALID_VALUE);
+shouldBeNull("context.getActiveAttrib(null, 0)");
+wtu.glErrorShouldBe(context, context.INVALID_VALUE);
+
+wtu.glErrorShouldBe(context2, context.NO_ERROR);
+
+debug("Check trying to get attribs from different context");
+shouldBeNull("context2.getActiveAttrib(program, 0)");
+wtu.glErrorShouldBe(context2, context2.INVALID_OPERATION);
+shouldBeNull("context2.getActiveUniform(program, 0)");
+wtu.glErrorShouldBe(context2, context2.INVALID_OPERATION);
+
+debug("Check trying to get attribs from deleted program");
+context.deleteProgram(program);
+shouldBeNull("context.getActiveUniform(program, 0)");
+wtu.glErrorShouldBe(context, context.INVALID_VALUE);
+shouldBeNull("context.getActiveAttrib(program, 0)");
+wtu.glErrorShouldBe(context, context.INVALID_VALUE);
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html
new file mode 100644
index 000000000..e77725e79
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html
@@ -0,0 +1,176 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL BindAttribLocation Long Names Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas style="border: 1px solid black;" id="canvas" width="50" height="50"></canvas>
+<script id="vshader" type="text/something-not-javascript">
+attribute vec4 vPosition$(suffix);
+attribute vec4 vColor$(suffix);
+varying vec4 color;
+void main()
+{
+ gl_Position = vPosition$(suffix);
+ color = vColor$(suffix);
+}
+</script>
+<script id="fshader" type="text/something-not-javascript">
+precision mediump float;
+
+varying vec4 color;
+void main()
+{
+ gl_FragColor = color;
+}
+</script>
+<script>
+"use strict";
+description("This test checks using long names with bindAttribLocation work.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+shouldBeNonNull("gl");
+
+debug("");
+debug("Checking gl.bindAttribLocation with long names.");
+
+var program = gl.createProgram();
+
+var suffix = "long";
+for (var ii = 0; ii < 5; ++ii) {
+ suffix = suffix + suffix;
+}
+var replacements = {
+ suffix: suffix
+};
+
+var vsrc = wtu.replaceParams(wtu.getScript("vshader"), replacements);
+var fsrc = wtu.replaceParams(wtu.getScript("fshader"), replacements);
+
+var vs = wtu.loadShader(gl, vsrc, gl.VERTEX_SHADER);
+var fs = wtu.loadShader(gl, fsrc, gl.FRAGMENT_SHADER);
+
+var attribs = {
+ vPosition: "vPosition" + suffix,
+ vColor: "vColor" + suffix
+};
+
+gl.attachShader(program, vs);
+gl.attachShader(program, fs);
+
+var positions = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, positions);
+gl.bufferData(
+ gl.ARRAY_BUFFER,
+ new Float32Array(
+ [ 1.0, 1.0, 0.0,
+ -1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, 1.0, 0.0,
+ -1.0, -1.0, 0.0,
+ 1.0, -1.0, 0.0]),
+ gl.STATIC_DRAW);
+
+var colors = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, colors);
+gl.bufferData(
+ gl.ARRAY_BUFFER,
+ new Float32Array(
+ [ 0,1,0,1,
+ 0,1,0,1,
+ 0,1,0,1,
+ 0,1,0,1,
+ 0,1,0,1,
+ 0,1,0,1]),
+ gl.STATIC_DRAW);
+
+function setBindLocations(colorLocation, positionLocation) {
+ gl.bindAttribLocation(program, positionLocation, attribs.vPosition);
+ gl.bindAttribLocation(program, colorLocation, attribs.vColor);
+ gl.linkProgram(program);
+ gl.useProgram(program);
+ var linked = (gl.getProgramParameter(program, gl.LINK_STATUS) != 0);
+ assertMsg(linked, "program linked successfully");
+
+ debug("vPosition:" + gl.getAttribLocation(program, attribs.vPosition))
+ debug("vColor :" + gl.getAttribLocation(program, attribs.vColor))
+ assertMsg(gl.getAttribLocation(program, attribs.vPosition) == positionLocation,
+ "location of vPosition should be " + positionLocation);
+ assertMsg(gl.getAttribLocation(program, attribs.vColor) == colorLocation,
+ "location of vColor should be " + colorLocation);
+
+ var ploc = gl.getAttribLocation(program, attribs.vPosition);
+ var cloc = gl.getAttribLocation(program, attribs.vColor);
+ gl.bindBuffer(gl.ARRAY_BUFFER, positions);
+ gl.enableVertexAttribArray(positionLocation);
+ gl.vertexAttribPointer(positionLocation, 3, gl.FLOAT, false, 0, 0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, colors);
+ gl.enableVertexAttribArray(colorLocation);
+ gl.vertexAttribPointer(colorLocation, 4, gl.FLOAT, false, 0, 0);
+}
+
+function checkDraw(colorLocation, positionLocation, r, g, b, a) {
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [r, g, b, a], "should be green");
+
+ gl.disableVertexAttribArray(positionLocation);
+ gl.disableVertexAttribArray(colorLocation);
+}
+
+setBindLocations(2, 3);
+checkDraw(2, 3, 0, 255, 0, 255);
+
+setBindLocations(0, 3);
+gl.disableVertexAttribArray(0);
+gl.vertexAttrib4f(0, 1, 0, 0, 1);
+checkDraw(0, 3, 255, 0, 0, 255);
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html
new file mode 100644
index 000000000..abdcb0ce1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html
@@ -0,0 +1,162 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL BindAttribLocation Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas style="border: 1px solid black;" id="canvas" width="50" height="50"></canvas>
+<script id="vshader" type="text/something-not-javascript">
+attribute vec4 vPosition;
+attribute vec4 vColor;
+varying vec4 color;
+void main()
+{
+ gl_Position = vPosition;
+ color = vColor;
+}
+</script>
+<script id="fshader" type="text/something-not-javascript">
+precision mediump float;
+
+varying vec4 color;
+void main()
+{
+ gl_FragColor = color;
+}
+</script>
+<script>
+"use strict";
+description("This test ensures WebGL implementations don't allow names that start with 'gl_' when calling bindAttribLocation.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+shouldBeNonNull("gl");
+
+debug("");
+debug("Checking gl.bindAttribLocation.");
+
+var program = gl.createProgram();
+gl.bindAttribLocation(program, 0, "gl_foo");
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "bindAttribLocation should return INVALID_OPERATION if name starts with 'gl_'");
+gl.bindAttribLocation(program, 0, "gl_TexCoord0");
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "bindAttribLocation should return INVALID_OPERATION if name starts with 'gl_'");
+
+var vs = wtu.loadShaderFromScript(gl, 'vshader', gl.VERTEX_SHADER);
+var fs = wtu.loadShaderFromScript(gl, 'fshader', gl.FRAGMENT_SHADER);
+gl.attachShader(program, vs);
+gl.attachShader(program, fs);
+
+var positions = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, positions);
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+
+var colors = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, colors);
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ 0,1,0,1,
+ 0,1,0,1,
+ 0,1,0,1]), gl.STATIC_DRAW);
+
+function setBindLocations(colorLocation, positionLocation) {
+ gl.bindAttribLocation(program, positionLocation, "vPosition");
+ gl.bindAttribLocation(program, colorLocation, "vColor");
+ gl.linkProgram(program);
+ gl.useProgram(program);
+ var linked = (gl.getProgramParameter(program, gl.LINK_STATUS) != 0);
+ assertMsg(linked, "program linked successfully");
+
+ debug("vPosition:" + gl.getAttribLocation(program, "vPosition"))
+ debug("vColor :" + gl.getAttribLocation(program, "vColor"))
+ assertMsg(gl.getAttribLocation(program, "vPosition") == positionLocation,
+ "location of vPosition should be " + positionLocation);
+ assertMsg(gl.getAttribLocation(program, "vColor") == colorLocation,
+ "location of vColor should be " + colorLocation);
+
+ var ploc = gl.getAttribLocation(program, "vPosition");
+ var cloc = gl.getAttribLocation(program, "vColor");
+ gl.bindBuffer(gl.ARRAY_BUFFER, positions);
+ gl.enableVertexAttribArray(positionLocation);
+ gl.vertexAttribPointer(positionLocation, 3, gl.FLOAT, false, 0, 0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, colors);
+ gl.enableVertexAttribArray(colorLocation);
+ gl.vertexAttribPointer(colorLocation, 4, gl.FLOAT, false, 0, 0);
+}
+
+function checkDraw(colorLocation, positionLocation, r, g, b, a) {
+ gl.clearColor(0, 0, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+
+ var width = 50;
+ var height = 50;
+
+ // Test several locations
+ wtu.checkCanvasRect(gl, 0, 0, width, 1, [0, 0, 0, 255],
+ "First line should be all black");
+ wtu.checkCanvasRect(gl, 20, 15, 10, 1, [r, g, b, a],
+ "Line 15 should be red for at least 10 rgba pixels starting 20 pixels in");
+ wtu.checkCanvasRect(gl, 0, height - 1, width, 0, [0, 0, 0, 255],
+ "Last line should be all black");
+
+ gl.disableVertexAttribArray(positionLocation);
+ gl.disableVertexAttribArray(colorLocation);
+}
+
+setBindLocations(2, 3);
+checkDraw(2, 3, 0, 255, 0, 255);
+
+setBindLocations(0, 3);
+gl.disableVertexAttribArray(0);
+gl.vertexAttrib4f(0, 1, 0, 0, 1);
+checkDraw(0, 3, 255, 0, 0, 255);
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-attribute.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-attribute.html
new file mode 100644
index 000000000..a5db95262
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-attribute.html
@@ -0,0 +1,108 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL getActiveAttrib conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="16" height="16"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute $type attr0;
+void main()
+{
+ gl_Position = vec4(0, 0, 0, attr0$access);
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+void main()
+{
+ gl_FragColor = vec4(0,1,0,1);
+}
+</script>
+<script>
+"use strict";
+description("Tests getActiveAttrib for various types");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+var tests = [
+{ glType: gl.FLOAT, size: 1, type: 'float', access: ''},
+{ glType: gl.FLOAT_VEC2, size: 1, type: 'vec2', access: '[1]'},
+{ glType: gl.FLOAT_VEC3, size: 1, type: 'vec3', access: '[2]'},
+{ glType: gl.FLOAT_VEC4, size: 1, type: 'vec4', access: '[3]'},
+{ glType: gl.FLOAT_MAT2, size: 1, type: 'mat2', access: '[1][1]'},
+{ glType: gl.FLOAT_MAT3, size: 1, type: 'mat3', access: '[2][2]'},
+{ glType: gl.FLOAT_MAT4, size: 1, type: 'mat4', access: '[3][3]'},
+];
+
+var source = document.getElementById('vshader').text;
+var fs = wtu.loadShaderFromScript(gl, 'fshader', gl.FRAGMENT_SHADER);
+for (var tt = 0; tt < tests.length; ++tt) {
+ var t = tests[tt];
+ var vs = wtu.loadShader(
+ gl,
+ source.replace('$type', t.type).replace('$access', t.access),
+ gl.VERTEX_SHADER);
+ var program = wtu.setupProgram(gl, [vs, fs]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from setup");
+ var numAttribs = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES);
+ var found = false;
+ for (var ii = 0; ii < numAttribs; ++ii) {
+ var info = gl.getActiveAttrib(program, ii);
+ if (info.name == 'attr0') {
+ found = true;
+ assertMsg(info.type == t.glType,
+ "type must be " + wtu.glEnumToString(gl, t.glType) + " was " +
+ wtu.glEnumToString(gl, info.type));
+ assertMsg(info.size == t.size,
+ "size must be " + t.size + ' was ' + info.size);
+ }
+ }
+ if (!found) {
+ testFailed("attrib 'attr0' not found");
+ }
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-uniform.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-uniform.html
new file mode 100644
index 000000000..3bb7dd1c5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-uniform.html
@@ -0,0 +1,167 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL getActiveUniform conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="16" height="16"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+void main()
+{
+ gl_Position = vec4(0, 0, 0, 1);
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform $type uniform0;
+void main()
+{
+ gl_FragColor = vec4(0,$access,0,1);
+}
+</script>
+<script id="fshaderA" type="x-shader/x-fragment">
+precision mediump float;
+uniform float uniform0;
+void main()
+{
+ gl_FragColor = vec4(0,uniform0,0,1);
+}
+</script>
+<script id="fshaderB" type="x-shader/x-fragment">
+precision mediump float;
+uniform float uniform0;
+uniform float uniform1;
+void main()
+{
+ gl_FragColor = vec4(0,uniform0,uniform1,1);
+}
+</script>
+<script>
+"use strict";
+description("Tests getActiveUniform for various types");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+var tests = [
+{ glType: gl.FLOAT, size: 1, type: 'float', access: 'uniform0'},
+{ glType: gl.FLOAT_VEC2, size: 1, type: 'vec2', access: 'uniform0[1]'},
+{ glType: gl.FLOAT_VEC3, size: 1, type: 'vec3', access: 'uniform0[2]'},
+{ glType: gl.FLOAT_VEC4, size: 1, type: 'vec4', access: 'uniform0[3]'},
+{ glType: gl.FLOAT_MAT2, size: 1, type: 'mat2', access: 'uniform0[1][1]'},
+{ glType: gl.FLOAT_MAT3, size: 1, type: 'mat3', access: 'uniform0[2][2]'},
+{ glType: gl.FLOAT_MAT3, size: 1, type: 'mat3', access: 'uniform0[2][2]'},
+{ glType: gl.FLOAT_MAT4, size: 1, type: 'mat4', access: 'uniform0[3][3]'},
+{ glType: gl.INT, size: 1, type: 'int', access: 'float(uniform0)'},
+{ glType: gl.INT_VEC2, size: 1, type: 'ivec2', access: 'float(uniform0[1])'},
+{ glType: gl.INT_VEC3, size: 1, type: 'ivec3', access: 'float(uniform0[2])'},
+{ glType: gl.INT_VEC4, size: 1, type: 'ivec4', access: 'float(uniform0[3])'},
+{ glType: gl.BOOL, size: 1, type: 'bool', access: 'float(uniform0)'},
+{ glType: gl.BOOL_VEC2, size: 1, type: 'bvec2', access: 'float(uniform0[1])'},
+{ glType: gl.BOOL_VEC3, size: 1, type: 'bvec3', access: 'float(uniform0[2])'},
+{ glType: gl.BOOL_VEC4, size: 1, type: 'bvec4', access: 'float(uniform0[3])'},
+{ glType: gl.SAMPLER_2D,
+ size: 1,
+ type: 'sampler2D',
+ access: 'texture2D(uniform0, vec2(0,0)).x'
+},
+{ glType: gl.SAMPLER_CUBE,
+ size: 1,
+ type: 'samplerCube',
+ access: 'textureCube(uniform0, vec3(0,1,0)).x'
+}
+];
+
+var vs = wtu.loadShaderFromScript(gl, 'vshader', gl.VERTEX_SHADER);
+var source = document.getElementById('fshader').text;
+
+function createProgram(type, access) {
+ var fs = wtu.loadShader(
+ gl,
+ source.replace('$type', type).replace('$access', access),
+ gl.FRAGMENT_SHADER);
+ var program = wtu.setupProgram(gl, [vs, fs]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from setup");
+ return program;
+}
+
+for (var tt = 0; tt < tests.length; ++tt) {
+ var t = tests[tt];
+ var program = createProgram(t.type, t.access);
+ var numUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);
+ var found = false;
+ for (var ii = 0; ii < numUniforms; ++ii) {
+ var info = gl.getActiveUniform(program, ii);
+ if (info.name == 'uniform0') {
+ found = true;
+ assertMsg(info.type == t.glType,
+ "type must be " + wtu.glEnumToString(gl, t.glType) + " was " +
+ wtu.glEnumToString(gl, info.type));
+ assertMsg(info.size == t.size,
+ "size must be " + t.size + ' was ' + info.size);
+ }
+ }
+ if (!found) {
+ testFailed("uniform 'uniform0' not found");
+ }
+}
+
+var p1 = wtu.setupProgram(gl, [vs, 'fshaderA']);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from program A");
+var p2 = wtu.setupProgram(gl, [vs, 'fshaderB']);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from program B");
+var l1 = gl.getUniformLocation(p1, 'uniform0');
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors getting location of uniform0 p1");
+var l2 = gl.getUniformLocation(p2, 'uniform0');
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors getting location of uniform0 p2");
+
+gl.useProgram(p2);
+gl.uniform1f(l2, 1);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors setting uniform 0");
+gl.uniform1f(l1, 2);
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "setting a uniform using a location from another program");
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-getshadersource.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-getshadersource.html
new file mode 100644
index 000000000..d337b65f1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-getshadersource.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>WebGL getShaderSource conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">abc//defNOTASCII</script>
+<script>
+"use strict";
+description("Tests that the source that goes into a shader is what comes out.");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var original = document.getElementById("vshader").text;
+var shader = gl.createShader(gl.VERTEX_SHADER);
+gl.shaderSource(shader, original);
+var source = gl.getShaderSource(shader);
+shouldBe("source", "original");
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-shader-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-shader-test.html
new file mode 100644
index 000000000..8c0ced55a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/gl-shader-test.html
@@ -0,0 +1,117 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL ShaderL Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<script id="vs" type="x-shader/x-fragment">
+attribute vec4 vPosition;
+varying vec2 texCoord;
+void main() {
+ gl_Position = vPosition;
+ texCoord = vPosition.xy * 0.5 + 0.5;
+}
+</script>
+<script id="fs-green" type="x-shader/x-fragment">
+precision mediump float;
+void main() {
+ gl_FragData[0] = vec4(0, 1, 0, 1);
+}
+</script>
+<script id="fs-red" type="x-shader/x-fragment">
+precision mediump float;
+void main() {
+ gl_FragData[0] = vec4(1, 0, 0, 1);
+}
+</script>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+"use strict";
+description("This test checks a few things about WebGL Shaders.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking shaders.");
+
+ // Create the shader object
+ var shader = gl.createShader(desktopGL['GEOMETRY_SHADER_ARB']);
+ assertMsg(shader == null,
+ "should not be able to create GEOMETRY shader");
+
+ checkDeferredCompliation()
+}
+
+function checkDeferredCompliation() {
+ var vs = gl.createShader(gl.VERTEX_SHADER);
+ gl.shaderSource(vs, document.getElementById("vs").text);
+ gl.compileShader(vs);
+ var fs = gl.createShader(gl.FRAGMENT_SHADER);
+ // Compile the green shader
+ gl.shaderSource(fs, document.getElementById("fs-green").text);
+ gl.compileShader(fs);
+ // Load the red shader source but do NOT compile it
+ gl.shaderSource(fs, document.getElementById("fs-red").text);
+ var p = gl.createProgram();
+ gl.attachShader(p, vs);
+ gl.attachShader(p, fs);
+ gl.bindAttribLocation(p, 0, "vPosition");
+ gl.linkProgram(p);
+ gl.useProgram(p);
+ wtu.setupUnitQuad(gl, 0, 1);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/invalid-UTF-16.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/invalid-UTF-16.html
new file mode 100644
index 000000000..3f28fc95b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/invalid-UTF-16.html
@@ -0,0 +1,71 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css">
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+"use strict";
+description('This test verifies that the internal conversion from UTF16 to UTF8 is robust to invalid inputs. Any DOM entry point which converts an incoming string to UTF8 could be used for this test.');
+
+var array = [];
+array.push(String.fromCharCode(0x48)); // H
+array.push(String.fromCharCode(0x69)); // i
+array.push(String.fromCharCode(0xd87e)); // Bogus
+var string = array.join('');
+
+// In order to make this test not depend on WebGL, the following were
+// attempted:
+// - Send a string to console.log
+// - Submit a mailto: form containing a text input with the bogus
+// string
+// The first code path does not perform a utf8 conversion of the
+// incoming string unless Console::shouldPrintExceptions() returns
+// true. The second seems to sanitize the form's input before
+// converting it to a UTF8 string.
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+var program = gl.createProgram();
+gl.bindAttribLocation(program, 0, string);
+testPassed("bindAttribLocation with invalid UTF-16 did not crash");
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/program-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/program-test.html
new file mode 100644
index 000000000..18759f64a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/program-test.html
@@ -0,0 +1,427 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Program Compiling/Linking Conformance Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js" type="text/javascript"></script>
+<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../resources/webgl-test-utils.js" type="text/javascript"></script>
+</head>
+<body>
+<script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 a_position;
+ void main()
+ {
+ gl_Position = a_position;
+ }
+</script>
+<script id="fshader-red" type="x-shader/x-fragment">
+ void main()
+ {
+ gl_FragColor = vec4(1, 0, 0, 1);
+ }
+</script>
+<script id="fshader-green" type="x-shader/x-fragment">
+ void main()
+ {
+ gl_FragColor = vec4(0, 1, 0, 1);
+ }
+</script>
+<script id="fshader-settable" type="x-shader/x-fragment">
+ precision mediump float;
+ uniform vec4 u_color;
+ void main()
+ {
+ gl_FragColor = u_color;
+ }
+</script>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script type="text/javascript">
+var wtu = WebGLTestUtils;
+function go() {
+ description("Tests that program compiling/linking/using works correctly.");
+
+ debug("");
+ debug("Canvas.getContext");
+
+ var gl = wtu.create3DContext("canvas");
+ if (!gl) {
+ testFailed("context does not exist");
+ return;
+ }
+
+ testPassed("context exists");
+
+ gl.clearColor(0.0, 0.0, 0.0, 0.0);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ function doArraysHaveSameContents(a, b) {
+ var flags = [];
+ function hasUnusedValue(a, value) {
+ for (var ii = 0; ii < a.length; ++ii) {
+ if (a[ii] === value && !flags[ii]) {
+ flags[ii] = true;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ try {
+ if (a.length !== b.length) {
+ return false;
+ }
+ for (var ii = 0; ii < a.length; ii++) {
+ if (!hasUnusedValue(b, a[ii])) {
+ return false;
+ }
+ }
+ } catch (ex) {
+ return false;
+ }
+ return true;
+ }
+
+/////// Check compileShader() /////////////////////////////
+
+ var vs = gl.createShader(gl.VERTEX_SHADER);
+ gl.shaderSource(vs, "attribute vec4 aVertex; attribute vec4 aColor; varying vec4 vColor; void main() { vColor = aColor; gl_Position = aVertex; }");
+ gl.compileShader(vs);
+
+ assertMsg(gl.getShaderParameter(vs, gl.COMPILE_STATUS) == true,
+ "good vertex shader should compile");
+
+ // Verify that constants removed from the WebGL spec generate INVALID_ENUM errors
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors at this point");
+ assertMsg(gl.getShaderParameter(vs, desktopGL['INFO_LOG_LENGTH']) === null, "invalid call to getShaderParameter should return null");
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "INFO_LOG_LENGTH is not a valid argument to getShaderParameter in WebGL");
+ assertMsg(gl.getShaderParameter(vs, desktopGL['SHADER_SOURCE_LENGTH']) === null, "invalid call to getShaderParameter should return null");
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "SHADER_SOURCE_LENGTH is not a valid argument to getShaderParameter in WebGL");
+
+ var vs2 = gl.createShader(gl.VERTEX_SHADER);
+ gl.shaderSource(vs2, "attribute vec4 aVertex; attribute vec4 aColor; varying vec4 vColor; void main() { vColor = aColor; gl_Position = aVertex * 0.5; }");
+ gl.compileShader(vs2);
+
+ assertMsg(gl.getShaderParameter(vs2, gl.COMPILE_STATUS) == true,
+ "good vertex shader #2 should compile");
+
+ var vsBad = gl.createShader(gl.VERTEX_SHADER);
+ gl.shaderSource(vsBad, "WILL NOT COMPILE;");
+ gl.compileShader(vsBad);
+
+ // GLSL 1.0.17 section 10.27. compile shader does not have to return failure.
+ //assertMsg(gl.getShaderParameter(vsBad, gl.COMPILE_STATUS) == false,
+ // "bad vertex shader should fail to compile");
+
+ var fs = gl.createShader(gl.FRAGMENT_SHADER);
+ gl.shaderSource(fs, "precision mediump float; varying vec4 vColor; void main() { gl_FragColor = vColor; }");
+ gl.compileShader(fs);
+
+ assertMsg(gl.getShaderParameter(fs, gl.COMPILE_STATUS) == true,
+ "good fragment shader should compile");
+
+ var fs2 = gl.createShader(gl.FRAGMENT_SHADER);
+ gl.shaderSource(fs2, "precision mediump float; varying vec4 vColor; void main() { gl_FragColor = vColor * 0.5; }");
+ gl.compileShader(fs2);
+
+ assertMsg(gl.getShaderParameter(fs2, gl.COMPILE_STATUS) == true,
+ "good fragment shader #2 should compile");
+
+ var fsBad = gl.createShader(gl.FRAGMENT_SHADER);
+ gl.shaderSource(fsBad, "WILL NOT COMPILE;");
+ gl.compileShader(fsBad);
+
+ // GLSL 1.0.17 section 10.27. compile shader does not have to return failure.
+ //assertMsg(gl.getShaderParameter(fsBad, gl.COMPILE_STATUS) == false,
+ // "bad fragment shader should fail to compile");
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors at this point");
+
+/////// Check attachShader() /////////////////////////////
+
+ function checkAttachShader(already_attached_shaders, shader, expected_error_code, errmsg) {
+ var prog = gl.createProgram();
+ for (var i = 0; i < already_attached_shaders.length; ++i)
+ gl.attachShader(prog, already_attached_shaders[i]);
+ if(gl.getError() != gl.NO_ERROR)
+ assertMsg(false, "unexpected error in attachShader()");
+ gl.attachShader(prog, shader);
+ wtu.glErrorShouldBe(gl, expected_error_code, errmsg);
+ }
+
+ checkAttachShader([], vs, gl.NO_ERROR, "attaching a vertex shader should succeed");
+ checkAttachShader([vs], vs, gl.INVALID_OPERATION,
+ "attaching an already attached vertex shader should generate INVALID_OPERATION");
+ checkAttachShader([], fs, gl.NO_ERROR, "attaching a fragment shader should succeed");
+ checkAttachShader([fs], fs, gl.INVALID_OPERATION,
+ "attaching an already attached fragment shader should generate INVALID_OPERATION");
+ checkAttachShader([vs], vs2, gl.INVALID_OPERATION,
+ "attaching shaders of the same type to a program should generate INVALID_OPERATION");
+ checkAttachShader([fs], fs2, gl.INVALID_OPERATION,
+ "attaching shaders of the same type to a program should generate INVALID_OPERATION");
+
+/////// Check detachShader() /////////////////////////////
+
+ function checkDetachShader(already_attached_shaders, shader, expected_error_code, errmsg) {
+ var prog = gl.createProgram();
+ for (var i = 0; i < already_attached_shaders.length; ++i)
+ gl.attachShader(prog, already_attached_shaders[i]);
+ if(gl.getError() != gl.NO_ERROR)
+ assertMsg(false, "unexpected error in attachShader()");
+ gl.detachShader(prog, shader);
+ wtu.glErrorShouldBe(gl, expected_error_code, errmsg);
+ }
+
+ checkDetachShader([vs], vs, gl.NO_ERROR, "detaching a vertex shader should succeed");
+ checkDetachShader([fs], vs, gl.INVALID_OPERATION,
+ "detaching a not already attached vertex shader should generate INVALID_OPERATION");
+ checkDetachShader([fs], fs, gl.NO_ERROR, "detaching a fragment shader should succeed");
+ checkDetachShader([vs], fs, gl.INVALID_OPERATION,
+ "detaching a not already attached fragment shader should generate INVALID_OPERATION");
+
+/////// Check getAttachedShaders() /////////////////////////////
+
+ function checkGetAttachedShaders(shaders_to_attach, shaders_to_detach, expected_shaders, errmsg) {
+ var prog = gl.createProgram();
+ for (var i = 0; i < shaders_to_attach.length; ++i)
+ gl.attachShader(prog, shaders_to_attach[i]);
+ if(gl.getError() != gl.NO_ERROR)
+ assertMsg(false, "unexpected error in attachShader()");
+ for (var i = 0; i < shaders_to_detach.length; ++i)
+ gl.detachShader(prog, shaders_to_detach[i]);
+ if(gl.getError() != gl.NO_ERROR)
+ assertMsg(false, "unexpected error in detachShader()");
+ assertMsg(doArraysHaveSameContents(gl.getAttachedShaders(prog), expected_shaders), errmsg);
+ }
+ checkGetAttachedShaders([], [], [], "getAttachedShaders should return an empty list by default");
+ checkGetAttachedShaders([fs], [], [fs], "attaching a single shader should give the expected list");
+ checkGetAttachedShaders([fs, vs], [], [fs, vs],
+ "attaching some shaders should give the expected list");
+ checkGetAttachedShaders([fs], [fs], [], "attaching a shader and detaching it should leave an empty list");
+ checkGetAttachedShaders([fs, vs], [fs, vs], [],
+ "attaching some shaders and detaching them in same order should leave an empty list");
+ checkGetAttachedShaders([fs, vs], [vs, fs], [],
+ "attaching some shaders and detaching them in random order should leave an empty list");
+ checkGetAttachedShaders([fs, vs], [vs], [fs],
+ "attaching and detaching some shaders should leave the difference list");
+ checkGetAttachedShaders([fs, vs], [fs], [vs],
+ "attaching and detaching some shaders should leave the difference list");
+ checkGetAttachedShaders([fsBad], [], [fsBad],
+ "attaching a shader that failed to compile should still show it in the list");
+ checkGetAttachedShaders([fs, vsBad], [], [fs, vsBad],
+ "attaching shaders, including one that failed to compile, should still show the it in the list");
+
+/////// Check linkProgram() and useProgram /////////////////////////////
+
+ function checkLinkAndUse(shaders, deleteShaderAfterAttach, expected_status, testInvalidEnums, errmsg) {
+ var prog = gl.createProgram();
+ for (var i = 0; i < shaders.length; ++i) {
+ gl.attachShader(prog, shaders[i]);
+ if (deleteShaderAfterAttach)
+ gl.deleteShader(shaders[i]);
+ }
+ gl.bindAttribLocation(prog, 0, "aVertex");
+ gl.bindAttribLocation(prog, 1, "aColor");
+ gl.linkProgram(prog);
+ if (gl.getError() != gl.NO_ERROR)
+ assertMsg(false, "unexpected error in linkProgram()");
+ assertMsg(gl.getProgramParameter(prog, gl.LINK_STATUS) == expected_status, errmsg);
+ var infolog = gl.getProgramInfoLog(prog);
+ if (gl.getError() != gl.NO_ERROR)
+ assertMsg(false, "unexpected error in getProgramInfoLog()");
+ if (typeof(infolog) != "string")
+ assertMsg(false, "getProgramInfoLog() did not return a string");
+ if (expected_status == true && gl.getProgramParameter(prog, gl.LINK_STATUS) == false)
+ debug(infolog);
+ if (gl.getError() != gl.NO_ERROR)
+ assertMsg(false, "unexpected error in getProgramParameter()");
+
+ if (testInvalidEnums) {
+ // Verify that constants removed from the WebGL spec generate INVALID_ENUM errors
+ assertMsg(gl.getProgramParameter(prog, desktopGL['INFO_LOG_LENGTH']) === null, "invalid call to getProgramParameter should return null");
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "INFO_LOG_LENGTH is not a valid argument to getProgramParameter in WebGL");
+ assertMsg(gl.getProgramParameter(prog, desktopGL['ACTIVE_ATTRIBUTE_MAX_LENGTH']) === null, "invalid call to getProgramParameter should return null");
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "ACTIVE_ATTRIBUTE_MAX_LENGTH is not a valid argument to getProgramParameter in WebGL");
+ assertMsg(gl.getProgramParameter(prog, desktopGL['ACTIVE_UNIFORM_MAX_LENGTH']) === null, "invalid call to getProgramParameter should return null");
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "ACTIVE_UNIFORM_MAX_LENGTH is not a valid argument to getProgramParameter in WebGL");
+ }
+
+ gl.useProgram(prog);
+ if (expected_status == true)
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "using a valid program should succeed");
+ if (expected_status == false)
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "using an invalid program should generate INVALID_OPERATION");
+ return prog;
+ }
+
+ var progGood1 = checkLinkAndUse([vs, fs], false, true, true, "valid program should link");
+ var progGood2 = checkLinkAndUse([vs, fs2], false, true, false, "valid program #2 should link");
+ var progBad1 = checkLinkAndUse([vs], false, false, false, "program with no fragment shader should fail to link");
+ var progBad2 = checkLinkAndUse([fs], false, false, false, "program with no vertex shader should fail to link");
+ var progBad3 = checkLinkAndUse([vsBad, fs], false, false, false, "program with bad vertex shader should fail to link");
+ var progBad4 = checkLinkAndUse([vs, fsBad], false, false, false, "program with bad fragment shader should fail to link");
+ var progBad5 = checkLinkAndUse([vsBad, fsBad], false, false, false, "program with bad shaders should fail to link");
+
+ gl.useProgram(progGood1);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "using a valid program shouldn't generate a GL error");
+
+ var vbuf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbuf);
+ gl.bufferData(gl.ARRAY_BUFFER,
+ new Float32Array([
+ 0.0, 0.0, 0.0, 1.0,
+ 1.0, 0.0, 0.0, 1.0,
+ 1.0, 1.0, 0.0, 1.0,
+ 0.0, 1.0, 0.0, 1.0]),
+ gl.STATIC_DRAW);
+ gl.vertexAttribPointer(0, 4, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttrib3f(1, 1.0, 0.0, 0.0);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors at this point #2");
+
+ gl.useProgram(null);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "drawing with a null program should generate INVALID_OPERATION");
+
+ gl.useProgram(progGood1);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing with a valid program shouldn't generate a GL error");
+
+ gl.useProgram(progBad1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "using an invalid program should generate INVALID_OPERATION");
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Try to use an invalid program should not change the current rendering state");
+
+ gl.useProgram(progGood2);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing with a valid program shouldn't generate a GL error");
+ gl.detachShader(progGood2, fs2);
+ gl.attachShader(progGood2, fsBad);
+ gl.linkProgram(progGood2);
+ assertMsg(gl.getProgramParameter(progGood2, gl.LINK_STATUS) == false,
+ "linking should fail with in-use formerly good program, with new bad shader attached");
+
+ // Invalid link leaves previous valid program intact.
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing with a valid program shouldn't generate a GL error");
+
+ gl.useProgram(progGood1);
+ gl.drawArrays(gl.TRIANGLES, 0, 4);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing with a valid when last used program shouldn't generate a GL error");
+
+ var progGood1 = checkLinkAndUse([vs, fs], true, true, false, "delete shaders after attaching them and before linking program should not affect linkProgram");
+ gl.useProgram(progGood1);
+ gl.drawArrays(gl.TRIANGLES, 0, 4);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "drawing with a valid when last used program shouldn't generate a GL error");
+
+/////// Check deleteProgram() and deleteShader() /////////////////////////////
+
+ gl.useProgram(progGood1);
+ gl.deleteProgram(progGood1);
+ gl.drawArrays(gl.TRIANGLES, 0, 4);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "delete the current program shouldn't change the current rendering state");
+
+ gl.linkProgram(progGood1);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "The current program shouldn't be deleted");
+
+ var fs3 = gl.createShader(gl.FRAGMENT_SHADER);
+ gl.shaderSource(fs3, "precision mediump float; varying vec4 vColor; void main() { gl_FragColor = vColor; }");
+ gl.compileShader(fs3);
+
+ assertMsg(gl.getShaderParameter(fs3, gl.COMPILE_STATUS) == true,
+ "good fragment shader should compile");
+
+ gl.deleteShader(fs3);
+ gl.compileShader(fs3);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "an unattached shader should be deleted immediately");
+
+ fs3 = gl.createShader(gl.FRAGMENT_SHADER);
+ gl.shaderSource(fs3, "precision mediump float; varying vec4 vColor; void main() { gl_FragColor = vColor; }");
+ gl.compileShader(fs3);
+
+ assertMsg(gl.getShaderParameter(fs3, gl.COMPILE_STATUS) == true,
+ "good fragment shader should compile");
+
+ gl.detachShader(progGood1, fs);
+ gl.attachShader(progGood1, fs3);
+
+ gl.deleteShader(fs3);
+ gl.compileShader(fs3);
+ assertMsg(gl.getShaderParameter(fs3, gl.COMPILE_STATUS) == true,
+ "an attached shader shouldn't be deleted");
+
+ gl.useProgram(null);
+ gl.linkProgram(progGood1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "a delete-marked program should be deleted once it's no longer the current program");
+
+ gl.compileShader(fs3);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "a delete-marked shader should be deleted once all its attachments are removed");
+
+//////// Check linkProgram() with relinked program //////////
+ var vs = wtu.loadShaderFromScript(gl, "vshader");
+ var fs = wtu.loadShaderFromScript(gl, "fshader-red");
+ var prg = wtu.createProgram(gl, vs, fs);
+ gl.useProgram(prg);
+ var posLoc = gl.getAttribLocation(prg, "a_position");
+ wtu.setupUnitQuad(gl, posLoc);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [255, 0, 0, 255], "should be red");
+ gl.shaderSource(fs, wtu.getScript("fshader-green"));
+ gl.compileShader(fs);
+ gl.linkProgram(prg);
+ // Program should be new program at this point without calling useProgram
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+ var prg = wtu.setupProgram(gl, ["vshader", "fshader-settable"], ["a_position"]);
+ var colorLoc = gl.getUniformLocation(prg, "u_color");
+ gl.uniform4f(colorLoc, 1, 0, 0, 1);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [255, 0, 0, 255], "should be red");
+ gl.linkProgram(prg);
+ // Program's uniforms should be cleared at this point without calling useProgram
+ wtu.clearAndDrawUnitQuad(gl, [0, 255, 0, 255]);
+ wtu.checkCanvas(gl, [0, 0, 0, 0], "should be tranparent black");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+}
+
+debug("");
+go();
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/use-program-crash-with-discard-in-fragment-shader.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/use-program-crash-with-discard-in-fragment-shader.html
new file mode 100644
index 000000000..3277e94ec
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/programs/use-program-crash-with-discard-in-fragment-shader.html
@@ -0,0 +1,100 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Program Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script id="vertexShader" language="x-shader/x-vertex">
+attribute vec4 ATTR0;
+void main()
+{
+ gl_Position = ATTR0;
+}
+</script>
+<script id="fragmentShader" language="x-shader/x-fragment">
+precision mediump float;
+void main()
+{
+ float _Intensity = exp2(gl_FragCoord.w);
+ if (_Intensity < 0.5) {
+ discard;
+ }
+ gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+<script>
+"use strict";
+description('Regression test for crash in Mac OS AMD OpenGL driver related to use of discard in fragment shader.<br><br>More specifically, triggering the crash seems to require examination of gl_FragCoord.w, use of exp2, and a call to discard in the fragment shader. Thanks to Sheheryar Zakaria and Michael Braithwaite at Turbulenz for the original test case.<br><a href="https://bugs.webkit.org/show_bug.cgi?id=73932">WebKit bug 73932</a><br>');
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+}
+
+debug("");
+
+var program = wtu.loadProgramFromScript(gl, 'vertexShader', 'fragmentShader');
+if (program) {
+ testPassed("Program linked successfully");
+} else {
+ testFailed("Program failed to link");
+}
+
+// Crash occurs here on affected machines
+gl.useProgram(program);
+
+// In some browsers, such as Chrome, the above crash only causes a
+// lost context event to be dispatched, and not synchronously. To verify
+// that everything worked, clear and read back the frame buffer.
+gl.clearColor(1.0, 0.0, 0.0, 1.0);
+gl.clear(gl.COLOR_BUFFER_BIT);
+wtu.checkCanvasRect(gl, 0, 0, 1, 1, [255, 0, 0, 255],
+ "Color should be red");
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/reading/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/reading/00_test_list.txt
new file mode 100644
index 000000000..bff4db57e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/reading/00_test_list.txt
@@ -0,0 +1,3 @@
+read-pixels-pack-alignment.html
+read-pixels-test.html
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-pack-alignment.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-pack-alignment.html
new file mode 100644
index 000000000..d1e812bef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-pack-alignment.html
@@ -0,0 +1,265 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec3 pos;
+attribute vec4 colorIn;
+varying vec4 color;
+
+void main()
+{
+ color = colorIn;
+ gl_Position = vec4(pos.xyz, 1.0);
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 color;
+
+void main()
+{
+ gl_FragColor = color;
+}
+</script>
+</head>
+<body>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+// The below declarations need to be global for "shouldBe" to see them
+var wtu = WebGLTestUtils;
+var gl = null;
+var array = null;
+var pixel = [ 0, 0, 0, 0 ];
+var expectedColor = [ 0, 0, 0, 0 ];
+
+function calculatePixelBytes(format, type)
+{
+ var size = 0;
+ switch (format) {
+ case gl.ALPHA:
+ size = 1;
+ break;
+ case gl.RGB:
+ size = 3;
+ break;
+ case gl.RGBA:
+ size = 4;
+ break;
+ default:
+ return -1;
+ }
+ switch (type) {
+ case gl.UNSIGNED_BYTE:
+ break;
+ case gl.UNSIGNED_SHORT_5_6_5:
+ if (format != gl.RGB)
+ return -1;
+ size = 2;
+ break;
+ case gl.UNSIGNED_SHORT_4_4_4_4:
+ case gl.UNSIGNED_SHORT_5_5_5_1:
+ if (format != gl.RGBA)
+ return -1;
+ size = 2;
+ break;
+ default:
+ return -1;
+ }
+ return size;
+}
+
+function calculatePaddingBytes(bytesPerPixel, packAlignment, width)
+{
+ var padding = 0;
+ switch (packAlignment) {
+ case 1:
+ case 2:
+ case 4:
+ case 8:
+ padding = (bytesPerPixel * width) % packAlignment;
+ if (padding > 0)
+ padding = packAlignment - padding;
+ break;
+ default:
+ return -1;
+ }
+ return padding;
+}
+
+function packColor(format, type, r, g, b, a)
+{
+ // FIXME: not sure if the color packing is correct for UNSIGNED_SHORT_*.
+ var color = [ 0, 0, 0, 0 ];
+ switch (type) {
+ case gl.UNSIGNED_BYTE:
+ switch (format) {
+ case gl.ALPHA:
+ color[0] = a;
+ break;
+ case gl.RGB:
+ color[0] = r;
+ color[1] = g;
+ color[2] = b;
+ break;
+ case gl.RGBA:
+ color[0] = r;
+ color[1] = g;
+ color[2] = b;
+ color[3] = a;
+ break;
+ default:
+ return null;
+ }
+ break;
+ case gl.UNSIGNED_SHORT_5_6_5:
+ if (format != gl.RGB)
+ return null;
+ r >>= 3;
+ g >>= 2;
+ b >>= 3;
+ color[0] = (r << 11) + (g << 5) + b;
+ break;
+ case gl.UNSIGNED_SHORT_4_4_4_4:
+ if (format != gl.RGBA)
+ return null;
+ r >>= 4;
+ g >>= 4;
+ b >>= 4;
+ a >>= 4;
+ color[0] = (r << 12) + (g << 8) + (b << 4) + a;
+ break;
+ case gl.UNSIGNED_SHORT_5_5_5_1:
+ if (format != gl.RGBA)
+ return null;
+ r >>= 3;
+ g >>= 3;
+ b >>= 3;
+ a >>= 7;
+ color[0] = (r << 11) + (g << 6) + (b << 1) + a;
+ break;
+ Default:
+ return null;
+ }
+ return color;
+}
+
+function runTestIteration(format, type, packAlignment, width, height)
+{
+ debug("Testing PACK_ALIGNMENT = " + packAlignment + ", width = " + width + ", height = " + height);
+ gl.clearColor(1, 0.4, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.pixelStorei(gl.PACK_ALIGNMENT, packAlignment);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ var bytesPerPixel = calculatePixelBytes(format, type);
+ var padding = calculatePaddingBytes(bytesPerPixel, packAlignment, width);
+ var size = bytesPerPixel * width * height + padding * (height - 1);
+ if (type != gl.UNSIGNED_BYTE) {
+ throw "test error: only UNSIGNED_BYTE is valid to ReadPixels";
+ }
+ if (size < 0)
+ size = 0;
+ array = new Uint8Array(size);
+ gl.readPixels(0, 0, width, height, format, type, array);
+ if (width < 0 || height < 0) {
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
+ return;
+ }
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ if (!array.length)
+ return;
+
+ // Check the last pixel of the last row.
+ var bytesPerRow = width * bytesPerPixel + padding;
+ var pos = bytesPerRow * (height - 1) + (width - 1) * bytesPerPixel;
+ var numComponents = bytesPerPixel;
+ for (var i = 0; i < numComponents; ++i)
+ pixel[i] = array[pos + i];
+ for (var i = numComponents; i < 4; ++i)
+ pixel[i] = 0;
+ expectedColor = packColor(format, type, 255, 102, 0, 255);
+ shouldBeNonNull("expectedColor");
+ shouldBe("pixel", "expectedColor");
+}
+
+description('Verify readPixels() works fine with various PACK_ALIGNMENT values.');
+
+shouldBeNonNull("gl = wtu.create3DContext('example')")
+shouldBeNonNull("program = wtu.setupProgram(gl, ['vshader', 'fshader'], ['pos', 'colorIn'])");
+
+var formats = [ gl.RGBA ];
+var formatNames = [ "RGBA" ];
+
+for (var i = 0; i < formats.length; ++i) {
+ var format = formats[i];
+
+ debug("Testing format = " + formatNames[i] + " and type = UNSIGNED_BYTE");
+ runTestIteration(format, gl.UNSIGNED_BYTE, 1, 1, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 2, 1, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 4, 1, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 8, 1, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 4, 2, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 8, 2, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 4, 3, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 8, 3, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 4, 4, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 8, 4, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 8, 5, 1);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 4, 5, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 8, 5, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 8, 6, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 8, 7, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 8, 8, 2);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 1, 0, 0);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 2, 0, 0);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 4, 0, 0);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 8, 0, 0);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 1, -1, 1);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 2, 1, -1);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 4, 0, -1);
+ runTestIteration(format, gl.UNSIGNED_BYTE, 8, -1, -1);
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-test.html
new file mode 100644
index 000000000..f3334d5b6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-test.html
@@ -0,0 +1,245 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL ReadPixels conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="200" height="200" style="width: 20px; height: 20px"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("Checks that ReadPixels works as expected.");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+var gl = wtu.create3DContext(canvas);
+
+var actual;
+var expected;
+var width = 2;
+var height = 2;
+var continueTestFunc = continueTestPart1;
+
+gl.clearColor(1, 1, 1, 1);
+gl.clear(gl.COLOR_BUFFER_BIT);
+
+// Resize the canvas to 2x2. This is an attempt to get stuff in the backbuffer.
+// that shouldn't be there.
+canvas.addEventListener("webglcontextlost", function(e) { e.preventDefault(); }, false);
+canvas.addEventListener("webglcontextrestored", continueTestAfterContextRestored, false);
+canvas.width = width;
+canvas.height = height;
+if (gl.getError() != gl.CONTEXT_LOST_WEBGL) {
+ continueTestPart1();
+}
+
+function continueTestAfterContextRestored() {
+ window.gl = wtu.create3DContext(canvas);
+ var func = continueTestFunc;
+ window.continueTestFunc = function() { testFailed("should not be here"); };
+ func();
+}
+
+function continueTestPart1() {
+ gl.clearColor(0.5, 0.7, 1.0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ var innerColor = [0.5, 0.7, 1.0, 1];
+ var outerColor = [0, 0, 0, 0];
+
+ var tests = [
+ { msg: 'in range', checkColor: innerColor, x: 0, y: 0,
+ oneColor: innerColor, oneX: 0, oneY: 0},
+ { msg: 'off top left', checkColor: outerColor, x: -1, y: -1,
+ oneColor: innerColor, oneX: 1, oneY: 1},
+ { msg: 'off bottom right', checkColor: outerColor, x: 1, y: 1,
+ oneColor: innerColor, oneX: 0, oneY: 0},
+ { msg: 'completely off top ', checkColor: outerColor, x: 0, y: -2,
+ oneColor: outerColor, oneX: 0, oneY: 0},
+ { msg: 'completely off bottom', checkColor: outerColor, x: 0, y: 2,
+ oneColor: outerColor, oneX: 0, oneY: 0},
+ { msg: 'completely off left', checkColor: outerColor, x: -2, y: 0,
+ oneColor: outerColor, oneX: 0, oneY: 0},
+ { msg: 'completeley off right', checkColor: outerColor, x: 2, y: 0,
+ oneColor: outerColor, oneX: 0, oneY: 0}
+ ];
+
+ for (var tt = 0; tt < tests.length; ++tt) {
+ var test = tests[tt];
+ debug("");
+ debug("checking: " + test.msg);
+ checkBuffer(test.checkColor, test.x, test.y,
+ test.oneColor, test.oneX, test.oneY);
+ }
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no GL errors");
+
+ function checkBuffer(checkColor, x, y, oneColor, oneX, oneY) {
+ var buf = new Uint8Array(width * height * 4);
+ gl.readPixels(x, y, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ for (var yy = 0; yy < height; ++yy) {
+ for (var xx = 0; xx < width; ++xx) {
+ var offset = (yy * width + xx) * 4;
+ var expectedColors = (oneX == xx && oneY == yy) ? oneColor : checkColor;
+ for (var cc = 0; cc < 4; ++cc) {
+ var expectedColor = expectedColors[cc] * 255;
+ var color = buf[offset + cc];
+ var diff = Math.abs(expectedColor - color);
+ assertMsg(diff < 3,
+ "color pixel at " + xx + ", " + yy + " should be about " + expectedColor);
+ }
+ }
+ }
+ }
+
+ var badFormats = [
+ {
+ format: gl.RGB,
+ type: gl.UNSIGNED_BYTE,
+ dest: new Uint8Array(3),
+ error: gl.INVALID_OPERATION
+ },
+ {
+ format: gl.RGB,
+ type: gl.UNSIGNED_SHORT_5_6_5,
+ dest: new Uint8Array(3),
+ error: gl.INVALID_OPERATION
+ },
+ {
+ format: gl.RGBA,
+ type: gl.UNSIGNED_SHORT_5_5_5_1,
+ dest: new Uint16Array(1),
+ error: gl.INVALID_OPERATION
+ },
+ {
+ format: gl.RGBA,
+ type: gl.UNSIGNED_SHORT_4_4_4_4,
+ dest: new Uint16Array(1),
+ error: gl.INVALID_OPERATION
+ },
+ {
+ format: gl.ALPHA,
+ type: gl.UNSIGNED_BYTE,
+ dest: new Uint8Array(1),
+ error: gl.INVALID_OPERATION
+ },
+ {
+ format: gl.LUMINANCE,
+ type: gl.UNSIGNED_BYTE,
+ dest: new Uint8Array(1),
+ error: gl.INVALID_ENUM
+ },
+ {
+ format: gl.LUMINANCE_ALPHA,
+ type: gl.UNSIGNED_BYTE,
+ dest: new Uint8Array(2),
+ error: gl.INVALID_ENUM
+ }
+ ];
+ debug("");
+ debug("check disallowed formats");
+ for (var tt = 0; tt < badFormats.length; ++ tt) {
+ var info = badFormats[tt]
+ var format = info.format;
+ var type = info.type;
+ var dest = info.dest;
+ var error = info.error;
+ gl.readPixels(0, 0, 1, 1, format, type, dest);
+ // note that the GL error is INVALID_OPERATION if both format and type are invalid, but
+ // INVALID_ENUM if only one is.
+ wtu.glErrorShouldBe(
+ gl, error,
+ "Should not be able to read as " + wtu.glEnumToString(gl, format) +
+ " / " + wtu.glEnumToString(gl, type));
+ }
+
+ debug("");
+ debug("check reading with lots of drawing");
+ continueTestFunc = continueTestPart2;
+ width = 1024;
+ height = 1024;
+ canvas.width = width;
+ canvas.height = height;
+ if (gl.getError() != gl.CONTEXT_LOST_WEBGL) {
+ continueTestPart2();
+ }
+}
+
+function continueTestPart2() {
+ gl.viewport(0, 0, 1024, 1024);
+ var program = wtu.setupTexturedQuad(gl);
+ var loc = gl.getUniformLocation(program, "tex");
+ gl.disable(gl.BLEND);
+ gl.disable(gl.DEPTH_TEST);
+ var colors = [[255, 0, 0, 255], [0, 255, 0, 255], [0, 0, 255, 255]];
+ var textures = [];
+ var results = [];
+ for (var ii = 0; ii < colors.length; ++ii) {
+ gl.activeTexture(gl.TEXTURE0 + ii);
+ var tex = gl.createTexture();
+ wtu.fillTexture(gl, tex, 1, 1, colors[ii]);
+ textures.push(tex);
+ }
+ for (var ii = 0; ii < colors.length; ++ii) {
+ for (var jj = 0; jj < 300 + ii + 1; ++jj) {
+ gl.uniform1i(loc, jj % 3);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ }
+ var buf = new Uint8Array(4);
+ gl.readPixels(512, 512, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ results.push(buf);
+ for (var kk = 0; kk < 99; ++kk) {
+ gl.uniform1i(loc, (jj + kk) % 3);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ }
+ }
+ for (var ii = 0; ii < colors.length; ++ii) {
+ var buf = results[ii];
+ var color = colors[ii];
+ actual = [buf[0], buf[1], buf[2], buf[3]];
+ expected = [color[0], color[1], color[2], color[3]];
+ shouldBe("actual", "expected");
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no GL errors");
+
+ debug("");
+ finishTest();
+}
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/00_test_list.txt
new file mode 100644
index 000000000..82a471c2a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/00_test_list.txt
@@ -0,0 +1,6 @@
+--min-version 1.0.3 feedback-loop.html
+framebuffer-object-attachment.html
+--min-version 1.0.2 framebuffer-state-restoration.html
+framebuffer-test.html
+renderbuffer-initialization.html
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html
new file mode 100644
index 000000000..40fe4a3d5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html
@@ -0,0 +1,127 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>WebGL Rendering Feedback Loop</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+ </head>
+ <body>
+ <canvas id="example" width="1" height="1" style="width: 40px; height: 40px;"></canvas>
+ <div id="description"></div>
+ <div id="console"></div>
+
+ <script id="vs" type="text/something-not-javascript">
+ attribute vec4 a_position;
+ attribute vec2 a_texCoord;
+ varying vec2 v_texCoord;
+ void main() {
+ gl_Position = a_position;
+ v_texCoord = a_texCoord;
+ }
+ </script>
+ <script id="fs" type="text/something-not-javascript">
+ precision mediump float;
+ varying vec2 v_texCoord;
+ uniform sampler2D u_texture;
+ void main() {
+ // Shader swizzles color channels so we can tell if the draw succeeded.
+ gl_FragColor = texture2D(u_texture, v_texCoord).gbra;
+ }
+ </script>
+ <script>
+ "use strict";
+ description("Checks that rendering feedback loops fail correctly.");
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array([255, 0, 0, 255]));
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after creating texture");
+
+ var framebuffer = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
+
+ assertMsg(gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE,
+ "framebuffer should be FRAMEBUFFER_COMPLETE.");
+
+ var program = wtu.setupProgram(gl, ["vs", "fs"], ["vPosition", "vTexCoord"]);
+ gl.uniform1i(gl.getUniformLocation(program, "u_texture"), 0);
+ gl.disable(gl.BLEND);
+ gl.disable(gl.DEPTH_TEST);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after initWebGL");
+
+ // Drawing with a texture that is also bound to the current framebuffer should fail
+ var bufferObjects = wtu.setupUnitQuad(gl, 0, 1);
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ wtu.drawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "after draw with invalid feedback loop");
+
+ // Ensure that the texture contents did not change after the previous render
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after drawing");
+ wtu.checkCanvas(gl, [0, 0, 255, 255], "Should be blue.");
+
+ // Drawing when texture is bound to an inactive uniform should succeed
+ var texture2 = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture2);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array([0, 255, 0, 255]));
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
+ gl.activeTexture(gl.TEXTURE1);
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ wtu.drawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after draw where framebuffer texture is bound to inactive texture unit");
+ wtu.checkCanvas(gl, [255, 0, 0, 255], "Should be red.");
+
+ var successfullyParsed = true;
+ </script>
+
+ <script src="../../resources/js-test-post.js"></script>
+
+ </body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-object-attachment.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-object-attachment.html
new file mode 100644
index 000000000..a44dc9c8e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-object-attachment.html
@@ -0,0 +1,665 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var gl;
+var fbo;
+var depthBuffer;
+var stencilBuffer;
+var depthStencilBuffer;
+var colorBuffer;
+var width;
+var height;
+
+var ALLOW_COMPLETE = 0x01;
+var ALLOW_UNSUPPORTED = 0x02;
+var ALLOW_INCOMPLETE_ATTACHMENT = 0x04;
+
+function checkFramebufferForAllowedStatuses(allowedStatuses)
+{
+ // If the framebuffer is in an error state for multiple reasons,
+ // we can't guarantee which one will be reported.
+ var status = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
+ var statusAllowed = ((allowedStatuses & ALLOW_COMPLETE) && (status == gl.FRAMEBUFFER_COMPLETE)) ||
+ ((allowedStatuses & ALLOW_UNSUPPORTED) && (status == gl.FRAMEBUFFER_UNSUPPORTED)) ||
+ ((allowedStatuses & ALLOW_INCOMPLETE_ATTACHMENT) && (status == gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT));
+ var msg = "gl.checkFramebufferStatus(gl.FRAMEBUFFER) returned " + status;
+ if (statusAllowed)
+ testPassed(msg);
+ else
+ testFailed(msg);
+}
+
+function checkBufferBits(attachment0, attachment1)
+{
+ if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE)
+ return;
+
+ var haveDepthBuffer = attachment0 == gl.DEPTH_ATTACHMENT ||
+ attachment0 == gl.DEPTH_STENCIL_ATTACHMENT ||
+ attachment1 == gl.DEPTH_ATTACHMENT ||
+ attachment1 == gl.DEPTH_STENCIL_ATTACHMENT;
+ var haveStencilBuffer = attachment0 == gl.STENCIL_ATTACHMENT ||
+ attachment0 == gl.DEPTH_STENCIL_ATTACHMENT ||
+ attachment1 == gl.STENCIL_ATTACHMENT ||
+ attachment1 == gl.DEPTH_STENCIL_ATTACHMENT;
+
+ shouldBeTrue("gl.getParameter(gl.RED_BITS) + gl.getParameter(gl.GREEN_BITS) + gl.getParameter(gl.BLUE_BITS) + gl.getParameter(gl.ALPHA_BITS) >= 16");
+
+ if (haveDepthBuffer)
+ shouldBeTrue("gl.getParameter(gl.DEPTH_BITS) >= 16");
+ else
+ shouldBeTrue("gl.getParameter(gl.DEPTH_BITS) == 0");
+
+ if (haveStencilBuffer)
+ shouldBeTrue("gl.getParameter(gl.STENCIL_BITS) >= 8");
+ else
+ shouldBeTrue("gl.getParameter(gl.STENCIL_BITS) == 0");
+}
+
+function testAttachment(attachment, buffer, allowedStatuses)
+{
+ shouldBeNonNull("fbo = gl.createFramebuffer()");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, colorBuffer);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment, gl.RENDERBUFFER, buffer);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ checkFramebufferForAllowedStatuses(allowedStatuses);
+ if ((allowedStatuses & ALLOW_COMPLETE) == 0) {
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.glErrorShouldBe(gl, gl.INVALID_FRAMEBUFFER_OPERATION);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(width * height * 4));
+ wtu.glErrorShouldBe(gl, gl.INVALID_FRAMEBUFFER_OPERATION);
+ }
+ checkBufferBits(attachment);
+ gl.deleteFramebuffer(fbo);
+}
+
+function testAttachments(attachment0, buffer0, attachment1, buffer1, allowedStatuses)
+{
+ shouldBeNonNull("fbo = gl.createFramebuffer()");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, colorBuffer);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment0, gl.RENDERBUFFER, buffer0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment1, gl.RENDERBUFFER, buffer1);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ checkFramebufferForAllowedStatuses(allowedStatuses);
+ checkBufferBits(attachment0, attachment1);
+ gl.deleteFramebuffer(fbo);
+}
+
+function testColorRenderbuffer(internalformat, allowedStatuses)
+{
+ shouldBeNonNull("colorBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, colorBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, internalformat, width, height);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ testAttachment(gl.COLOR_ATTACHMENT0, colorBuffer, allowedStatuses);
+}
+
+function testDepthStencilRenderbuffer(allowedStatuses)
+{
+ shouldBeNonNull("depthStencilBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, width, height);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ // OpenGL itself doesn't seem to guarantee that e.g. a 2 x 0
+ // renderbuffer will report 2 for its width when queried.
+ if (!(height == 0 && width > 0))
+ shouldBe("gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_WIDTH)", "width");
+ if (!(width == 0 && height > 0))
+ shouldBe("gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_HEIGHT)", "height");
+ shouldBe("gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_INTERNAL_FORMAT)", "gl.DEPTH_STENCIL");
+ shouldBe("gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_RED_SIZE)", "0");
+ shouldBe("gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_GREEN_SIZE)", "0");
+ shouldBe("gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_BLUE_SIZE)", "0");
+ shouldBe("gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_ALPHA_SIZE)", "0");
+ // Avoid verifying these for zero-sized renderbuffers for the time
+ // being since it appears that even OpenGL doesn't guarantee them.
+ if (width > 0 && height > 0) {
+ shouldBeTrue("gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_DEPTH_SIZE) > 0");
+ shouldBeTrue("gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_STENCIL_SIZE) > 0");
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ testAttachment(gl.DEPTH_STENCIL_ATTACHMENT, depthStencilBuffer, allowedStatuses);
+ testDepthStencilDepthStencil();
+}
+
+function testDepthStencilDepthStencil()
+{
+ if (!width || !height) {
+ return;
+ }
+
+ var tests = [
+ { firstFormat: gl.DEPTH_COMPONENT16,
+ firstAttach: gl.DEPTH_ATTACHMENT,
+ secondFormat: gl.DEPTH_STENCIL,
+ secondAttach: gl.DEPTH_STENCIL_ATTACHMENT
+ },
+ { firstFormat: gl.DEPTH_STENCIL,
+ firstAttach: gl.DEPTH_STENCIL_ATTACHMENT,
+ secondFormat: gl.DEPTH_COMPONENT16,
+ secondAttach: gl.DEPTH_ATTACHMENT
+ }
+ ];
+ for (var ii = 0; ii < tests.length; ++ii) {
+ var test = tests[ii];
+ for (var jj = 0; jj < 2; ++jj) {
+ var fbo = gl.createFramebuffer();
+ var tex = gl.createTexture();
+ var firstRb = gl.createRenderbuffer();
+
+ debug("");
+ debug("test: " + wtu.glEnumToString(gl, test.firstFormat) + " vs " + wtu.glEnumToString(gl, test.secondFormat) + " with " + (jj ? "unbind" : "delete"));
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ // attach texture as color
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);
+
+ // attach first
+ gl.bindRenderbuffer(gl.RENDERBUFFER, firstRb);
+ gl.renderbufferStorage(gl.RENDERBUFFER, test.firstFormat, width, height);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, test.firstAttach, gl.RENDERBUFFER, firstRb);
+
+ shouldBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+ gl.enable(gl.DEPTH_TEST);
+ var program = wtu.setupColorQuad(gl);
+ // Test it works
+ wtu.drawUByteColorQuad(gl, [0, 255, 0, 255]);
+ wtu.drawUByteColorQuad(gl, [255, 0, 0, 255]); // should not draw since DEPTH_FUNC == LESS
+ wtu.checkCanvasRect(gl, 0, 0, width, height, [0, 255, 0, 255], "should be green");
+
+ var secondRb = gl.createRenderbuffer();
+
+ // attach second
+ gl.bindRenderbuffer(gl.RENDERBUFFER, secondRb);
+ gl.renderbufferStorage(gl.RENDERBUFFER, test.secondFormat, width, height);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, test.secondAttach, gl.RENDERBUFFER, secondRb);
+
+ if (jj == 0) {
+ // now delete it
+ debug("test deleting second renderbuffer");
+ gl.deleteRenderbuffer(secondRb);
+ } else {
+ // unbind it
+ debug("test unbinding second renderbuffer");
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, test.secondAttach, gl.RENDERBUFFER, null);
+ }
+
+ // If the first attachment is not restored this may fail
+ shouldBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ // If the first attachment is not restored this may fail.
+ gl.clear(gl.DEPTH_BUFFER_BIT);
+ wtu.drawUByteColorQuad(gl, [0, 255, 0, 255]);
+ wtu.drawUByteColorQuad(gl, [255, 0, 0, 255]); // should not draw since DEPTH_FUNC == LESS
+ wtu.checkCanvasRect(gl, 0, 0, width, height, [0, 255, 0, 255], "should be green");
+ gl.disable(gl.DEPTH_TEST);
+
+ if (jj == 1) {
+ gl.deleteRenderbuffer(secondRb);
+ }
+
+ gl.deleteRenderbuffer(secondRb);
+ gl.deleteFramebuffer(fbo);
+ }
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+}
+
+description("Test framebuffer object attachment behaviors");
+
+shouldBeNonNull("gl = wtu.create3DContext()");
+
+function testFramebufferRequiredCombinations() {
+ debug("Checking combinations of framebuffer attachments required to be valid");
+
+ // Per discussion with the OpenGL ES working group, the following framebuffer attachment
+ // combinations are required to work in all WebGL implementations:
+ // 1. COLOR_ATTACHMENT0 = RGBA/UNSIGNED_BYTE texture
+ // 2. COLOR_ATTACHMENT0 = RGBA/UNSIGNED_BYTE texture + DEPTH_ATTACHMENT = DEPTH_COMPONENT16 renderbuffer
+ // 3. COLOR_ATTACHMENT0 = RGBA/UNSIGNED_BYTE texture + DEPTH_STENCIL_ATTACHMENT = DEPTH_STENCIL renderbuffer
+
+ var fbo = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+
+ var width = 64;
+ var height = 64;
+
+ // 1. COLOR_ATTACHMENT0 = RGBA/UNSIGNED_BYTE texture
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
+ checkFramebufferForAllowedStatuses(ALLOW_COMPLETE);
+ checkBufferBits();
+
+ // 2. COLOR_ATTACHMENT0 = RGBA/UNSIGNED_BYTE texture + DEPTH_ATTACHMENT = DEPTH_COMPONENT16 renderbuffer
+ var renderbuffer = gl.createRenderbuffer();
+ gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, width, height);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, renderbuffer);
+ checkFramebufferForAllowedStatuses(ALLOW_COMPLETE);
+ checkBufferBits(gl.DEPTH_ATTACHMENT);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, null);
+
+ // 3. COLOR_ATTACHMENT0 = RGBA/UNSIGNED_BYTE texture + DEPTH_STENCIL_ATTACHMENT = DEPTH_STENCIL renderbuffer
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, width, height);
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, renderbuffer);
+ checkFramebufferForAllowedStatuses(ALLOW_COMPLETE);
+ checkBufferBits(gl.DEPTH_STENCIL_ATTACHMENT);
+
+ // Clean up
+ gl.deleteRenderbuffer(renderbuffer);
+ gl.deleteTexture(texture);
+ gl.deleteFramebuffer(fbo);
+}
+
+testFramebufferRequiredCombinations();
+
+for (width = 0; width <= 2; width += 2)
+{
+ for (height = 0; height <= 2; height += 2)
+ {
+ debug("");
+ debug("Dimensions " + width + " x " + height);
+
+ debug("Create renderbuffers");
+ shouldBeNonNull("colorBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, colorBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, width, height);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ shouldBeNonNull("depthBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, depthBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, width, height);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ shouldBeNonNull("stencilBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, stencilBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.STENCIL_INDEX8, width, height);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ shouldBeNonNull("depthStencilBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, width, height);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ var allowedStatusForGoodCase
+ = (width == 0 || height == 0) ? ALLOW_INCOMPLETE_ATTACHMENT : ALLOW_COMPLETE;
+
+ // some cases involving stencil seem to be implementation-dependent
+ var allowedStatusForImplDependentCase = allowedStatusForGoodCase | ALLOW_UNSUPPORTED;
+
+ debug("Attach depth using DEPTH_ATTACHMENT");
+ testAttachment(gl.DEPTH_ATTACHMENT, depthBuffer, allowedStatusForGoodCase);
+ debug("Attach depth using STENCIL_ATTACHMENT");
+ testAttachment(gl.STENCIL_ATTACHMENT, depthBuffer, ALLOW_INCOMPLETE_ATTACHMENT);
+ debug("Attach depth using DEPTH_STENCIL_ATTACHMENT");
+ testAttachment(gl.DEPTH_STENCIL_ATTACHMENT, depthBuffer, ALLOW_INCOMPLETE_ATTACHMENT);
+ debug("Attach stencil using STENCIL_ATTACHMENT");
+ testAttachment(gl.STENCIL_ATTACHMENT, stencilBuffer, allowedStatusForImplDependentCase);
+ debug("Attach stencil using DEPTH_ATTACHMENT");
+ testAttachment(gl.DEPTH_ATTACHMENT, stencilBuffer, ALLOW_INCOMPLETE_ATTACHMENT);
+ debug("Attach stencil using DEPTH_STENCIL_ATTACHMENT");
+ testAttachment(gl.DEPTH_STENCIL_ATTACHMENT, stencilBuffer, ALLOW_INCOMPLETE_ATTACHMENT);
+ debug("Attach depthStencil using DEPTH_STENCIL_ATTACHMENT");
+ testAttachment(gl.DEPTH_STENCIL_ATTACHMENT, depthStencilBuffer, allowedStatusForGoodCase);
+ debug("Attach depthStencil using DEPTH_ATTACHMENT");
+ testAttachment(gl.DEPTH_ATTACHMENT, depthStencilBuffer, ALLOW_INCOMPLETE_ATTACHMENT);
+ debug("Attach depthStencil using STENCIL_ATTACHMENT");
+ testAttachment(gl.STENCIL_ATTACHMENT, depthStencilBuffer, ALLOW_INCOMPLETE_ATTACHMENT);
+
+ var allowedStatusForConflictedAttachment
+ = (width == 0 || height == 0) ? ALLOW_UNSUPPORTED | ALLOW_INCOMPLETE_ATTACHMENT
+ : ALLOW_UNSUPPORTED;
+
+ debug("Attach depth, then stencil, causing conflict");
+ testAttachments(gl.DEPTH_ATTACHMENT, depthBuffer, gl.STENCIL_ATTACHMENT, stencilBuffer, allowedStatusForConflictedAttachment);
+ debug("Attach stencil, then depth, causing conflict");
+ testAttachments(gl.STENCIL_ATTACHMENT, stencilBuffer, gl.DEPTH_ATTACHMENT, depthBuffer, allowedStatusForConflictedAttachment);
+ debug("Attach depth, then depthStencil, causing conflict");
+ testAttachments(gl.DEPTH_ATTACHMENT, depthBuffer, gl.DEPTH_STENCIL_ATTACHMENT, depthStencilBuffer, allowedStatusForConflictedAttachment);
+ debug("Attach depthStencil, then depth, causing conflict");
+ testAttachments(gl.DEPTH_STENCIL_ATTACHMENT, depthStencilBuffer, gl.DEPTH_ATTACHMENT, depthBuffer, allowedStatusForConflictedAttachment);
+ debug("Attach stencil, then depthStencil, causing conflict");
+ testAttachments(gl.DEPTH_ATTACHMENT, depthBuffer, gl.DEPTH_STENCIL_ATTACHMENT, depthStencilBuffer, allowedStatusForConflictedAttachment);
+ debug("Attach depthStencil, then stencil, causing conflict");
+ testAttachments(gl.DEPTH_STENCIL_ATTACHMENT, depthStencilBuffer, gl.STENCIL_ATTACHMENT, stencilBuffer, allowedStatusForConflictedAttachment);
+
+ debug("Attach color renderbuffer with internalformat == RGBA4");
+ testColorRenderbuffer(gl.RGBA4, allowedStatusForGoodCase);
+
+ debug("Attach color renderbuffer with internalformat == RGB5_A1");
+ testColorRenderbuffer(gl.RGB5_A1, allowedStatusForGoodCase);
+
+ debug("Attach color renderbuffer with internalformat == RGB565");
+ testColorRenderbuffer(gl.RGB565, allowedStatusForGoodCase);
+
+ debug("Create and attach depthStencil renderbuffer");
+ testDepthStencilRenderbuffer(allowedStatusForGoodCase);
+ }
+}
+
+// Determine if we can attach both color and depth or color and depth_stencil
+var depthFormat;
+var depthAttachment;
+
+function checkValidColorDepthCombination() {
+ shouldBeNonNull("fbo = gl.createFramebuffer()");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ shouldBeNonNull("colorBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, colorBuffer);
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, colorBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16);
+
+ shouldBeNonNull("depthBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, depthBuffer);
+
+ return tryDepth(gl.DEPTH_COMPONENT16, gl.DEPTH_ATTACHMENT) || tryDepth(gl.DEPTH_STENCIL, gl.DEPTH_STENCIL_ATTACHMENT);
+
+ function tryDepth(try_format, try_attachment) {
+ if (depthAttachment) {
+ // If we've tried once unattach the old one.
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, depthAttachment, gl.RENDERBUFFER, null);
+ }
+ depthFormat = try_format;
+ depthAttachment = try_attachment;
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, depthAttachment, gl.RENDERBUFFER, depthBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, depthFormat, 16, 16);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ return gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE;
+ }
+}
+
+if (checkValidColorDepthCombination()) {
+ testFramebufferIncompleteDimensions();
+ testFramebufferIncompleteAttachment();
+ testFramebufferIncompleteMissingAttachment();
+ testUsingIncompleteFramebuffer();
+ testReadingFromMissingAttachment();
+}
+
+function checkFramebuffer(expected) {
+ var actual = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
+ var msg = "gl.checkFramebufferStatus(gl.FRAMEBUFFER) should be " + wtu.glEnumToString(gl, expected) + " was " + wtu.glEnumToString(gl, actual);
+ if (expected != gl.FRAMEBUFFER_COMPLETE) {
+ msg += " or FRAMEBUFFER_UNSUPPORTED";
+ }
+ if (actual == expected ||
+ (expected != gl.FRAMEBUFFER_COMPLETE &&
+ actual == gl.FRAMBUFFER_UNSUPPORTED)) {
+ testPassed(msg);
+ } else {
+ testFailed(msg);
+ }
+}
+
+function testUsingIncompleteFramebuffer() {
+ debug("");
+ debug("Test drawing or reading from an incomplete framebuffer");
+ var program = wtu.setupTexturedQuad(gl);
+ var tex = gl.createTexture();
+ wtu.fillTexture(gl, tex, 1, 1, [0,255,0,255]);
+
+ shouldBeNonNull("fbo = gl.createFramebuffer()");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ shouldBeNonNull("colorBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, colorBuffer);
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, colorBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16);
+
+ shouldBeNonNull("depthBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, depthBuffer);
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, depthAttachment, gl.RENDERBUFFER, depthBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, depthFormat, 16, 16);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ checkFramebuffer(gl.FRAMEBUFFER_COMPLETE);
+
+ // We pick this combination because it works on desktop OpenGL but should not work on OpenGL ES 2.0
+ gl.renderbufferStorage(gl.RENDERBUFFER, depthFormat, 32, 16);
+ checkFramebuffer(gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS);
+ debug("");
+ debug("Drawing or reading from an incomplete framebuffer should generate INVALID_FRAMEBUFFER_OPERATION");
+ testRenderingAndReading();
+
+ shouldBeNonNull("fbo2 = gl.createFramebuffer()");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo2);
+ checkFramebuffer(gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);
+ debug("");
+ debug("Drawing or reading from an incomplete framebuffer should generate INVALID_FRAMEBUFFER_OPERATION");
+ testRenderingAndReading();
+
+ shouldBeNonNull("colorBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, colorBuffer);
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, colorBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 0, 0);
+ debug("");
+ debug("Drawing or reading from an incomplete framebuffer should generate INVALID_FRAMEBUFFER_OPERATION");
+ testRenderingAndReading();
+
+ function testRenderingAndReading() {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "drawArrays with incomplete framebuffer");
+ gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4));
+ wtu.glErrorShouldBe(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "readPixels from incomplete framebuffer");
+ // copyTexImage and copyTexSubImage can be either INVALID_FRAMEBUFFER_OPERATION because
+ // the framebuffer is invalid OR INVALID_OPERATION because in the case of no attachments
+ // the framebuffer is not of a compatible type.
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, 1, 1);
+ wtu.glErrorShouldBe(gl, [gl.INVALID_FRAMEBUFFER_OPERATION, gl.INVALID_OPERATION], "copyTexImage2D from incomplete framebuffer");
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, 1, 1, 0);
+ wtu.glErrorShouldBe(gl, [gl.INVALID_FRAMEBUFFER_OPERATION, gl.INVALID_OPERATION], "copyTexSubImage2D from incomplete framebuffer");
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ wtu.glErrorShouldBe(gl, gl.INVALID_FRAMEBUFFER_OPERATION, "clear with incomplete framebuffer");
+ }
+}
+
+function testFramebufferIncompleteAttachment() {
+ shouldBeNonNull("fbo = gl.createFramebuffer()");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ shouldBeNonNull("colorBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, colorBuffer);
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, colorBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16);
+ checkFramebuffer(gl.FRAMEBUFFER_COMPLETE);
+
+ debug("");
+ debug("Wrong storage type for type of attachment be FRAMEBUFFER_INCOMPLETE_ATTACHMENT (OpenGL ES 2.0 4.4.5)");
+ gl.renderbufferStorage(gl.RENDERBUFFER, depthFormat, 16, 16);
+ checkFramebuffer(gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT);
+
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16);
+ checkFramebuffer(gl.FRAMEBUFFER_COMPLETE);
+
+ debug("");
+ debug("0 size attachment should be FRAMEBUFFER_INCOMPLETE_ATTACHMENT (OpenGL ES 2.0 4.4.5)");
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 0, 0);
+ checkFramebuffer(gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+}
+
+function testFramebufferIncompleteMissingAttachment() {
+ debug("");
+ debug("No attachments should be INCOMPLETE_FRAMEBUFFER_MISSING_ATTACHMENT (OpenGL ES 2.0 4.4.5)");
+ shouldBeNonNull("fbo = gl.createFramebuffer()");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ checkFramebuffer(gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);
+
+ shouldBeNonNull("colorBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, colorBuffer);
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, colorBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16);
+ checkFramebuffer(gl.FRAMEBUFFER_COMPLETE);
+
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, null);
+ checkFramebuffer(gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+}
+
+function testFramebufferIncompleteDimensions() {
+ debug("");
+ debug("Attachments of different sizes should be FRAMEBUFFER_INCOMPLETE_DIMENSIONS (OpenGL ES 2.0 4.4.5)");
+
+ shouldBeNonNull("fbo = gl.createFramebuffer()");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ shouldBeNonNull("colorBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, colorBuffer);
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, colorBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16);
+
+ shouldBeNonNull("depthBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, depthBuffer);
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, depthAttachment, gl.RENDERBUFFER, depthBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, depthFormat, 16, 16);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ checkFramebuffer(gl.FRAMEBUFFER_COMPLETE);
+
+ gl.renderbufferStorage(gl.RENDERBUFFER, depthFormat, 32, 16);
+ checkFramebuffer(gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS);
+ gl.renderbufferStorage(gl.RENDERBUFFER, depthFormat, 16, 16);
+ checkFramebuffer(gl.FRAMEBUFFER_COMPLETE);
+ gl.bindRenderbuffer(gl.RENDERBUFFER, colorBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 32);
+ checkFramebuffer(gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 16, 16);
+ checkFramebuffer(gl.FRAMEBUFFER_COMPLETE);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 16, 16, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE) {
+ return;
+ }
+
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 32, 16, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ checkFramebuffer(gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 16, 16, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ checkFramebuffer(gl.FRAMEBUFFER_COMPLETE);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+}
+
+function testReadingFromMissingAttachment() {
+ debug("");
+ debug("Test drawing or reading from a missing framebuffer attachment");
+
+ shouldBeNonNull("fbo = gl.createFramebuffer()");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+
+ var size = 16;
+
+ // The only scenario we can verify is an attempt to read or copy
+ // from a missing color attachment while the framebuffer is still
+ // complete.
+ shouldBeNonNull("depthBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, depthBuffer);
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depthBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, size, size);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "After depth renderbuffer setup");
+ if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE) {
+ debug("Unable to allocate a framebuffer with just a depth attachment; this is legal");
+ // Try just a depth/stencil renderbuffer
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, null);
+ shouldBeNonNull("depthStencilBuffer = gl.createRenderbuffer()");
+ gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, depthStencilBuffer);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, size, size);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "After depth+stencil renderbuffer setup");
+ if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE) {
+ debug("Unable to allocate a framebuffer with just a depth+stencil attachment; this is legal");
+ return;
+ }
+ }
+
+ // The FBO has no color attachment. ReadPixels, CopyTexImage2D,
+ // and CopyTexSubImage2D should all generate INVALID_OPERATION.
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Before ReadPixels from missing attachment");
+ gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4));
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "After ReadPixels from missing attachment");
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Before CopyTexImage2D from missing attachment");
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, size, size, 0);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "After CopyTexImage2D from missing attachment");
+
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, size, size, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Before CopyTexSubImage2D from missing attachment");
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, size, size);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "After CopyTexSubImage2D from missing attachment");
+}
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-state-restoration.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-state-restoration.html
new file mode 100644
index 000000000..c4ff2589e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-state-restoration.html
@@ -0,0 +1,130 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Framebuffer state restoration Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+description();
+
+function test() {
+ var gl = wtu.create3DContext("example", {preserveDrawingBuffer: true});
+ var program = wtu.setupColorQuad(gl);
+ var colorLoc = gl.getUniformLocation(program, "u_color");
+ gl.enable(gl.DEPTH_TEST);
+ gl.depthFunc(gl.LESS);
+
+ var testDrawToBackBuffer = function(label) {
+ debug("");
+ debug("drawing to backbuffer " + label);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ // Draw in green
+ gl.uniform4fv(colorLoc, [0, 1, 0, 1]);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+ // Draw in red, should not draw because of depth test.
+ gl.uniform4fv(colorLoc, [1, 0, 0, 1]);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should still be green");
+ }
+
+ var testDrawToFBO = function(label ) {
+ debug("");
+ debug("drawing to framebuffer " + label);
+ // Draw in green
+ gl.uniform4fv(colorLoc, [0, 1, 0, 1]);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+ // Draw in red as there is not depth buffer.
+ gl.uniform4fv(colorLoc, [1, 0, 0, 1]);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.checkCanvas(gl, [255, 0, 0, 255], "should be red");
+ }
+
+ testDrawToBackBuffer("start");
+
+ var fbo = gl.createFramebuffer();
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 50, 50, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);
+ if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE) {
+ finishTest();
+ return;
+ }
+
+ wtu.checkCanvas(gl, [0, 0, 0, 0], "should be zero");
+ testDrawToFBO("start");
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ testDrawToBackBuffer("after drawing to framebuffer");
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ testDrawToFBO("after drawing to backbuffer");
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ wtu.waitForComposite(function() {
+ testDrawToBackBuffer("after composite");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ testDrawToFBO("after drawing to backbuffer after composite");
+ wtu.waitForComposite(function() {
+ testDrawToFBO("after composite");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ testDrawToBackBuffer("after drawing to framebuffer after composite");
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+ finishTest();
+ });
+ });
+}
+test();
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-test.html
new file mode 100644
index 000000000..80d038c46
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-test.html
@@ -0,0 +1,199 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Framebuffer Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../../resources/desktop-gl-constants.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+"use strict";
+description("This tests framebuffer/renderbuffer-related functions");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking framebuffer/renderbuffer stuff.");
+
+ var value = gl.getFramebufferAttachmentParameter(
+ gl.FRAMEBUFFER,
+ gl.COLOR_ATTACHMENT0,
+ gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "calling getFramebufferAttachmentParameter on the default framebuffer should generate INVALID_OPERATION.");
+
+ assertMsg(gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE,
+ "calling checkFramebufferStatus on the default framebuffer should generate FRAMEBUFFER_COMPLETE.");
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texImage2D(gl.TEXTURE_2D,
+ 0, // level
+ gl.RGBA, // internalFormat
+ canvas.width, // width
+ canvas.height, // height
+ 0, // border
+ gl.RGBA, // format
+ gl.UNSIGNED_BYTE, // type
+ null); // data
+ gl.framebufferTexture2D(
+ gl.FRAMEBUFFER,
+ gl.COLOR_ATTACHMENT0,
+ gl.TEXTURE_2D,
+ tex,
+ 0);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "trying to attach a texture to default framebuffer should generate INVALID_OPERATION.");
+
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER,
+ gl.COLOR_ATTACHMENT0,
+ gl.RENDERBUFFER,
+ null);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "trying to detach default renderbuffer from default framebuffer should generate INVALID_OPERATION.");
+
+ var rb = gl.createRenderbuffer();
+ gl.bindRenderbuffer(gl.RENDERBUFFER, rb);
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, canvas.width, canvas.height);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "allocating renderbuffer storage of a newly created renderbuffer should succeed.");
+
+ gl.framebufferRenderbuffer(
+ gl.FRAMEBUFFER,
+ gl.COLOR_ATTACHMENT0,
+ gl.RENDERBUFFER,
+ rb);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "trying to attach a renderbuffer to the default framebuffer should generate INVALID_OPERATION.");
+
+ var fbtex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, fbtex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, canvas.width, canvas.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ var fb = gl.createFramebuffer();
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "binding a newly created framebuffer should succeed.");
+
+ var target = desktopGL.READ_FRAMEBUFFER
+ gl.getFramebufferAttachmentParameter(
+ target,
+ gl.COLOR_ATTACHMENT0,
+ gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "calling getFramebufferAttachmentParameter with target = READ_FRAMEBUFFER should generate INVALID_ENUM.");
+ assertMsg(gl.checkFramebufferStatus(target) == 0,
+ "calling checkFramebufferStatus with target = READ_FRAMEBUFFER should return 0.");
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "calling checkFramebufferStatus with target = READ_FRAMEBUFFER should generate INVALID_ENUM.");
+ gl.bindFramebuffer(target, gl.createFramebuffer());
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "calling bindFramebuffer with target = READ_FRAMEBUFFER should generate INVALID_ENUM.");
+ assertMsg(fb == gl.getParameter(gl.FRAMEBUFFER_BINDING),
+ "calling bindFramebuffer with target = READ_FRAMEBUFFER should not change FRAMEBUFFER_BINDING.");
+ gl.getFramebufferAttachmentParameter(target, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "calling getFramebufferAttachmentParameter with target = READ_FRAMEBUFFER should generate INVALID_ENUM.");
+ gl.framebufferTexture2D(target, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, fbtex, 0);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "calling framebufferTexImage2D with target = READ_FRAMEBUFFER should generate INVALID_ENUM.");
+ gl.framebufferRenderbuffer(target, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rb);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "calling framebufferRenderbuffer with target = READ_FRAMEBUFFER should generate INVALID_ENUM.");
+
+ var attachment = desktopGL.COLOR_ATTACHMENT1
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, attachment, gl.TEXTURE_2D, fbtex, 0);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "calling framebufferTexImage2D with attachment = COLOR_ATTACHMENT1 should generate INVALID_ENUM.");
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, attachment, gl.RENDERBUFFER, rb);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "calling framebufferRenderbuffer with attachment = COLOR_ATTACHMENT1 should generate INVALID_ENUM.");
+
+ gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER,
+ gl.COLOR_ATTACHMENT0,
+ desktopGL.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "calling getFramebufferAttachmentParameter with pname = GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING should generate INVALID_ENUM.");
+
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, fbtex, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "attaching a texture to a framebuffer should succeed.");
+
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "detaching a texture from a framebuffer should succeed.");
+
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, fbtex, 1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE,
+ "calling framebufferTexture2D with non-zero mipmap level should generate INVALID_VALUE.");
+
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, rb);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "attaching a renderbuffer to a framebuffer should succeed.");
+
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "detaching a renderbuffer from a framebuffer should succeed.");
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "binding default (null) framebuffer should succeed.");
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html
new file mode 100644
index 000000000..1a1392e61
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html
@@ -0,0 +1,122 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="testbed" width="400" height="400" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+description('Verify renderbuffers are initialized to 0 before being read in WebGL');
+
+var gl = wtu.create3DContext("testbed");
+if (!gl) {
+ testFailed('canvas.getContext() failed');
+} else {
+ // Set the clear color to green. It should never show up.
+ gl.clearColor(0, 1, 0, 1);
+
+ runTest(gl, gl.canvas.width, gl.canvas.height, 0);
+ runTest(gl, gl.canvas.width, gl.canvas.height, 1);
+ runTest(gl, gl.canvas.width, gl.canvas.height, 0);
+ runTest(gl, gl.canvas.width, gl.canvas.height, 1);
+
+ // Testing buffer clearing won't change the clear values.
+ var clearColor = gl.getParameter(gl.COLOR_CLEAR_VALUE);
+ shouldBe("clearColor", "[0, 1, 0, 1]");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, 'should be no errors');
+}
+
+function runTest(gl, width, height, order)
+{
+ wtu.checkCanvasRect(gl, 0, 0, width, height, [0,0,0,0],
+ "internal buffers have been initialized to 0");
+
+ // fill the back buffer so we know that reading below happens from
+ // the renderbuffer.
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ var fbo = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ var colorbuffer = gl.createRenderbuffer();
+ gl.bindRenderbuffer(gl.RENDERBUFFER, colorbuffer);
+ switch (order) {
+ case 0:
+ allocStorage(width, height);
+ attachBuffer(colorbuffer);
+ break;
+ case 1:
+ attachBuffer(colorbuffer);
+ allocStorage(width, height);
+ break;
+ }
+
+ function allocStorage(width, height) {
+ gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, width, height);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, 'should be no error after renderbufferStorage(internalformat = RGBA4).');
+ }
+
+ function attachBuffer(colorbuffer) {
+ gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, colorbuffer);
+ }
+
+ if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE) {
+ testFailed('Framebuffer incomplete.');
+ return;
+ }
+
+ wtu.checkCanvasRect(gl, 0, 0, width, height, [0,0,0,0],
+ "user buffers have been initialized to 0");
+
+ gl.deleteFramebuffer(fbo);
+ gl.deleteRenderbuffer(colorbuffer);
+
+ // this clear should not matter we are about to resize
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ gl.canvas.width += 1;
+ gl.canvas.height += 1;
+
+ debug('');
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/00_test_list.txt
new file mode 100644
index 000000000..1f58bb448
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/00_test_list.txt
@@ -0,0 +1,23 @@
+--min-version 1.0.2 culling.html
+draw-arrays-out-of-bounds.html
+draw-elements-out-of-bounds.html
+--min-version 1.0.3 framebuffer-switch.html
+--min-version 1.0.3 framebuffer-texture-switch.html
+gl-clear.html
+--min-version 1.0.3 gl-drawarrays.html
+gl-drawelements.html
+gl-scissor-test.html
+--min-version 1.0.2 gl-scissor-fbo-test.html
+--min-version 1.0.3 gl-scissor-canvas-dimensions.html
+--min-version 1.0.3 gl-viewport-test.html
+--min-version 1.0.3 many-draw-calls.html
+more-than-65536-indices.html
+multisample-corruption.html
+--min-version 1.0.3 negative-one-index.html
+--min-version 1.0.3 point-no-attributes.html
+point-size.html
+--min-version 1.0.3 point-with-gl-pointcoord-in-fragment-shader.html
+--min-version 1.0.3 polygon-offset.html
+--min-version 1.0.2 simple.html
+triangle.html
+line-loop-tri-fan.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/culling.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/culling.html
new file mode 100644
index 000000000..bb462c999
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/culling.html
@@ -0,0 +1,152 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"></script>
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec2 pos;
+
+ void main()
+ {
+ gl_Position = vec4(pos, 0, 1);
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+ uniform vec4 col;
+
+ void main()
+ {
+ gl_FragColor = col;
+ }
+ </script>
+
+ <script>
+ "use strict";
+ var wtu = WebGLTestUtils;
+
+ function draw(gl, arr, colLoc, col) {
+ var vertices = new Float32Array(arr);
+ var vertBuf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertBuf);
+ gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+ gl.uniform4fv(colLoc, col);
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, vertices.length / 2);
+ }
+
+ function clear(gl, col) {
+ gl.clearColor(col[0], col[1], col[2], col[3]);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ }
+
+ function check(gl, winding, shoulddraw) {
+ var msg = winding + ' face was ' + (shoulddraw ? '' : 'not ') + 'drawn.';
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0, 255, 0, 255], msg);
+ }
+
+ function runTest()
+ {
+ var cwVertices = [-1, -1, -1, 1, 1, -1, 1, 1];
+ var ccwVertices = [-1, 1, -1, -1, 1, 1, 1, -1];
+ var red = [1, 0, 0, 1];
+ var green = [0, 1, 0, 1];
+ var ok;
+
+ var gl = wtu.create3DContext('testbed', { antialias: false });
+ if (!gl) {
+ testFailed('could not create context');
+ return;
+ }
+ var program = wtu.setupProgram(gl, ['vshader', 'fshader'], ['pos']);
+ var colLoc = gl.getUniformLocation(program, 'col');
+
+ gl.enableVertexAttribArray(0);
+
+ debug('CULL_FACE should be off by default');
+ clear(gl, red);
+ draw(gl, ccwVertices, colLoc, green);
+ check(gl, 'CCW', true);
+ clear(gl, red);
+ draw(gl, cwVertices, colLoc, green);
+ check(gl, 'CW', true);
+
+ debug('Enabling CULL_FACE');
+ gl.enable(gl.CULL_FACE);
+
+ debug('BACK and CCW should be set by default');
+ clear(gl, red);
+ draw(gl, ccwVertices, colLoc, green);
+ check(gl, 'CCW', true);
+ clear(gl, green);
+ draw(gl, cwVertices, colLoc, red);
+ check(gl, 'CW', false);
+
+ var tests = [{ cullFace : 'BACK', frontFace : 'CCW', drawCCW : true, drawCW : false},
+ { cullFace : 'BACK', frontFace : 'CW', drawCCW : false, drawCW : true},
+ { cullFace : 'FRONT', frontFace : 'CCW', drawCCW : false, drawCW : true },
+ { cullFace : 'FRONT', frontFace : 'CW', drawCCW : true, drawCW : false},
+ { cullFace : 'FRONT_AND_BACK', frontFace : 'CCW', drawCCW : false, drawCW : false},
+ { cullFace : 'FRONT_AND_BACK', frontFace : 'CW', drawCCW : false, drawCW : false}];
+
+ for (var i = 0; i < tests.length; ++i) {
+ var t = tests[i];
+ debug('Setting ' + t.cullFace + ' and ' + t.frontFace);
+ gl.cullFace(gl[t.cullFace]);
+ gl.frontFace(gl[t.frontFace]);
+ clear(gl, t.drawCCW ? red : green);
+ draw(gl, ccwVertices, colLoc, t.drawCCW ? green : red);
+ check(gl, 'CCW', t.drawCCW);
+ clear(gl, t.drawCW ? red : green);
+ draw(gl, cwVertices, colLoc, t.drawCW ? green : red);
+ check(gl, 'CW', t.drawCW);
+ }
+
+ }
+ </script>
+ </head>
+ <body>
+ <canvas id="testbed" width="16" height="16" style="width:50px; height:50px"></canvas>
+ <div id="description"></div>
+ <div id="console"></div>
+ <script>
+ "use strict";
+ description('Verify that culling works');
+ runTest();
+ var successfullyParsed = true;
+ </script>
+ <script src="../../resources/js-test-post.js"></script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html
new file mode 100644
index 000000000..75741aeb0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html
@@ -0,0 +1,56 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/out-of-bounds-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Test of drawArrays with out-of-bounds parameters");
+
+OutOfBoundsTest.runDrawArraysTest('gl.drawArrays(gl.TRIANGLES, $(offset), $(count))',
+ WebGLTestUtils.create3DContext(), WebGLTestUtils);
+
+debug("")
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html
new file mode 100644
index 000000000..0d4e05e27
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html
@@ -0,0 +1,56 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/out-of-bounds-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Test of drawElements with out-of-bounds parameters");
+
+OutOfBoundsTest.runDrawElementsTest("gl.drawElements(gl.TRIANGLES, $(count), $(type), $(offset))",
+ WebGLTestUtils.create3DContext(), WebGLTestUtils);
+
+debug("");
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-switch.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-switch.html
new file mode 100644
index 000000000..7d208ff88
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-switch.html
@@ -0,0 +1,113 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL framebuffer switching conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="canvas" width="64" height="64"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("Test framebuffer switching. The test switches between two framebuffers, copying rendering results from one to the other.");
+var wtu = WebGLTestUtils;
+
+var gl = wtu.create3DContext("canvas");
+var program = wtu.setupTexturedQuad(gl);
+
+var tex1 = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex1);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, canvas.width, canvas.height, 0, gl.RGB, gl.UNSIGNED_BYTE, null);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+var fb1 = gl.createFramebuffer();
+gl.bindFramebuffer(gl.FRAMEBUFFER, fb1);
+gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex1, 0);
+
+var tex2 = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex2);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, canvas.width, canvas.height, 0, gl.RGB, gl.UNSIGNED_BYTE, null);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+var fb2 = gl.createFramebuffer();
+gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex2, 0);
+
+gl.bindTexture(gl.TEXTURE_2D, tex1);
+gl.clearColor(1.0, 1.0, 1.0, 1.0);
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+
+var iterate = function(checkFBOs, iterations) {
+ for (var i = 0; i < iterations; ++i) {
+ debug("Clearing framebuffer 1 to white");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb1);
+ if (checkFBOs)
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ debug("Copying framebuffer 1 to framebuffer 2");
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb2);
+ if (checkFBOs)
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ }
+ // Read what is in fb2
+ wtu.checkCanvas(gl, [255,255,255,255], "Framebuffer 2 should be white");
+};
+
+debug("");
+debug("Warm-up iteration");
+iterate(true, 1);
+
+debug("");
+debug("Iterating the test a few times since at least one bug it has exposed is somewhat flaky.");
+for (var i = 0; i < 3; ++i) {
+ debug("");
+ debug("Iteration " + (i + 1));
+ iterate(false, 2);
+}
+
+debug("");
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors at the end of the test.");
+
+finishTest();
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-texture-switch.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-texture-switch.html
new file mode 100644
index 000000000..a2e7904a7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-texture-switch.html
@@ -0,0 +1,109 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL framebuffer texture attachment switching conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="canvas" width="64" height="64"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("Test framebuffer texture attachment switching. The test uses one framebuffer object and switches its color attachment.");
+var wtu = WebGLTestUtils;
+
+var gl = wtu.create3DContext("canvas");
+var program = wtu.setupTexturedQuad(gl);
+
+var fb = gl.createFramebuffer();
+gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+
+var tex2 = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex2);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, canvas.width, canvas.height, 0, gl.RGB, gl.UNSIGNED_BYTE, null);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+
+var tex1 = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex1);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, canvas.width, canvas.height, 0, gl.RGB, gl.UNSIGNED_BYTE, null);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+
+gl.clearColor(1.0, 1.0, 1.0, 1.0);
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+
+var iterate = function(checkFBOs, iterations) {
+ for (var i = 0; i < iterations; ++i) {
+ debug("Clearing tex1 to white");
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex1, 0);
+ if (checkFBOs)
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ debug("Copying tex1 to tex2");
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex2, 0);
+ if (checkFBOs)
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ }
+ // Read what is in tex2
+ wtu.checkCanvas(gl, [255,255,255,255], "tex2 should be white");
+};
+
+debug("");
+debug("Warm-up iteration");
+iterate(true, 1);
+
+debug("");
+debug("Iterating the test a few times since at least one bug it has exposed is somewhat flaky.");
+for (var i = 0; i < 3; ++i) {
+ debug("");
+ debug("Iteration " + (i + 1));
+ iterate(false, 2);
+}
+
+debug("");
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors at the end of the test.");
+
+finishTest();
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-clear.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-clear.html
new file mode 100644
index 000000000..6d1a5b586
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-clear.html
@@ -0,0 +1,90 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL clear conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="1" height="1" style="width: 256px; height: 48px;"></canvas>
+<div id="description"></div><div id="console"></div>
+<script>
+"use strict";
+description("Test clear.");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.checkCanvas(gl, [0,0,0,0], "should be 0,0,0,0");
+
+gl.clearColor(1,1,1,1);
+gl.clear(gl.COLOR_BUFFER_BIT);
+wtu.checkCanvas(gl, [255,255,255,255], "should be 255,255,255,255");
+
+gl.clearColor(0,0,0,0);
+gl.clear(gl.COLOR_BUFFER_BIT);
+wtu.checkCanvas(gl, [0,0,0,0], "should be 0,0,0,0");
+
+gl.colorMask(false, false, false, true);
+gl.clearColor(1,1,1,1);
+gl.clear(gl.COLOR_BUFFER_BIT);
+wtu.checkCanvas(gl, [0,0,0,255], "should be 0,0,0,255");
+
+var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(
+ gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array([128, 128, 128, 192]));
+
+gl.disable(gl.DEPTH_TEST);
+gl.disable(gl.BLEND);
+gl.colorMask(true, true, true, true);
+gl.drawArrays(gl.TRIANGLES, 0, 6);
+wtu.checkCanvas(gl, [128,128,128,192], "should be 128,128,128,192");
+
+gl.colorMask(false, false, false, true);
+gl.clearColor(1,1,1,1);
+gl.clear(gl.COLOR_BUFFER_BIT);
+wtu.checkCanvas(gl, [128,128,128,255], "should be 128,128,128,255");
+
+// TODO: Test depth and stencil clearing.
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawarrays.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawarrays.html
new file mode 100644
index 000000000..c9241b850
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawarrays.html
@@ -0,0 +1,101 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>WebGL drawArrays Test</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+</head>
+<body>
+<canvas id="example" width="50" height="50"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ void main()
+ {
+ gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+ }
+ </script>
+
+ <script>
+ "use strict";
+ function init()
+ {
+ description(document.title);
+
+ function checkDrawArrays(mode, count, expect, msg) {
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(mode, 0, count);
+ wtu.glErrorShouldBe(gl, expect, msg);
+ }
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ checkDrawArrays(gl.TRIANGLES, 3,
+ gl.NO_ERROR, "can call gl.DrawArrays with gl.TRIANGLES");
+
+ checkDrawArrays(
+ desktopGL['QUAD_STRIP'], 4,
+ gl.INVALID_ENUM, "gl.DrawArrays with QUAD_STRIP should return INVALID_ENUM");
+ checkDrawArrays(
+ desktopGL['QUADS'], 4,
+ gl.INVALID_ENUM, "gl.DrawArrays with QUADS should return INVALID_ENUM");
+ checkDrawArrays(
+ desktopGL['POLYGON'], 4,
+ gl.INVALID_ENUM, "gl.DrawArrays with POLYGON should return INVALID_ENUM");
+ }
+
+ init();
+ var successfullyParsed = true;
+ </script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawelements.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawelements.html
new file mode 100644
index 000000000..a866f5d2b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawelements.html
@@ -0,0 +1,127 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>WebGL drawElements Test</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+ <script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+</head>
+<body>
+<canvas id="example" width="50" height="50"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ void main()
+ {
+ gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+ }
+ </script>
+
+ <script>
+ "use strict";
+ function init()
+ {
+ description(document.title);
+
+ function checkDrawElements(mode, count, type, expect, msg) {
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawElements(mode, count, type, 0);
+ wtu.glErrorShouldBe(gl, expect, msg);
+ }
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array([ 0, 1, 2]), gl.STATIC_DRAW);
+
+ checkDrawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT,
+ gl.NO_ERROR, "can call gl.DrawElements with UNSIGNED_SHORT");
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint8Array([ 0, 1, 2, 0]), gl.STATIC_DRAW);
+
+ checkDrawElements(
+ gl.TRIANGLES, 3, gl.UNSIGNED_BYTE,
+ gl.NO_ERROR, "can call gl.DrawElements with UNSIGNED_BYTE");
+ checkDrawElements(
+ desktopGL['QUAD_STRIP'], 4, gl.UNSIGNED_BYTE,
+ gl.INVALID_ENUM, "gl.DrawElements with QUAD_STRIP should return INVALID_ENUM");
+ checkDrawElements(
+ desktopGL['QUADS'], 4, gl.UNSIGNED_BYTE,
+ gl.INVALID_ENUM, "gl.DrawElements with QUADS should return INVALID_ENUM");
+ checkDrawElements(
+ desktopGL['POLYGON'], 4, gl.UNSIGNED_BYTE,
+ gl.INVALID_ENUM, "gl.DrawElements with POLYGON should return INVALID_ENUM");
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint32Array([ 0, 1, 2]), gl.STATIC_DRAW);
+
+ checkDrawElements(
+ gl.TRIANGLES, 3, gl.UNSIGNED_INT,
+ gl.INVALID_ENUM, "gl.DrawElements should return INVALID_ENUM with UNSIGNED_INT");
+ checkDrawElements(
+ gl.TRIANGLES, 3, gl.FLOAT,
+ gl.INVALID_ENUM, "gl.DrawElements should return INVALID_ENUM with FLOAT");
+ checkDrawElements(
+ gl.TRIANGLES, 3, gl.SHORT,
+ gl.INVALID_ENUM, "gl.DrawElements should return INVALID_ENUM with SHORT");
+
+ }
+
+ init();
+ var successfullyParsed = true;
+ </script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-canvas-dimensions.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-canvas-dimensions.html
new file mode 100644
index 000000000..5e7cd59a0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-canvas-dimensions.html
@@ -0,0 +1,101 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Scissor Canvas Dimensions Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<style>
+canvas {
+ border: 1px solid #000;
+ width: 64px;
+ height: 64px;
+}
+</style>
+</head>
+<body>
+<canvas id="canvas1" width="16" height="16"> </canvas>
+<canvas id="canvas2" width="16" height="16"> </canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("Check that scissoring is initially disabled and that the scissor rect does not change when canvas size changes.");
+
+var wtu = WebGLTestUtils;
+
+function testInit(canvas, attribs) {
+ var gl = wtu.create3DContext(canvas, attribs);
+ if (!gl) {
+ testFailed("context does not exist");
+ return;
+ }
+ debug("Testing that scissor test is initially disabled");
+ // Setting the scissor rect should have no effect on drawing.
+ gl.scissor(0, 0, 1, 1);
+ gl.clearColor(0, 1, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+ wtu.checkCanvasRect(gl, 0, 0, canvas.width, canvas.height, [0, 255, 0, 255], "whole canvas should be green");
+}
+
+function testCanvasSizeChange(canvas, attribs) {
+ var gl = wtu.create3DContext(canvas, attribs);
+ if (!gl) {
+ testFailed("context does not exist");
+ return;
+ }
+ debug("Testing that scissor rect dimensions do not change if the canvas is resized.");
+ canvas.width = 32;
+ canvas.height = 32;
+ gl.viewport(0, 0, 32, 32);
+ gl.enable(gl.SCISSOR_TEST);
+ gl.clearColor(0, 1, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+ wtu.checkCanvasRect(gl, 0, 0, 16, 16, [0, 255, 0, 255], "area inside scissor should be green");
+ wtu.checkCanvasRect(gl, 0, 16, 32, 16, [0, 0, 0, 0], "area outside scissor should be black");
+ wtu.checkCanvasRect(gl, 16, 0, 16, 16, [0, 0, 0, 0], "area outside scissor should be black");
+}
+
+testInit(document.getElementById("canvas1"), {antialias: false});
+debug("");
+testCanvasSizeChange(document.getElementById("canvas2"), {antialias: false});
+
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-fbo-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-fbo-test.html
new file mode 100644
index 000000000..89941d955
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-fbo-test.html
@@ -0,0 +1,133 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Scissor FBO Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="canvas" width="16" height="16" style="width: 40px; height: 40px;"> </canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("Checks the scissor does not change when switching framebuffers.");
+
+var wtu = WebGLTestUtils;
+
+function makeFramebuffer(width, height) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ var fb = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);
+ shouldBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ return fb;
+}
+
+function checkCanvasRect(x, y, width, height, color, msg) {
+ debug("checking: " + x + ", " + y + ", " + width + ", " + height);
+ wtu.checkCanvasRect(gl, x, y, width, height, color, msg);
+}
+
+var gl = wtu.create3DContext("canvas", {antialias: false});
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ var fb8x8 = makeFramebuffer(8, 8);
+ var fb32x32 = makeFramebuffer(32, 32);
+
+ var testScissor = function(scissorX, scissorY, scissorWidth, scissorHeight, msg) {
+ debug("");
+ debug(msg);
+
+ var test = function(fb, size) {
+ debug("");
+ debug("checking size: " + size);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ gl.clearColor(0, 1, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ var scissorRight = Math.min(scissorX + scissorWidth, size);
+ var scissorTop = Math.min(scissorY + scissorHeight, size);
+ var scWidth = scissorRight - scissorX;
+ var scHeight = scissorTop - scissorY;
+ var rightWidth = Math.min(size - scissorRight, 0);
+ var topHeight = Math.max(size - scissorTop, 0);
+ checkCanvasRect(scissorX, scissorY, scWidth, scHeight, [0, 255, 0, 255], "should be green");
+ checkCanvasRect(0, 0, size, scissorY, [255, 0, 0, 255], "should be red");
+ checkCanvasRect(0, scissorTop, size, topHeight, [255, 0, 0, 255], "should be red");
+ checkCanvasRect(0, 0, scissorX, size, [255, 0, 0, 255], "should be red");
+ checkCanvasRect(scissorRight, 0, scissorX, rightWidth, [255, 0, 0, 255], "should be red");
+ };
+
+ gl.disable(gl.SCISSOR_TEST);
+ gl.clearColor(1, 0, 0, 1);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb8x8);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb32x32);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb32x32);
+ gl.enable(gl.SCISSOR_TEST);
+ gl.scissor(scissorX, scissorY, scissorWidth, scissorHeight);
+ test(null, 16);
+ test(fb8x8, 8);
+ test(fb32x32, 32);
+ test(null, 16);
+ };
+
+ testScissor(2, 4, 12, 10, "test scissor in middle");
+ testScissor(0, 0, 12, 10, "test scissor at 0,0");
+ testScissor(0, 0, 16, 16, "test scissor with size that matches drawingbuffer");
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-test.html
new file mode 100644
index 000000000..0bf1ecb5a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-test.html
@@ -0,0 +1,118 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Scissor Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<style>
+canvas {
+ border: 1px solid #000;
+ width: 64px;
+ height: 64px;
+}
+</style>
+</head>
+<body>
+<canvas id="canvas1" width="16" height="16"> </canvas>
+<canvas id="canvas2" width="16" height="16"> </canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("Check if glScissor setting works.");
+
+var wtu = WebGLTestUtils;
+
+function test(canvas, attribs) {
+ var gl = wtu.create3DContext(canvas, attribs);
+
+ function test(func) {
+ gl.disable(gl.SCISSOR_TEST);
+ gl.clearColor(0,0,0,0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.enable(gl.SCISSOR_TEST);
+
+ var size = 16;
+ for (var ii = 0; ii < size; ++ii) {
+ // clear a portion of the WebGL drawing buffer
+ gl.scissor(ii, ii, 1, 1);
+ func();
+ }
+
+ for (var ii = 0; ii < size; ++ii) {
+ wtu.checkCanvasRect(gl, 0, ii, ii, 1, [0, 0, 0, 0], "should be black");
+ wtu.checkCanvasRect(gl, ii, ii, 1, 1, [0, 255, 0, 255], "should be green");
+ wtu.checkCanvasRect(gl, ii + 1, ii, size - ii - 1, 1, [0, 0, 0, 0], "should be black");
+ }
+ }
+
+ if (!gl) {
+ testFailed("context does not exist");
+ } else {
+ testPassed("context exists");
+
+ debug("");
+ debug("test with clear");
+ test(function() {
+ gl.clearColor(0, 1, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ });
+
+ wtu.setupColorQuad(gl);
+
+ debug("");
+ debug("test with draw");
+ test(function() {
+ wtu.drawFloatColorQuad(gl, [0, 1, 0, 1]);
+ });
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+ }
+}
+
+debug("test antialias: false");
+test(document.getElementById("canvas1"), {antialias: false});
+
+debug("");
+debug("test antialias: true");
+test(document.getElementById("canvas2"), {antialias: true});
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-viewport-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-viewport-test.html
new file mode 100644
index 000000000..d659cc7d5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/gl-viewport-test.html
@@ -0,0 +1,135 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Viewport Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<style>
+canvas {
+ border: 1px solid #000;
+}
+</style>
+</head>
+<body>
+<canvas id="canvas1" width="64" height="128"> </canvas>
+<canvas id="canvas2" width="64" height="128"> </canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description();
+var wtu = WebGLTestUtils;
+
+function test(canvas, attribs) {
+ var gl = wtu.create3DContext(canvas, attribs);
+
+ if (!gl) {
+ testFailed("context does not exist");
+ } else {
+ testPassed("context exists");
+
+ var blue = [0, 0, 255, 255];
+ var black = [0, 0, 0, 0];
+
+ var draw = function(viewportX, viewportY, viewportWidth, viewportHeight) {
+ gl.viewport(viewportX, viewportY, viewportWidth, viewportHeight);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.drawUByteColorQuad(gl, blue);
+ };
+
+ var drawAndCheck = function(viewportX, viewportY, viewportWidth, viewportHeight) {
+ var clipSpaceToPixelSpace = function(clip, viewportOffset, viewportSize, max) {
+ var pixel = viewportSize / 2 * clip + viewportOffset + viewportSize / 2;
+ return Math.min(max, Math.max(0, pixel));
+ };
+
+ var x1 = clipSpaceToPixelSpace(-0.5, viewportX, viewportWidth, gl.canvas.width);
+ var x2 = clipSpaceToPixelSpace( 0.5, viewportX, viewportWidth, gl.canvas.width);
+ var y1 = clipSpaceToPixelSpace(-0.5, viewportY, viewportHeight, gl.canvas.height);
+ var y2 = clipSpaceToPixelSpace( 0.5, viewportY, viewportHeight, gl.canvas.height);
+ var width = x2 - x1;
+ var height = y2 - y1;
+
+ debug("checking viewport: " + viewportX + ", " + viewportY + ", " + viewportWidth + ", " + viewportHeight);
+ debug("rect: " + x1 + ", " + y1 + ", " + width + ", " + height);
+ draw(viewportX, viewportY, viewportWidth, viewportHeight);
+ wtu.checkAreaInAndOut(gl, x1, y1, width, height, blue, black);
+ };
+
+ var program = wtu.setupSimpleColorProgram(gl);
+ wtu.setupQuad(gl, {scale: 0.5});
+
+ var w = gl.canvas.width;
+ var h = gl.canvas.height;
+
+ drawAndCheck(0, 0, w, h);
+ drawAndCheck(0, 0, w/2, h/4);
+ drawAndCheck(0, 0, w/4, h/2);
+ drawAndCheck(0, 0, w*2, h*2);
+
+ drawAndCheck(-w, 0, w, h);
+ drawAndCheck(0, -h, w, h);
+ drawAndCheck(w, 0, w, h);
+ drawAndCheck(0, h, w, h);
+
+ drawAndCheck(w/4, h/2, w, h);
+ drawAndCheck(w/4, h/2, w/2, h/4);
+ drawAndCheck(w/2, h/4, w/4, h/2);
+ drawAndCheck(w/2, h/4, w, h*2);
+
+ drawAndCheck(-w, 0, w*2, h);
+ drawAndCheck(0, -h/4, w/2, h);
+ drawAndCheck(-w/4, 0, w, h/2);
+ drawAndCheck(0, -h, w*2, h*2);
+
+ debug("");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+ }
+}
+
+debug("test antialias: false");
+test(document.getElementById("canvas1"), {antialias: false});
+
+debug("");
+debug("test antialias: true");
+test(document.getElementById("canvas2"), {antialias: true});
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/line-loop-tri-fan.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/line-loop-tri-fan.html
new file mode 100644
index 000000000..32a86f9b8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/line-loop-tri-fan.html
@@ -0,0 +1,253 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"></script>
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec2 pos;
+
+ void main()
+ {
+ gl_Position = vec4(pos, 0, 1);
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+
+ void main()
+ {
+ gl_FragColor = vec4(0, 1, 0, 1);
+ }
+ </script>
+
+ <script>
+ "use strict";
+ var wtu = WebGLTestUtils;
+
+ // Check a single 32-bit RGBA pixel.
+ function checkPixel(buf, index, correct) {
+ for (var i = 0; i < 4; ++i) {
+ if (buf[index + i] != correct[i]) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ // Check the line loop by reading the pixels and making sure just the edge
+ // pixels are green and the rest are black.
+ function checkLineLoop(gl, w) {
+ var buf = new Uint8Array(w * w * 4);
+ gl.readPixels(0, 0, w, w, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ var green = [0,255,0,255];
+ var black = [0,0,0,255];
+ var isCorrect = true;
+ for (var j = 0; j < w * w * 4; j += 4) {
+ var correct = black;
+ if (j < w * 4 || j > w * (w - 1) * 4 || j % (w * 4) == 0 || j % (w * 4) == (w - 1) * 4) {
+ correct = green;
+ }
+ // ignore corner pixels
+ if ((j == 0) || (j == 4*(w-1)) || (j == 4*w*(w-1)) || (j== 4*(w*w - 1))) {
+ continue;
+ }
+ if (!checkPixel(buf, j, correct)) {
+ isCorrect = false;
+ break;
+ }
+ }
+ if (isCorrect) {
+ testPassed("Line loop was drawn correctly.");
+ } else {
+ testFailed("Line loop was drawn incorrectly.");
+ }
+ }
+
+ // Check the tri fan by reading the pixels and making sure they are all green.
+ function checkTriFan(gl, w) {
+ var buf = new Uint8Array(w * w * 4);
+ gl.readPixels(0, 0, w, w, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ var filled = true;
+ for (var j = 0; j < w * w * 4; j += 4) {
+ if (!checkPixel(buf, j, [0,255,0,255])) {
+ filled = false;
+ break;
+ }
+ }
+ if (filled) {
+ testPassed("Triangle fan was drawn correctly.");
+ } else {
+ testFailed("Triangle fan was drawn incorrectly.");
+ }
+ }
+
+ function runTest()
+ {
+ var gl = wtu.create3DContext('testbed', { antialias: false });
+ if (!gl) {
+ testFailed('could not create context');
+ return;
+ }
+ gl.clearColor(0, 0, 0, 1);
+ var program = wtu.setupProgram(gl, ['vshader', 'fshader'], ['pos'])
+ var w = document.getElementById('testbed').width;
+
+ gl.enableVertexAttribArray(0);
+
+ //---------- LINE_LOOP----------
+ var d = 1/w;
+ var vertices = new Float32Array([-1+d, -1+d, 1-d, -1+d, 1-d, 1-d, -1+d, 1-d]);
+ var vertBuf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertBuf);
+ gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+ var indBuf = gl.createBuffer();
+ var indices = new Uint16Array([0, 1, 2, 3]);
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indBuf);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+
+ debug('Draw a square using a line loop and verify that it draws all four sides and nothing else.');
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.LINE_LOOP, 0, vertices.length / 2);
+ checkLineLoop(gl, w);
+
+ debug('Draw a square using an indexed line loop and verify that it draws all four sides and nothing else.');
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawElements(gl.LINE_LOOP, indices.length, gl.UNSIGNED_SHORT, 0);
+ checkLineLoop(gl, w);
+
+ vertices = new Float32Array([0, 0, 0, 0, 0, 0, -1+d, -1+d, 1-d, -1+d, 1-d, 1-d, -1+d, 1-d]);
+ vertBuf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertBuf);
+ gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+ indBuf = gl.createBuffer();
+ indices = new Uint16Array([0, 1, 2, 3, 4, 5, 6]);
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indBuf);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+
+ debug('Draw a square using a line loop with a vertex buffer offset and verify that it draws all four sides and nothing else.');
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.LINE_LOOP, 3, vertices.length / 2 - 3);
+ checkLineLoop(gl, w);
+
+ debug('Draw a square using an indexed line loop with an index buffer offset and verify that it draws all four sides and nothing else.');
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawElements(gl.LINE_LOOP, indices.length - 3, gl.UNSIGNED_SHORT, 3 * 2);
+ checkLineLoop(gl, w);
+
+ //---------- LINE_LOOP UBYTE ----------
+ var degenVerts = new Array(252 * 2);
+ for (var j = 0; j < 252 * 2; ++j) {
+ degenVerts[j] = -1+d;
+ }
+ degenVerts = degenVerts.concat([-1+d, -1+d, 1-d, -1+d, 1-d, 1-d, -1+d, 1-d]);
+ vertices = new Float32Array(degenVerts);
+ vertBuf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertBuf);
+ gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+ indBuf = gl.createBuffer();
+ var degenInd = new Array(252);
+ for (var j = 0; j < 252; ++j) {
+ degenInd[j] = j;
+ }
+ degenInd = degenInd.concat([252, 253, 254, 255]);
+ indices = new Uint8Array(degenInd);
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indBuf);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+
+ debug('Draw a square using an ubyte indexed line loop with 256 indices and verify that it draws all four sides and nothing else.');
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawElements(gl.LINE_LOOP, indices.length, gl.UNSIGNED_BYTE, 0);
+ checkLineLoop(gl, w);
+
+
+ //---------- TRIANGLE_FAN ----------
+ vertices = new Float32Array([0, 0, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1]);
+ vertBuf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertBuf);
+ gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+ indices = new Uint16Array([0,1,2,3,4,5]);
+ indBuf = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indBuf);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+
+ debug('Draw a filled square using a triangle fan and verify that it fills the entire canvas.');
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLE_FAN, 0, vertices.length / 2);
+ checkTriFan(gl, w);
+
+ debug('Draw a filled square using an indexed triangle fan and verify that it fills the entire canvas.');
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawElements(gl.TRIANGLE_FAN, indices.length, gl.UNSIGNED_SHORT, 0);
+ checkTriFan(gl, w);
+
+ vertices = new Float32Array([1, 1, 1, 1, 1, 1, 0, 0, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1]);
+ vertBuf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertBuf);
+ gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+ indices = new Uint16Array([0,1,2,3,4,5,6,7,8]);
+ indBuf = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indBuf);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+
+ debug('Draw a filled square using a triangle fan with a vertex buffer offset and verify that it fills the entire canvas.');
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLE_FAN, 3, vertices.length / 2 - 3);
+ checkTriFan(gl, w);
+
+ debug('Draw a filled square using an indexed triangle fan with an index buffer offset and verify that it fills the entire canvas.');
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawElements(gl.TRIANGLE_FAN, indices.length - 3, gl.UNSIGNED_SHORT, 3 * 2);
+ checkTriFan(gl, w);
+ }
+ </script>
+ </head>
+ <body>
+ <canvas id="testbed" width="10" height="10" style="width:50px; height:50px"></canvas>
+ <div id="description"></div>
+ <div id="console"></div>
+ <script>
+ "use strict";
+ description('Verify that LINE_LOOP and TRIANGLE_FAN works correctly.');
+ runTest();
+ var successfullyParsed = true;
+ </script>
+ <script src="../../resources/js-test-post.js"></script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/many-draw-calls.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/many-draw-calls.html
new file mode 100644
index 000000000..c1542f4fa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/many-draw-calls.html
@@ -0,0 +1,161 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<script id="vshader" type="x-shader/x-vertex">
+uniform mat4 transformMatrix;
+uniform vec3 positionOffset;
+attribute vec2 aPosition;
+void main() {
+ gl_Position = transformMatrix * vec4(aPosition, 0.0, 1.0) + vec4(positionOffset, 0.0);
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+void main() {
+ gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+}
+</script>
+<div id="description"></div>
+<canvas id="canvas" width="256" height="256"></canvas>
+<div id="console"></div>
+<script>
+"use strict";
+enableJSTestPreVerboseLogging();
+description("Test many draw calls and uniform updates per frame");
+
+debug('Regression test for Chromium <a href="http://crbug.com/320724">Issue 320724</a> and <a href="http://crbug.com/322726">Issue 322726</a>');
+debug('');
+
+var contextWasLost = false;
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById('canvas');
+var gl = wtu.create3DContext(canvas);
+canvas.addEventListener('webglcontextlost', function(event) { contextWasLost = true; }, false);
+var program = wtu.setupProgram(gl, ["vshader", "fshader"], [ "aPosition" ]);
+if (!program) {
+ testFailed("failed to create test program");
+}
+
+gl.useProgram(program);
+var vertexObject = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+gl.enableVertexAttribArray(0);
+
+// Initialize vertices
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ -1.0, 1.0,
+ 1.0, -1.0,
+ 1.0, 1.0,
+ -1.0, 1.0,
+ -1.0, -1.0,
+ 1.0, -1.0 ]), gl.STATIC_DRAW);
+gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+
+gl.clearColor(0.3, 0.3, 0.3, 1.0);
+
+// Initialize uniforms
+var transformLoc = gl.getUniformLocation(program, 'transformMatrix');
+var offsetLoc = gl.getUniformLocation(program, 'positionOffset');
+
+// This many draw calls appear to be necessary to trigger the original bug reliably.
+var tilesPerSide = 100;
+var numDrawsThisFrame = 0;
+
+var doNextDraw = function() {
+ // Sometimes, the original bug can't be caught cooperatively, and it
+ // causes the entire tab to hang irrevocably.
+ if (contextWasLost) {
+ testFailed("WebGL context was lost while running the test");
+ finishTest();
+ return;
+ }
+
+ var totalDraws = tilesPerSide * tilesPerSide;
+ if (numDrawsThisFrame >= totalDraws) {
+ testPassed("All draw calls completed successfully");
+ finishTest();
+ return;
+ }
+
+ numDrawsThisFrame += tilesPerSide;
+
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ var transformMatrix = new Float32Array(16);
+ transformMatrix[15] = 1.0;
+ var scaleFactor = 1.0 / tilesPerSide;
+ transformMatrix[0] = scaleFactor;
+ transformMatrix[5] = scaleFactor;
+ transformMatrix[10] = scaleFactor;
+
+ var offset = new Float32Array(3);
+
+ var drawsDoneThisFrame = 0;
+ for (var yy = 0; yy < tilesPerSide; ++yy) {
+ for (var xx = 0; xx < tilesPerSide; ++xx) {
+ if (drawsDoneThisFrame >= numDrawsThisFrame)
+ break;
+
+ gl.uniformMatrix4fv(transformLoc, false, transformMatrix);
+
+ offset[0] = 2.0 * ((0.5 + xx) / tilesPerSide) - 1.0;
+ offset[1] = 2.0 * ((0.5 + yy) / tilesPerSide) - 1.0;
+ gl.uniform3f(offsetLoc, offset[0], offset[1], offset[2]);
+
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ ++drawsDoneThisFrame;
+ }
+
+ if (drawsDoneThisFrame >= numDrawsThisFrame)
+ break;
+ }
+
+ var iterations = numDrawsThisFrame / tilesPerSide;
+ if (iterations % 10 === 0) {
+ // Needed to avoid test timeout within the harness on some slower platforms
+ testPassed("Completed " + iterations + " iterations");
+ }
+
+ wtu.requestAnimFrame(doNextDraw);
+}
+
+wtu.requestAnimFrame(doNextDraw);
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/more-than-65536-indices.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/more-than-65536-indices.html
new file mode 100644
index 000000000..683efba5d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/more-than-65536-indices.html
@@ -0,0 +1,147 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL More than 65536 indices.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="1" height="1" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vs" type="text/something-not-javascript">
+attribute vec4 vPosition;
+attribute vec4 vColor;
+varying vec4 color;
+void main() {
+ gl_Position = vPosition;
+ gl_PointSize = 1.0;
+ color = vColor;
+}
+</script>
+<script id="fs" type="text/something-not-javascript">
+precision mediump float;
+varying vec4 color;
+void main() {
+ gl_FragColor = color;
+}
+</script>
+<script>
+"use strict";
+description("checks that rendering with more than 65536 indices works.");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupProgram(gl, ["vs", "fs"], ["vPosition", "vColor"]);
+var bufferObjects = wtu.setupUnitQuad(gl, 0, 1);
+
+gl.bindBuffer(gl.ARRAY_BUFFER, bufferObjects[0]);
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ -1, 1,
+ 1, 1,
+ -1, -1,
+ 1, -1,
+ -1, 1,
+ 1, 1,
+ -1, -1,
+ 1, -1]), gl.STATIC_DRAW);
+gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+gl.bindBuffer(gl.ARRAY_BUFFER, bufferObjects[1]);
+gl.bufferData(gl.ARRAY_BUFFER, new Uint8Array([
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 255, 0, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255]), gl.STATIC_DRAW);
+gl.vertexAttribPointer(1, 4, gl.UNSIGNED_BYTE, true, 0, 0);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after program setup");
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after creating texture");
+var numQuads = Math.floor(65536 / 6) + 4;
+var numPoints = numQuads * 6;
+debug("numQuads: " + numQuads);
+debug("numPoints: " + numPoints);
+var indexBuf = new ArrayBuffer(numPoints);
+var indices = new Uint8Array(indexBuf);
+var indexBuffer = gl.createBuffer();
+gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after setting up indices");
+
+var modes = [
+ {mode: 'POINTS', offsets: [0, 1, 2, 3, 2, 1], skip: 0},
+ {mode: 'LINES', offsets: [0, 1, 2, 3, 2, 1], skip: 0},
+ {mode: 'LINE_LOOP', offsets: [0, 1, 2, 3, 2, 1], skip: 1},
+ {mode: 'LINE_STRIP', offsets: [0, 1, 2, 3, 2, 1], skip: 0},
+ {mode: 'TRIANGLES', offsets: [0, 1, 2, 3, 2, 1], skip: 0},
+ {mode: 'TRIANGLE_STRIP', offsets: [0, 1, 2, 3, 2, 1], skip: 0},
+ {mode: 'TRIANGLE_FAN', offsets: [0, 1, 3, 2, 2, 1], skip: 1}
+];
+
+for (var mm = 0; mm < modes.length; ++mm) {
+ var modeInfo = modes[mm];
+ var mode = modeInfo.mode;
+ var offsets = modeInfo.offsets;
+ var skip = modeInfo.skip;
+
+ for (var ii = 0; ii < numQuads; ++ii) {
+ var offset = ii * 6;
+ var quad = (ii == 0 || ii == (numQuads - 1)) ? 4 : 0;
+ for (var jj = 0; jj < 6; ++jj) {
+ indices[offset + jj] = quad + offsets[jj];
+ }
+ }
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+
+ debug("");
+ debug("testing: " + mode);
+ // Draw without last 6 points.
+ gl.drawElements(gl[mode], numPoints - (skip + 1) * 6, gl.UNSIGNED_BYTE, skip * 6);
+ wtu.checkCanvas(gl, [255, 0, 0, 255], "Should be red.");
+ // Draw with last 6 points.
+ gl.drawElements(gl[mode], numPoints, gl.UNSIGNED_BYTE, 0);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "Should be green.");
+}
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after drawing");
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/multisample-corruption.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/multisample-corruption.html
new file mode 100644
index 000000000..f6da01dd9
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/multisample-corruption.html
@@ -0,0 +1,62 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>WebGL Multisample Renderbuffer Corruption Test</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+ <script src="../resources/iterable-test.js"> </script>
+</head>
+<body>
+<canvas id="example" width="2048" height="2048" style="width: 128px; height: 128px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+ <script>
+ "use strict";
+
+ enableJSTestPreVerboseLogging();
+ description(document.title);
+ debug('Regression test for <a href="https://code.google.com/p/chromium/issues/detail?id=137303">Chromium bug 137303</a>');
+
+ var wtu = WebGLTestUtils;
+
+ var gl = wtu.create3DContext("example", {antialias: true, preserveDrawingBuffer: true});
+ var test = IterableTest.createMultisampleCorruptionTest(gl);
+ var iterations = parseInt(wtu.getUrlOptions().iterations, 10) || 25;
+ IterableTest.run(test, iterations);
+
+ var successfullyParsed = true;
+ </script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/negative-one-index.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/negative-one-index.html
new file mode 100644
index 000000000..f619aa4f7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/negative-one-index.html
@@ -0,0 +1,114 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>-1 Index Rendering Test</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ void main()
+ {
+ gl_FragColor = vec4(0.0,1.0,0.0,1.0);
+ }
+ </script>
+
+ <script>
+ "use strict";
+ function init()
+ {
+ description(document.title);
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ var vertexData = new Float32Array(65536 * 3);
+ vertexData[0 * 3 + 0] = 0.0;
+ vertexData[0 * 3 + 1] = 0.5;
+ vertexData[0 * 3 + 2] = 0.0;
+ vertexData[1 * 3 + 0] = -0.5;
+ vertexData[1 * 3 + 1] = -0.5;
+ vertexData[1 * 3 + 2] = 0.0;
+ vertexData[65535 * 3 + 0] = 0.5;
+ vertexData[65535 * 3 + 1] = -0.5;
+ vertexData[65535 * 3 + 2] = 0.0;
+ gl.bufferData(gl.ARRAY_BUFFER, vertexData, gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ var indices = new Uint16Array([0, 1, -1]);
+ var indexBuffer = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0);
+
+ // This should render a green triangle in the middle of the canvas.
+ // Some implementations may incorrectly interpret the -1 index as
+ // a primitive restart and not render anything.
+
+ // Test several locations
+ // First line should be all black
+ wtu.checkCanvasRect(gl, 0, 0, 50, 1, [0, 0, 0, 0]);
+
+ // Line 15 should be green for at least 10 red pixels starting 20 pixels in
+ wtu.checkCanvasRect(gl, 20, 15, 10, 1, [0, 255, 0, 255]);
+
+ // Last line should be all black
+ wtu.checkCanvasRect(gl, 0, 49, 50, 1, [0, 0, 0, 0]);
+ }
+
+ init();
+ var successfullyParsed = true;
+ </script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html
new file mode 100644
index 000000000..e813e0220
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html
@@ -0,0 +1,79 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script id="vshader" type="x-shader/x-vertex">
+ void main()
+ {
+ gl_PointSize = 1.0;
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+ }
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+
+ void main()
+ {
+ gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+ }
+</script>
+</head>
+<body>
+<canvas id="testbed" width="1" height="1" style="width: 100px; height: 100px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+ "use strict";
+ description('Verify that drawing a point without enabling any attributes succeeds');
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext('testbed');
+
+ var program1 = wtu.setupProgram(gl, ['vshader', 'fshader']);
+
+ debug('Draw a point with a shader that takes no attributes and verify it fills the whole canvas.');
+
+ gl.drawArrays(gl.POINTS, 0, 1);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ wtu.checkCanvas(gl, [0, 255, 0, 255]);
+
+ var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/point-size.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/point-size.html
new file mode 100644
index 000000000..dd5cbba78
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/point-size.html
@@ -0,0 +1,153 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script id="vshader" type="x-shader/x-vertex">
+ attribute vec3 pos;
+ attribute vec4 colorIn;
+ uniform float pointSize;
+ varying vec4 color;
+
+ void main()
+ {
+ gl_PointSize = pointSize;
+ color = colorIn;
+ gl_Position = vec4(pos, 1.0);
+ }
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+ varying vec4 color;
+
+ void main()
+ {
+ gl_FragColor = color;
+ }
+</script>
+</head>
+<body>
+<canvas id="testbed" width="2" height="2"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+ "use strict";
+ description('Verify GL_VERTEX_PROGRAM_POINT_SIZE is enabled in WebGL');
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext('testbed', { antialias: false });
+ shouldBeNonNull("gl");
+
+ gl.disable(gl.BLEND);
+
+ // The choice of (0.4, 0.4) ensures that the centers of the surrounding
+ // pixels are not contained within the point when it is of size 1, but
+ // that they definitely are when it is of size 2.
+ var vertices = new Float32Array([
+ 0.4, 0.4, 0.0]);
+ var colors = new Uint8Array([
+ 255, 0, 0, 255]);
+
+ var colorOffset = vertices.byteLength;
+
+ var buf = new Uint8Array(2 * 2 * 4);
+ var index = 0;
+
+ var vbo = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ gl.bufferData(gl.ARRAY_BUFFER, colorOffset + colors.byteLength, gl.STATIC_DRAW);
+ gl.bufferSubData(gl.ARRAY_BUFFER, 0, vertices);
+ gl.bufferSubData(gl.ARRAY_BUFFER, colorOffset, colors);
+
+ function test(program) {
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(1, 4, gl.UNSIGNED_BYTE, true, 0, colorOffset);
+ gl.enableVertexAttribArray(1);
+
+ var locPointSize = gl.getUniformLocation(program, 'pointSize');
+
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+
+ debug('Draw a point of size 1 and verify it does not touch any other pixels.');
+
+ gl.uniform1f(locPointSize, 1.0);
+ gl.drawArrays(gl.POINTS, 0, vertices.length / 3);
+
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+
+ for (var y = 0; y < 2; ++y) {
+ for (var x = 0; x < 2; ++x) {
+ var correctColor = (x == 1 && y == 1) ? [255, 0, 0] : [0, 0, 0];
+ wtu.checkCanvasRect(gl, x, y, 1, 1, correctColor);
+ }
+ }
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ debug('Draw a point of size 2 and verify it fills the appropriate region.');
+
+ var pointSizeRange = gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE);
+ if (pointSizeRange[1] >= 2.0) {
+ gl.uniform1f(locPointSize, 2.0);
+ gl.drawArrays(gl.POINTS, 0, vertices.length / 3);
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+ wtu.checkCanvasRect(gl, 0, 0, 2, 2, [255, 0, 0]);
+ }
+ }
+
+ debug('');
+ debug('Pass 1');
+ var program1 = wtu.setupProgram(gl, ['vshader', 'fshader'], ['pos', 'colorIn']);
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+ test(program1);
+
+ // Under some versions of ANGLE point sprite shader programs were
+ // incorrectly reloaded from cache. Rebuilding the shader program and
+ // repeating the test simulates the conditions that caused it to fail
+ debug('');
+ debug('Pass 2');
+ var program2 = wtu.setupProgram(gl, ['vshader', 'fshader'], ['pos', 'colorIn']);
+ shouldBe('gl.getError()', 'gl.NO_ERROR');
+ test(program2);
+
+ var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/point-with-gl-pointcoord-in-fragment-shader.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/point-with-gl-pointcoord-in-fragment-shader.html
new file mode 100644
index 000000000..4e7a97afd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/point-with-gl-pointcoord-in-fragment-shader.html
@@ -0,0 +1,142 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Point with gl_PointCoord in Fragment Shader Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" width="64" height="64"> </canvas>
+<div id="console"></div>
+<script id="vs" type="x-shader/x-vertex">
+varying vec4 v_color;
+
+// The X and Y coordinates of the center of the point.
+attribute vec2 a_vertex;
+
+uniform float u_pointSize;
+
+void main(void) {
+ gl_PointSize = u_pointSize;
+ gl_Position = vec4(a_vertex, 0.0, 1.0);
+
+ // The color of the point.
+ v_color = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+</script>
+<script id="fs" type="x-shader/x-fragment">
+precision mediump float;
+
+varying vec4 v_color;
+
+void main(void) {
+ // It seems as long as this mathematical expression references
+ // gl_PointCoord, the fragment's color is incorrect.
+ vec2 diff = gl_PointCoord - vec2(.5, .5);
+ if (length(diff) > 0.5)
+ discard;
+
+ // The point should be a solid color.
+ gl_FragColor = v_color;
+}
+</script>
+<script>
+"use strict";
+// Radar 13239314
+description("This is a regression test for a graphics driver bug affecting end caps on roads in MapsGL.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var canvasWidth = canvas.width;
+var canvasHeight = canvas.height;
+var output = document.getElementById("console");
+var gl = wtu.create3DContext(canvas);
+
+function runTest() {
+ var pointSizeRange = gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE);
+ // This test can't really run without a maximum point size of at least 2
+ if (pointSizeRange[1] < 2.0) {
+ debug("This test needs a maximum ALIASED_POINT_SIZE_RANGE of at least 2");
+ return;
+ }
+
+ var vs = wtu.loadShaderFromScript(gl, "vs", gl.VERTEX_SHADER);
+ var fs = wtu.loadShaderFromScript(gl, "fs", gl.FRAGMENT_SHADER);
+ if (!vs || !fs) {
+ testFailed("Loading shaders failed");
+ return;
+ }
+
+ var program = wtu.setupProgram(gl, [vs, fs], ['a_vertex']);
+ if (!program) {
+ testFailed("Loading program failed");
+ return;
+ }
+
+ gl.useProgram(program);
+ gl.clearColor(0, 0, 0, 1.0);
+ gl.disable(gl.DEPTH_TEST);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ // uniform float u_pointSize;
+ var uni = gl.getUniformLocation(program, 'u_pointSize');
+ gl.uniform1f(uni, Math.min(20.0, pointSizeRange[1]));
+
+ // vertex
+ var buffer = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
+ var vertexData = new Float32Array([
+ 0, 0,
+ ]);
+ gl.bufferData(gl.ARRAY_BUFFER, vertexData, gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
+
+ gl.drawArrays(gl.POINTS, 0, 1);
+ wtu.checkCanvasRect(gl, canvasWidth / 2, canvasHeight / 2, 1, 1,
+ [0, 255, 0, 255], "Center pixel should be green", 2);
+}
+
+runTest();
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/polygon-offset.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/polygon-offset.html
new file mode 100644
index 000000000..8c15384ec
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/polygon-offset.html
@@ -0,0 +1,193 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"></script>
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec3 pos;
+
+ void main()
+ {
+ gl_Position = vec4(pos, 1);
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+ uniform vec4 col;
+
+ void main()
+ {
+ gl_FragColor = col;
+ }
+ </script>
+
+ <script>
+ "use strict";
+ var wtu = WebGLTestUtils;
+
+ function draw(gl, arr, colLoc, col)
+ {
+ var vertices = new Float32Array(arr);
+ var vertBuf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertBuf);
+ gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+ gl.uniform4fv(colLoc, col);
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, vertices.length / 3);
+ }
+
+ function clear(gl, col, z)
+ {
+ gl.clearColor(col[0], col[1], col[2], col[3]);
+ gl.clearDepth(z);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ }
+
+ function check(gl)
+ {
+ wtu.checkCanvasRect(gl, 0, 0, 16, 16, [0, 255, 0, 255], 'result should be green');
+ }
+
+ function runTest()
+ {
+ var flatSquare = [-1, -1, 0,
+ -1, 1, 0,
+ 1, -1, 0,
+ 1, 1, 0];
+ var slantedSquare = [-1, -1, -0.5,
+ -1, 1, -0.5,
+ 1, -1, 0.5,
+ 1, 1, 0.5];
+ var red = [1, 0, 0, 1];
+ var green = [0, 1, 0, 1];
+ var blue = [0, 0, 1, 1];
+
+ var gl = wtu.create3DContext('testbed', { antialias: false });
+ if (!gl)
+ {
+ testFailed('could not create context');
+ return;
+ }
+ var program = wtu.setupProgram(gl, ['vshader', 'fshader'], ['pos']);
+ var colLoc = gl.getUniformLocation(program, 'col');
+
+ gl.enableVertexAttribArray(0);
+
+ gl.enable(gl.DEPTH_TEST);
+ gl.depthFunc(gl.LEQUAL);
+
+ debug('Polygon offset fill should be off by default');
+ clear(gl, red, 1.0);
+ draw(gl, slantedSquare, colLoc, blue);
+ draw(gl, slantedSquare, colLoc, green);
+ check(gl);
+
+ debug('Polygon offset units should have no effect when fill is off');
+ clear(gl, red, 1.0);
+ draw(gl, slantedSquare, colLoc, blue);
+ gl.polygonOffset(0, 10);
+ draw(gl, slantedSquare, colLoc, green);
+ check(gl);
+
+ debug('Polygon offset factor should have no effect when fill is off');
+ clear(gl, red, 1.0);
+ gl.polygonOffset(0, 0);
+ draw(gl, slantedSquare, colLoc, blue);
+ gl.polygonOffset(1.0, 0);
+ draw(gl, slantedSquare, colLoc, green);
+ check(gl);
+
+ debug('Zero polygon offset units and factor should have no effect');
+ clear(gl, red, 1.0);
+ gl.enable(gl.POLYGON_OFFSET_FILL);
+ gl.polygonOffset(0, 0);
+ draw(gl, slantedSquare, colLoc, blue);
+ draw(gl, slantedSquare, colLoc, green);
+ check(gl);
+
+ // It appears to be VERY common for drivers to implement the units offset in
+ // floating-point arithmetic, which results in rount-to-nearest-even to cause
+ // an offset of 1 to sometimes not alter the order between these polygons.
+ debug('Polygon offset units of 2 should alter order of flat polygons');
+ clear(gl, red, 1.0);
+ draw(gl, flatSquare, colLoc, green);
+ gl.polygonOffset(0, 2);
+ draw(gl, flatSquare, colLoc, blue);
+ check(gl);
+
+ debug('Polygon offset factor of 0.1 should alter order of slanted polygons');
+ clear(gl, red, 1.0);
+ draw(gl, slantedSquare, colLoc, green);
+ gl.polygonOffset(0.1, 0);
+ draw(gl, slantedSquare, colLoc, blue);
+ check(gl);
+
+ debug('Polygon offset factor of 0.1 should not alter order of flat polygons');
+ clear(gl, red, 1.0);
+ draw(gl, flatSquare, colLoc, blue);
+ gl.polygonOffset(0.1, 0);
+ draw(gl, flatSquare, colLoc, green);
+ check(gl);
+
+ debug('Disabling polygon offset fill should leave order unaffected');
+ clear(gl, red, 1.0);
+ gl.polygonOffset(0.1, 1);
+ gl.disable(gl.POLYGON_OFFSET_FILL);
+ draw(gl, slantedSquare, colLoc, blue);
+ draw(gl, slantedSquare, colLoc, green);
+ check(gl);
+
+ debug('Enabling polygon offset fill should affect order again');
+ clear(gl, red, 1.0);
+ draw(gl, slantedSquare, colLoc, green);
+ gl.enable(gl.POLYGON_OFFSET_FILL);
+ draw(gl, slantedSquare, colLoc, blue);
+ check(gl);
+ }
+ </script>
+ </head>
+ <body>
+ <canvas id="testbed" width="16" height="16" style="width:50px; height:50px"></canvas>
+ <div id="description"></div>
+ <div id="console"></div>
+ <script>
+ "use strict";
+ description('Verify that polygon offset works');
+ runTest();
+ var successfullyParsed = true;
+ </script>
+ <script src="../../resources/js-test-post.js"></script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/simple.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/simple.html
new file mode 100644
index 000000000..1b705224c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/simple.html
@@ -0,0 +1,100 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and /or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>Simple Rendering Test</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+There is supposed to be an example drawing here, but it's not important.
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 a_Position;
+void main()
+{
+ gl_Position = a_Position;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+void main()
+{
+ gl_FragColor = vec4(0,1,0,1);
+}
+</script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+function init()
+{
+ description();
+
+ var gl = wtu.create3DContext("example");
+ var program = wtu.loadProgramFromScript(gl, "vshader", "fshader");
+ gl.useProgram(program);
+ var loc = gl.getAttribLocation(program, "a_Position");
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(
+ gl.ARRAY_BUFFER,
+ new Float32Array(
+ [ 1, 1,
+ -1, 1,
+ -1, -1,
+ 1, 1,
+ -1, -1,
+ 1, -1]),
+ gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(loc);
+ gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0);
+
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ wtu.checkCanvas(gl, [0,0,0,0], "should be black", 0);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.checkCanvas(gl, [0,255,0,255], "should be green", 0);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+}
+
+init();
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/triangle.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/triangle.html
new file mode 100644
index 000000000..7fa99f0f8
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/rendering/triangle.html
@@ -0,0 +1,96 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>Rendering Test</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+There is supposed to be an example drawing here, but it's not important.
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ void main()
+ {
+ gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+ }
+ </script>
+
+ <script>
+ "use strict";
+ function init()
+ {
+ description(document.title);
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+
+ // Test several locations
+ // First line should be all black
+ wtu.checkCanvasRect(gl, 0, 0, 50, 1, [0, 0, 0, 0]);
+
+ // Line 15 should be red for at least 10 red pixels starting 20 pixels in
+ wtu.checkCanvasRect(gl, 20, 15, 10, 1, [255, 0, 0, 255]);
+
+ // Last line should be all black
+ wtu.checkCanvasRect(gl, 0, 49, 50, 1, [0, 0, 0, 0]);
+ }
+
+ init();
+ var successfullyParsed = true;
+ </script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/1-channel.jpg b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/1-channel.jpg
new file mode 100644
index 000000000..2b16f42ab
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/1-channel.jpg
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/3x3.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/3x3.png
new file mode 100644
index 000000000..6cf1e7447
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/3x3.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/blue-1x1.jpg b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/blue-1x1.jpg
new file mode 100644
index 000000000..a70bbb021
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/blue-1x1.jpg
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/boolUniformShader.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/boolUniformShader.vert
new file mode 100644
index 000000000..9226b3b5c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/boolUniformShader.vert
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2009 The Chromium Authors. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+uniform bool bval;
+uniform bvec2 bval2;
+uniform bvec3 bval3;
+uniform bvec4 bval4;
+
+void main()
+{
+ bool allSet = bval
+ && bval2[0] && bval2[1]
+ && bval3[0] && bval3[1] && bval3[2]
+ && bval4[0] && bval4[1] && bval4[2] && bval4[3];
+ gl_Position = vec4((allSet ? 1.0 : -1.0), 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/bug-32888-texture.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/bug-32888-texture.png
new file mode 100644
index 000000000..e78cfe799
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/bug-32888-texture.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/floatUniformShader.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/floatUniformShader.vert
new file mode 100644
index 000000000..58991b474
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/floatUniformShader.vert
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2009 The Chromium Authors. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+uniform float fval;
+uniform vec2 fval2;
+uniform vec3 fval3;
+uniform vec4 fval4;
+
+void main()
+{
+ float sum = fval
+ + fval2[0] + fval2[1]
+ + fval3[0] + fval3[1] + fval3[2]
+ + fval4[0] + fval4[1] + fval4[2] + fval4[3];
+ gl_Position = vec4(sum, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/fragmentShader.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/fragmentShader.frag
new file mode 100644
index 000000000..08596ed5d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/fragmentShader.frag
@@ -0,0 +1,32 @@
+/*
+Copyright (C) 2009 Apple Computer, Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. AS IS AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+// Workaround for non-compliant WebGL implementations (FIXME)
+varying mediump vec3 v_normal;
+
+void main()
+{
+ gl_FragColor = vec4(v_normal/2.0+vec3(0.5), 1);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-conformance-test.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-conformance-test.js
new file mode 100644
index 000000000..b259a946d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-conformance-test.js
@@ -0,0 +1,384 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+GLSLConformanceTester = (function(){
+
+var wtu = WebGLTestUtils;
+var defaultVertexShader = [
+ "attribute vec4 vPosition;",
+ "void main()",
+ "{",
+ " gl_Position = vPosition;",
+ "}"
+].join('\n');
+
+var defaultFragmentShader = [
+ "precision mediump float;",
+ "void main()",
+ "{",
+ " gl_FragColor = vec4(1.0,0.0,0.0,1.0);",
+ "}"
+].join('\n');
+
+function log(msg) {
+ if (window.console && window.console.log) {
+ window.console.log(msg);
+ }
+}
+
+var vShaderDB = {};
+var fShaderDB = {};
+
+/**
+ * vShaderSource: the source code for vertex shader
+ * vShaderSuccess: true if vertex shader compilation should
+ * succeed.
+ * fShaderSource: the source code for fragment shader
+ * fShaderSuccess: true if fragment shader compilation should
+ * succeed.
+ * linkSuccess: true of link should succeed
+ * passMsg: msg to describe success condition.
+ * render: if true render to unit quad. Green = success
+ *
+ */
+function runOneTest(gl, info) {
+ var passMsg = info.passMsg
+ debug("");
+ debug("test: " + passMsg);
+
+ var consoleDiv = document.getElementById("console");
+
+ if (info.vShaderSource === undefined) {
+ if (info.vShaderId) {
+ info.vShaderSource = document.getElementById(info.vShaderId).text;
+ } else {
+ info.vShader = 'defaultVertexShader';
+ info.vShaderSource = defaultVertexShader;
+ }
+ }
+ if (info.fShaderSource === undefined) {
+ if (info.fShaderId) {
+ info.fShaderSource = document.getElementById(info.fShaderId).text;
+ } else {
+ info.fShader = 'defaultFragmentShader';
+ info.fShaderSource = defaultFragmentShader;
+ }
+ }
+
+ var vLabel = (info.vShaderSource == defaultVertexShader ? "default" : "test") + " vertex shader";
+ var fLabel = (info.fShaderSource == defaultFragmentShader ? "default" : "test") + " fragment shader";
+
+ var vSource = info.vShaderPrep ? info.vShaderPrep(info.vShaderSource) :
+ info.vShaderSource;
+
+ wtu.addShaderSource(consoleDiv, vLabel, vSource);
+
+ // Reuse identical shaders so we test shared shader.
+ var vShader = vShaderDB[vSource];
+ if (!vShader) {
+ vShader = wtu.loadShader(gl, vSource, gl.VERTEX_SHADER);
+ if (info.vShaderTest) {
+ if (!info.vShaderTest(vShader)) {
+ testFailed("[vertex shader test] " + passMsg);
+ return;
+ }
+ }
+ // As per GLSL 1.0.17 10.27 we can only check for success on
+ // compileShader, not failure.
+ if (!info.ignoreResults && info.vShaderSuccess && !vShader) {
+ testFailed("[unexpected vertex shader compile status] (expected: " +
+ info.vShaderSuccess + ") " + passMsg);
+ }
+ // Save the shaders so we test shared shader.
+ if (vShader) {
+ vShaderDB[vSource] = vShader;
+ }
+ }
+
+ var debugShaders = gl.getExtension('WEBGL_debug_shaders');
+ if (debugShaders && vShader) {
+ wtu.addShaderSource(consoleDiv, vLabel + " translated for driver",
+ debugShaders.getTranslatedShaderSource(vShader));
+ }
+
+ var fSource = info.fShaderPrep ? info.fShaderPrep(info.fShaderSource) :
+ info.fShaderSource;
+
+ wtu.addShaderSource(consoleDiv, fLabel, fSource);
+
+ // Reuse identical shaders so we test shared shader.
+ var fShader = fShaderDB[fSource];
+ if (!fShader) {
+ fShader = wtu.loadShader(gl, fSource, gl.FRAGMENT_SHADER);
+ if (info.fShaderTest) {
+ if (!info.fShaderTest(fShader)) {
+ testFailed("[fragment shader test] " + passMsg);
+ return;
+ }
+ }
+ //debug(fShader == null ? "fail" : "succeed");
+ // As per GLSL 1.0.17 10.27 we can only check for success on
+ // compileShader, not failure.
+ if (!info.ignoreResults && info.fShaderSuccess && !fShader) {
+ testFailed("[unexpected fragment shader compile status] (expected: " +
+ info.fShaderSuccess + ") " + passMsg);
+ return;
+ }
+
+ // Safe the shaders so we test shared shader.
+ if (fShader) {
+ fShaderDB[fSource] = fShader;
+ }
+ }
+
+ if (debugShaders && fShader) {
+ wtu.addShaderSource(consoleDiv, fLabel + " translated for driver",
+ debugShaders.getTranslatedShaderSource(fShader));
+ }
+
+ if (vShader && fShader) {
+ var program = gl.createProgram();
+ gl.attachShader(program, vShader);
+ gl.attachShader(program, fShader);
+
+ if (vSource.indexOf("vPosition") >= 0) {
+ gl.bindAttribLocation(program, 0, "vPosition");
+ }
+ if (vSource.indexOf("texCoord0") >= 0) {
+ gl.bindAttribLocation(program, 1, "texCoord0");
+ }
+ gl.linkProgram(program);
+ var linked = (gl.getProgramParameter(program, gl.LINK_STATUS) != 0);
+ if (!linked) {
+ var error = gl.getProgramInfoLog(program);
+ log("*** Error linking program '"+program+"':"+error);
+ }
+ if (!info.ignoreResults && linked != info.linkSuccess) {
+ testFailed("[unexpected link status] " + passMsg);
+ return;
+ }
+ } else {
+ if (!info.ignoreResults && info.linkSuccess) {
+ testFailed("[link failed] " + passMsg);
+ return;
+ }
+ }
+
+ if (parseInt(wtu.getUrlOptions().dumpShaders)) {
+ var vInfo = {
+ shader: vShader,
+ shaderSuccess: info.vShaderSuccess,
+ label: vLabel,
+ source: vSource
+ };
+ var fInfo = {
+ shader: fShader,
+ shaderSuccess: info.fShaderSuccess,
+ label: fLabel,
+ source: fSource
+ };
+ wtu.dumpShadersInfo(gl, window.location.pathname, passMsg, vInfo, fInfo);
+ }
+
+ if (!info.render) {
+ testPassed(passMsg);
+ return;
+ }
+
+ gl.useProgram(program);
+ wtu.setupUnitQuad(gl);
+ wtu.clearAndDrawUnitQuad(gl);
+
+ var div = document.createElement("div");
+ div.className = "testimages";
+ wtu.insertImage(div, "result", wtu.makeImageFromCanvas(gl.canvas));
+ div.appendChild(document.createElement('br'));
+ consoleDiv.appendChild(div);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green", 0);
+}
+
+function runTests(shaderInfos) {
+ var wtu = WebGLTestUtils;
+ var canvas = document.createElement('canvas');
+ canvas.width = 32;
+ canvas.height = 32;
+ var gl = wtu.create3DContext(canvas);
+ if (!gl) {
+ testFailed("context does not exist");
+ finishTest();
+ return;
+ }
+
+ var testIndex = 0;
+ var runNextTest = function() {
+ if (testIndex == shaderInfos.length) {
+ finishTest();
+ return;
+ }
+
+ runOneTest(gl, shaderInfos[testIndex++]);
+ setTimeout(runNextTest, 1);
+ }
+ runNextTest();
+};
+
+function loadExternalShaders(filename, passMsg) {
+ var shaderInfos = [];
+ var lines = wtu.readFileList(filename);
+ for (var ii = 0; ii < lines.length; ++ii) {
+ var info = {
+ vShaderSource: defaultVertexShader,
+ vShaderSuccess: true,
+ fShaderSource: defaultFragmentShader,
+ fShaderSuccess: true,
+ linkSuccess: true,
+ };
+
+ var line = lines[ii];
+ var files = line.split(/ +/);
+ var passMsg = "";
+ for (var jj = 0; jj < files.length; ++jj) {
+ var file = files[jj];
+ var shaderSource = wtu.readFile(file);
+ var firstLine = shaderSource.split("\n")[0];
+ var success = undefined;
+ if (firstLine.indexOf("fail") >= 0) {
+ success = false;
+ } else if (firstLine.indexOf("succeed") >= 0) {
+ success = true;
+ }
+ if (success === undefined) {
+ testFailed("bad first line in " + file + ":" + firstLine);
+ continue;
+ }
+ if (!wtu.startsWith(firstLine, "// ")) {
+ testFailed("bad first line in " + file + ":" + firstLine);
+ continue;
+ }
+ passMsg = passMsg + (passMsg.length ? ", " : "") + firstLine.substr(3);
+ if (wtu.endsWith(file, ".vert")) {
+ info.vShaderSource = shaderSource;
+ info.vShaderSuccess = success;
+ } else if (wtu.endsWith(file, ".frag")) {
+ info.fShaderSource = shaderSource;
+ info.fShaderSuccess = success;
+ }
+ }
+ info.linkSuccess = info.vShaderSuccess && info.fShaderSuccess;
+ info.passMsg = passMsg;
+ shaderInfos.push(info);
+ }
+ return shaderInfos;
+}
+
+function getSource(elem) {
+ var str = elem.text;
+ return str.replace(/^\s*/, '').replace(/\s*$/, '');
+}
+
+function getPassMessage(source) {
+ var lines = source.split('\n');
+ return lines[0].substring(3);
+}
+
+function getSuccess(msg) {
+ if (msg.indexOf("fail") >= 0) {
+ return false;
+ }
+ if (msg.indexOf("succeed") >= 0) {
+ return true;
+ }
+ testFailed("bad test description. Must have 'fail' or 'succeed'");
+}
+
+function setupTest() {
+ var vShaderElem = document.getElementById('vertexShader');
+ var vShaderSource = defaultVertexShader;
+ var vShaderSuccess = true;
+
+ var fShaderElem = document.getElementById('fragmentShader');
+ var fShaderSource = defaultFragmentShader;
+ var fShaderSuccess = true;
+
+ var passMsg = undefined;
+
+ if (vShaderElem) {
+ vShaderSource = getSource(vShaderElem);
+ passMsg = getPassMessage(vShaderSource);
+ vShaderSuccess = getSuccess(passMsg);
+ }
+
+ if (fShaderElem) {
+ fShaderSource = getSource(fShaderElem);
+ passMsg = getPassMessage(fShaderSource);
+ fShaderSuccess = getSuccess(passMsg);
+ }
+
+ var linkSuccess = vShaderSuccess && fShaderSuccess;
+
+ if (passMsg === undefined) {
+ testFailed("no test shader found.");
+ finishTest();
+ return;
+ }
+
+ var info = {
+ vShaderSource: vShaderSource,
+ vShaderSuccess: vShaderSuccess,
+ fShaderSource: fShaderSource,
+ fShaderSuccess: fShaderSuccess,
+ linkSuccess: linkSuccess,
+ passMsg: passMsg
+ };
+
+ return info;
+}
+
+function runTest() {
+ var info = setupTest();
+ description(info.passMsg);
+ runTests([info]);
+}
+
+function runRenderTests(tests) {
+ for (var ii = 0; ii < tests.length; ++ii) {
+ tests[ii].render = true
+ }
+ runTests(tests);
+}
+
+function runRenderTest() {
+ var info = setupTest();
+ description(info.passMsg);
+ runRenderTests([info]);
+}
+
+return {
+ runTest: runTest,
+ runTests: runTests,
+ runRenderTest: runRenderTest,
+ runRenderTests: runRenderTests,
+ loadExternalShaders: loadExternalShaders,
+
+ none: false,
+};
+}());
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-constructor-tests-generator.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-constructor-tests-generator.js
new file mode 100644
index 000000000..258ebdf84
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-constructor-tests-generator.js
@@ -0,0 +1,938 @@
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+
+var GLSLConstructorTestsGenerator = (function() {
+
+var wtu = WebGLTestUtils;
+
+// Shader code templates
+var constructorVertexTemplate = [
+ "attribute vec4 vPosition;",
+
+ "precision mediump int;",
+ "precision mediump float;",
+
+ // Colors used to signal correctness of component values comparison
+ "const vec4 green = vec4(0.0, 1.0, 0.0, 1.0);",
+ "const vec4 red = vec4(1.0, 0.0, 0.0, 1.0);",
+
+ // Error bound used in comparison of floating point values
+ "$(errorBound)",
+
+ "varying vec4 vColor;",
+
+ "void main() {",
+ " $(argsList)",
+
+ " $(type) v = $(type)($(argsConstr));",
+
+ " if ($(checkCompVals))",
+ " vColor = green;",
+ " else",
+ " vColor = red;",
+
+ " gl_Position = vPosition;",
+ "}"
+].join("\n");
+
+
+var passThroughColorFragmentShader = [
+ "precision mediump float;",
+
+ "varying vec4 vColor;",
+
+ "void main() {",
+ " gl_FragColor = vColor;",
+ "}"
+].join('\n');
+
+
+var constructorFragmentTemplate = [
+ "precision mediump int;",
+ "precision mediump float;",
+
+ // Colors used to signal correctness of component values comparison
+ "const vec4 green = vec4(0.0, 1.0, 0.0, 1.0); ",
+ "const vec4 red = vec4(1.0, 0.0, 0.0, 1.0); ",
+
+ // Error bound used in comparison of floating point values
+ "$(errorBound)",
+
+ "void main() {",
+ " $(argsList)",
+
+ " $(type) v = $(type)($(argsConstr));",
+
+ " if ($(checkCompVals))",
+ " gl_FragColor = green;",
+ " else",
+ " gl_FragColor = red;",
+ "}"
+].join("\n");
+
+
+// Coding of the different argument types
+// s : scalar
+// v2 : vec2
+// v3 : vec3
+// v4 : vec4
+// m2 : mat2
+// m3 : mat3
+// m4 : mat4
+
+// Returns the dimensions of the type
+// Count of columns, count of rows
+function getTypeCodeDimensions(typeCode) {
+ switch (typeCode) {
+ case "s": return [1, 1];
+ case "v2": return [1, 2];
+ case "v3": return [1, 3];
+ case "v4": return [1, 4];
+ case "m2": return [2, 2];
+ case "m3": return [3, 3];
+ case "m4": return [4, 4];
+
+ default:
+ wtu.error("GLSLConstructorTestsGenerator.getTypeCodeDimensions(), unknown type code");
+ debugger;
+ }
+};
+
+
+// Returns the component count for the type code
+function getTypeCodeComponentCount(typeCode) {
+ var dim = getTypeCodeDimensions(typeCode);
+
+ return dim[0] * dim[1];
+}
+
+
+// Returns glsl name of type code
+function getGLSLBaseTypeName(typeCode) {
+ switch(typeCode) {
+ case "s": return "";
+ case "v2": return "vec2";
+ case "v3": return "vec3";
+ case "v4": return "vec4";
+ case "m2": return "mat2";
+ case "m3": return "mat3";
+ case "m4": return "mat4";
+
+ default:
+ wtu.error("GLSLConstructorTestsGenerator.getGLSLBaseTypeName(), unknown type code");
+ debugger;
+ }
+}
+
+
+// Returns the scalar glsl type name related to the structured type
+function getGLSLScalarType(targetType) {
+ switch(targetType[0]) {
+ case 'i': return "int";
+ case 'b': return "bool";
+
+ case 'v':
+ case 'm':
+ return "float";
+
+ default:
+ wtu.error("GLSLConstructorTestsGenerator.getGLSLScalarType(), unknown target type");
+ debugger;
+ }
+}
+
+
+// Returns the scalar prefix for the associated scalar type
+function getGLSLScalarPrefix(targetType) {
+ switch(targetType[0]) {
+ case 'i':
+ case 'b':
+ return targetType[0];
+
+ case 'v':
+ case 'm':
+ return '';
+
+ default:
+ wtu.error("GLSLConstructorTestsGenerator.getGLSLScalarPrefix(), unknown target type");
+ debugger;
+ }
+}
+
+
+// Returns the type for a specified target type and argument type code
+function getGLSLArgumentType(typeCode, targetType) {
+ var baseType = getGLSLBaseTypeName(typeCode);
+ if (baseType !== "") {
+ if (typeCode[0] === "v") {
+ // Vectors come in different flavours
+ return getGLSLScalarPrefix(targetType) + baseType;
+ }
+ else
+ return baseType;
+ }
+ else
+ return getGLSLScalarType(targetType);
+}
+
+
+// Returns the glsl type of the argument components
+function getGLSLArgumentComponentType(argTypeCode, targetType) {
+ var scalarType;
+
+ if (argTypeCode[0] === "m") {
+ // Matrices are always floats
+ scalarType = "float";
+ }
+ else
+ scalarType = getGLSLScalarType(targetType);
+
+ return scalarType;
+}
+
+
+function getGLSLColumnSize(targetType) {
+ colSize = parseInt(targetType.slice(-1));
+
+ if (!isNaN(colSize))
+ return colSize;
+
+ wtu.error("GLSLConstructorTestsGenerator.getGLSLColumnSize(), invalid target type");
+ debugger;
+}
+
+
+// Returns correct string representation of scalar value
+function getScalarTypeValStr(val, scalarType) {
+ if (val == null)
+ debugger;
+
+ switch (scalarType) {
+ case "float": return val.toFixed(1);
+ case "int": return val;
+ case "bool": return (val === 0) ? "false" : "true";
+
+ default:
+ wtu.error("GLSLConstructorTestsGenerator.getScalarTypeValStr(), unknown scalar type");
+ debugger;
+ }
+}
+
+
+// Returns true if the glsl type name is a matrix
+function isGLSLTypeMatrix(type) {
+ return (type.indexOf("mat") !== -1);
+}
+
+
+// Returns true if the glsl type name is a vector
+function isGLSLTypeVector(type) {
+ return (type.indexOf("vec") !== -1);
+}
+
+
+// Returns the count of components
+function getGLSLTypeComponentCount(type) {
+ var colSize = getGLSLColumnSize(type);
+
+ if (isGLSLTypeMatrix(type))
+ return colSize * colSize;
+ else
+ return colSize;
+}
+
+
+// Returns the constructor expression with the components set to a sequence of scalar values
+// Like vec3(1.0, 2.0, 3.0)
+function getComponentSequenceConstructorExpression(typeCode, firstCompValue, targetType) {
+ var scalarType = getGLSLArgumentComponentType(typeCode, targetType);
+
+ if (typeCode === "s") {
+ // Scalar
+ return getScalarTypeValStr(firstCompValue, scalarType) + ";";
+ }
+ else {
+ // Structured typeargTypeCode[0] === "m"
+ compCount = getTypeCodeComponentCount(typeCode);
+ var constrExpParts = new Array(compCount);
+ for (var aa = 0; aa < compCount; ++aa)
+ constrExpParts[aa] = getScalarTypeValStr(firstCompValue + aa, scalarType);
+
+ return getGLSLArgumentType(typeCode, targetType) + "(" + constrExpParts.join(", ") + ");";
+ }
+}
+
+
+// Returns the expression to select a component of the structured type
+function getComponentSelectorExpStr(targetType, compIx) {
+ if (isGLSLTypeMatrix(targetType)) {
+ var colRowIx = getColRowIndexFromLinearIndex(compIx, getGLSLColumnSize(targetType));
+ return "v[" + colRowIx.colIx + "][" + colRowIx.rowIx + "]";
+ }
+ else
+ return "v[" + compIx + "]";
+}
+
+
+// Returns expression which validates the components set by the constructor expression
+function getComponentValidationExpression(refCompVals, targetType) {
+ // Early out for invalid arguments
+ if (refCompVals.length === 0)
+ return "false";
+
+ var scalarType = getGLSLScalarType(targetType);
+ var checkComponentValueParts = new Array(refCompVals.length);
+ for (var cc = 0; cc < refCompVals.length; ++cc) {
+ var val_str = getScalarTypeValStr(refCompVals[cc], scalarType);
+ var comp_sel_exp = getComponentSelectorExpStr(targetType, cc);
+ if (scalarType === "float") {
+ // Comparison of floating point values with error bound
+ checkComponentValueParts[cc] = "abs(" + comp_sel_exp + " - " + val_str + ") <= errorBound";
+ }
+ else {
+ // Simple comparison to expected value
+ checkComponentValueParts[cc] = comp_sel_exp + " == " + val_str;
+ }
+ }
+
+ return checkComponentValueParts.join(" && ");
+}
+
+
+// Returns substitution parts to turn the shader template into testable shader code
+function getTestShaderParts(targetType, argExp, firstCompValue) {
+ // glsl code of declarations of arguments
+ var argsListParts = new Array(argExp.length);
+
+ // glsl code of constructor expression
+ var argsConstrParts = new Array(argExp.length);
+
+ // glsl type expression
+ var typeExpParts = new Array(argExp.length);
+ for (var aa = 0; aa < argExp.length; ++aa) {
+ var typeCode = argExp[aa];
+ var argCompCount = getTypeCodeComponentCount(typeCode);
+ var argName = "a" + aa;
+ var argType = getGLSLArgumentType(typeCode, targetType);
+ var argConstrExp = argType + " " + argName + " = " + getComponentSequenceConstructorExpression(typeCode, firstCompValue, targetType);
+
+ // Add construction of one argument
+ // Indent if not first argument
+ argsListParts[aa] = ((aa > 0) ? " " : "") + argConstrExp;
+
+ // Add argument name to target type argument list
+ argsConstrParts[aa] = argName;
+
+ // Add type name to type expression
+ typeExpParts[aa] = argType;
+
+ // Increment argument component value so all argument component arguments have a unique value
+ firstCompValue += argCompCount;
+ }
+
+ return {
+ argsList: argsListParts.join("\n") + "\n",
+ argsConstr: argsConstrParts.join(", "),
+ typeExp: targetType + "(" + typeExpParts.join(", ") + ")"
+ };
+}
+
+
+// Utility functions to manipulate the array of reference values
+
+// Returns array filled with identical values
+function getArrayWithIdenticalValues(size, val) {
+ var matArray = new Array(size);
+ for (var aa = 0; aa < size; ++aa)
+ matArray[aa] = val;
+
+ return matArray;
+}
+
+
+// Returns array filled with increasing values from a specified start value
+function getArrayWithIncreasingValues(size, start) {
+ var matArray = new Array(size);
+ for (var aa = 0; aa < size; ++aa)
+ matArray[aa] = start + aa;
+
+ return matArray;
+}
+
+
+// Utility functions to manipulate the array of reference values if the target type is a matrix
+
+// Returns an array which is the column order layout of a square matrix where the diagonal is set to a specified value
+function matCompArraySetDiagonal(matArray, diagVal) {
+ // The entries for the diagonal start at array index 0 and increase
+ // by column size + 1
+ var colSize = Math.round(Math.sqrt(matArray.length));
+ var dIx = 0;
+ do {
+ matArray[dIx] = diagVal;
+ dIx += (colSize + 1);
+ }
+ while (dIx < colSize * colSize);
+
+ return matArray;
+}
+
+
+// Returns an array which contains the values of an identity matrix read out in column order
+function matCompArrayCreateDiagonalMatrix(colSize, diagVal) {
+ var size = colSize * colSize;
+ var matArray = new Array(size);
+ for (var aa = 0; aa < size; ++aa)
+ matArray[aa] = 0;
+
+ return matCompArraySetDiagonal(matArray, diagVal);
+}
+
+
+// Returns the column and row index from the linear index if the components of the matrix are stored in column order in an array
+// in a one dimensional array in column order
+function getColRowIndexFromLinearIndex(linIx, colSize) {
+ return {
+ colIx: Math.floor(linIx / colSize),
+ rowIx: linIx % colSize
+ };
+}
+
+
+// Returns the linear index for matrix column and row index for a specified matrix size
+function getLinearIndexFromColRowIndex(rowColIx, colSize) {
+ return rowColIx.colIx * colSize + rowColIx.rowIx;
+}
+
+
+// Returns a matrix set from another matrix
+function matCompArraySetMatrixFromMatrix(dstColSize, srcMatArray) {
+ // Overwrite components from destination with the source component values at the same col, row coordinates
+ var dstMatArray = matCompArrayCreateDiagonalMatrix(dstColSize, 1);
+
+ var srcColSize = Math.round(Math.sqrt(srcMatArray.length));
+
+ for (var c_ix = 0; c_ix < srcMatArray.length; ++c_ix) {
+ var srcMatIx = getColRowIndexFromLinearIndex(c_ix, srcColSize);
+ if (srcMatIx.colIx < dstColSize && srcMatIx.rowIx < dstColSize) {
+ // Source matrix coordinates are valid destination matrix coordinates
+ dstMatArray[getLinearIndexFromColRowIndex(srcMatIx, dstColSize)] = srcMatArray[c_ix];
+ }
+ }
+
+ return dstMatArray;
+}
+
+
+// Returns the glsl code to verify if the components are set correctly
+// and the message to display for the test
+function getConstructorExpressionInfo(targetType, argExp, firstCompValue) {
+ var argCompCountsSum = 0;
+ var argCompCounts = new Array(argExp.length);
+ for (var aa = 0; aa < argExp.length; ++aa) {
+ argCompCounts[aa] = getTypeCodeComponentCount(argExp[aa]);
+ argCompCountsSum += argCompCounts[aa];
+ }
+
+ var targetCompCount = getGLSLTypeComponentCount(targetType);
+
+ var refCompVals;
+ var testMsg;
+ var valid;
+
+ if (argCompCountsSum === 0) {
+ // A constructor needs at least one argument
+ refCompVals = [];
+ testMsg = "invalid (no arguments)";
+ valid = false;
+ }
+ else {
+ if (isGLSLTypeVector(targetType)) {
+ if (argCompCountsSum === 1) {
+ // One scalar argument
+ // Vector constructor with one scalar argument set all components to the same value
+ refCompVals = getArrayWithIdenticalValues(targetCompCount, firstCompValue);
+ testMsg = "valid (all components set to the same value)";
+ valid = true;
+ }
+ else {
+ // Not one scalar argument
+ if (argCompCountsSum < targetCompCount) {
+ // Not all components set
+ refCompVals = [];
+ testMsg = "invalid (not enough arguments)";
+ valid = false;
+ }
+ else {
+ // argCompCountsSum >= targetCompCount
+ // All components set
+ var lastArgFirstCompIx = argCompCountsSum - argCompCounts[argCompCounts.length - 1];
+
+ if (lastArgFirstCompIx < targetCompCount) {
+ // First component of last argument is used
+ refCompVals = getArrayWithIncreasingValues(targetCompCount, firstCompValue);
+ testMsg = "valid";
+ valid = true;
+ }
+ else {
+ // First component of last argument is not used
+ refCompVals = [];
+ testMsg = "invalid (unused argument)";
+ valid = false;
+ }
+ }
+ }
+ }
+ else {
+ // Matrix target type
+ if (argCompCountsSum === 1) {
+ // One scalar argument
+ // Matrix constructors with one scalar set all components on the diagonal to the same value
+ // All other components are set to zero
+ refCompVals = matCompArrayCreateDiagonalMatrix(Math.round(Math.sqrt(targetCompCount)), firstCompValue);
+ testMsg = "valid (diagonal components set to the same value, off-diagonal components set to zero)";
+ valid = true;
+ }
+ else {
+ // Not one scalar argument
+ if (argExp.length === 1 && argExp[0][0] === "m") {
+ // One single matrix argument
+ var dstColSize = getGLSLColumnSize(targetType);
+ refCompVals = matCompArraySetMatrixFromMatrix(dstColSize, getArrayWithIncreasingValues(getTypeCodeComponentCount(argExp[0]), firstCompValue));
+ testMsg = "valid, components at corresponding col, row indices are set from argument, other components are set from identity matrix";
+ valid = true;
+ }
+ else {
+ // More than one argument or one argument not of type matrix
+ // Can be treated in the same manner
+ // Arguments can not be of type matrix
+ var matFound = false;
+ for (var aa = 0; aa < argExp.length; ++aa)
+ if (argExp[aa][0] === "m")
+ matFound = true;
+
+ if (matFound) {
+ refCompVals = [];
+ testMsg = "invalid, argument list greater than one contains matrix type";
+ valid = false;
+ }
+ else {
+ if (argCompCountsSum < targetCompCount) {
+ refCompVals = [];
+ testMsg = "invalid (not enough arguments)";
+ valid = false;
+ }
+ else {
+ // argCompCountsSum >= targetCompCount
+ // All components set
+ var lastArgFirstCompIx = argCompCountsSum - argCompCounts[argCompCounts.length - 1];
+
+ if (lastArgFirstCompIx < targetCompCount) {
+ // First component of last argument is used
+ refCompVals = getArrayWithIncreasingValues(targetCompCount, firstCompValue);
+ testMsg = "valid";
+ valid = true;
+ }
+ else {
+ // First component of last argument is not used
+ refCompVals = [];
+ testMsg = "invalid (unused argument)";
+ valid = false;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Check if no case is missed
+ if (testMsg == null || valid == null) {
+ wtu.error("GLSLConstructorTestsGenerator.getConstructorExpressionInfo(), info not set");
+ debugger;
+ }
+
+ return {
+ refCompVals: refCompVals,
+ testMsg: testMsg,
+ valid: valid
+ };
+}
+
+
+// Returns a vertex shader testcase and a fragment shader testcase
+function getVertexAndFragmentShaderTestCase(targetType, argExp) {
+ var firstCompValue = 0;
+ if (isGLSLTypeMatrix(targetType)) {
+ // Use value different from 0 and 1
+ // 0 and 1 are values used by matrix constructed from a matrix or a single scalar
+ firstCompValue = 2;
+ }
+
+ var argCode = getTestShaderParts (targetType, argExp, firstCompValue);
+ var expInfo = getConstructorExpressionInfo(targetType, argExp, firstCompValue);
+
+ var substitutions = {
+ type: targetType,
+ errorBound: (getGLSLScalarType(targetType) === "float") ? "const float errorBound = 1.0E-5;" : "",
+ argsList: argCode.argsList,
+ argsConstr: argCode.argsConstr,
+ checkCompVals: getComponentValidationExpression(expInfo.refCompVals, targetType)
+ };
+
+ return [ {
+ // Test constructor argument list in vertex shader
+ vShaderSource: wtu.replaceParams(constructorVertexTemplate, substitutions),
+ vShaderSuccess: expInfo.valid,
+ fShaderSource: passThroughColorFragmentShader,
+ fShaderSuccess: true,
+ linkSuccess: expInfo.valid,
+ passMsg: "Vertex shader : " + argCode.typeExp + ", " + expInfo.testMsg,
+ render: expInfo.valid
+ }, {
+ // Test constructor argument list in fragment shader
+ vShaderSource: GLSLConformanceTester.defaultVertexShader,
+ vShaderSuccess: true,
+ fShaderSource: wtu.replaceParams(constructorFragmentTemplate, substitutions),
+ fShaderSuccess: expInfo.valid,
+ linkSuccess: expInfo.valid,
+ passMsg: "Fragment shader : " + argCode.typeExp + ", " + expInfo.testMsg,
+ render: expInfo.valid
+ }
+ ];
+}
+
+
+// Incrementing the argument expressions
+// Utility object which defines the order of incrementing the argument types
+var typeCodeIncrementer = {
+ s: { typeCode: "v2", order: 0 },
+ v2: { typeCode: "v3", order: 1 },
+ v3: { typeCode: "v4", order: 2 },
+ v4: { typeCode: "m2", order: 3 },
+ m2: { typeCode: "m3", order: 4 },
+ m3: { typeCode: "m4", order: 5 },
+ m4: { typeCode: "s", order: 6 },
+ first: "s"
+}
+
+
+// Returns the next argument sequence
+function getNextArgumentSequence(inSeq) {
+ var nextSeq;
+ if (inSeq.length === 0) {
+ // Current argument sequence is empty, add first argument
+ nextSeq = [typeCodeIncrementer.first];
+ }
+ else {
+ nextSeq = new Array(inSeq.length);
+ var overflow = true;
+ for (var aa = 0; aa < inSeq.length; ++aa) {
+ var currArg = inSeq[aa];
+ if (overflow) {
+ // Increment the current argument type
+ var nextArg = typeCodeIncrementer[currArg].typeCode;
+ nextSeq[aa] = nextArg;
+ overflow = (nextArg === typeCodeIncrementer.first);
+ }
+ else {
+ // Copy remainder of sequence
+ nextSeq[aa] = currArg;
+ }
+ }
+
+ if (overflow) {
+ nextSeq.push(typeCodeIncrementer.first);
+ }
+ }
+
+ return nextSeq;
+}
+
+
+// Returns true if two argument expressions are equal
+function areArgExpEqual(expA, expB) {
+ if (expA.length !== expB.length)
+ return false;
+
+ for (var aa = 0; aa < expA.length; ++aa)
+ if (expA[aa] !== expB[aa])
+ return false;
+
+ return true;
+}
+
+
+// Returns true if first argument expression is smaller
+// (comes before the second one in iterating order)
+// compared to the second argument expression
+function isArgExpSmallerOrEqual(argExpA, argExpB) {
+ var aLen = argExpA.length;
+ var bLen = argExpB.length;
+ if (aLen !== bLen)
+ return (aLen < bLen);
+
+ // Argument type expression lengths are equal
+ for (var aa = aLen - 1; aa >= 0; --aa) {
+ var argA = argExpA[aa];
+ var argB = argExpB[aa];
+
+ if (argA !== argB) {
+ var aOrder = typeCodeIncrementer[argA].order;
+ var bOrder = typeCodeIncrementer[argB].order;
+ if (aOrder !== bOrder)
+ return (aOrder < bOrder);
+ }
+ }
+
+ // Argument type expressions are equal
+ return true;
+}
+
+
+// Returns the next argument expression from sequence set
+// Returns null if end is reached
+function getNextArgumentExpression(testExp, testSet) {
+ var testInterval = testSet[testExp.ix];
+
+ if (areArgExpEqual(testExp.argExp, testInterval[1])) {
+ // End of current interval reached
+ if (testExp.ix === testSet.length - 1) {
+ // End of set reached
+ return null;
+ }
+ else {
+ // Return first argument expression of next interval
+ var nextIx = testExp.ix + 1;
+ return { ix: nextIx, argExp: testSet[nextIx][0] };
+ }
+ }
+ else {
+ // Return next expression in current interval
+ return { ix: testExp.ix, argExp: getNextArgumentSequence(testExp.argExp) };
+ }
+}
+
+
+// Returns an array of the parts in the string separated by commas and with the white space trimmed
+function convertCsvToArray(str) {
+ // Checks type codes in input
+ function checkInput(el, ix, arr) {
+ var typeCode = el.trim();
+ if (!(typeCode in typeCodeIncrementer) && typeCode !== "first") {
+ wtu.error("GLSLConstructorTestsGenerator.convertCsvToArray(), unknown type code" + typeCode);
+ debugger;
+ }
+
+ arr[ix] = typeCode;
+ }
+
+ var spArr = str.split(",");
+
+ // Convert empty string to empty array
+ if (spArr.length === 1 && spArr[0].trim() === "")
+ spArr = [];
+
+ spArr.forEach(checkInput);
+
+ return spArr;
+}
+
+
+// Processes the set of specified test sequences
+function processInputs(testSequences) {
+ var testSet = new Array(testSequences.length);
+ for (var tt = 0; tt < testSequences.length; ++tt) {
+ var interval = testSequences[tt];
+ var bounds = interval.split("-");
+ var begin = convertCsvToArray(bounds[0]);
+ var end = convertCsvToArray(bounds[bounds.length - 1]);
+
+ // Check if interval is valid
+ if (!isArgExpSmallerOrEqual(begin, end)) {
+ wtu.error("GLSLConstructorTestsGenerator.processInputs(), interval not valid");
+ debugger;
+ }
+
+ testSet[tt] = [ begin, end ];
+ }
+
+ return testSet;
+}
+
+
+/**
+ * Returns list of test cases for vector types
+ * All combinations of arguments up to one unused argument of one component are tested
+ * @param {targetType} Name of target type to test the constructor expressions on
+ * @param {testSet} Set of intervals of argument sequences to test
+ */
+function getConstructorTests(targetType, testSequences) {
+ // List of tests to return
+ var testInfos = [];
+
+ // List of argument types
+ var testSet = processInputs(testSequences);
+ var testExp = { ix: 0, argExp: testSet[0][0] };
+
+ do {
+ // Add one vertex shader test case and one fragment shader test case
+ testInfos = testInfos.concat(getVertexAndFragmentShaderTestCase(targetType, testExp.argExp));
+
+ // Generate next argument expression
+ testExp = getNextArgumentExpression(testExp, testSet);
+ }
+ while (testExp != null);
+
+ return testInfos;
+}
+
+
+// Returns default test argument expression set
+// For details on input format : see bottom of file
+function getDefaultTestSet(targetType) {
+ switch(targetType) {
+ case "vec2":
+ case "ivec2":
+ case "bvec2":
+ return [
+ // No arguments and all single argument expressions
+ " - m4",
+
+ // All two argument expressions with a scalar as second argument
+ "s, s - m4, s",
+
+ // All two arguments expressions with a scalar as first argument
+ "s, v2", "s, v3", "s, v4", "s, m2", "s, m3", "s, m4",
+
+ // Three argument expression
+ "s, s, s"
+ ];
+
+ case "vec3":
+ case "ivec3":
+ case "bvec3":
+ return [
+ // No arguments and all single argument expressions
+ " - m4",
+
+ // All two argument expressions with a scalar as second argument
+ "s, s - m4, s",
+
+ // All two argument expressions with a scalar as first argument
+ "s, v2", "s, v3", "s, v4", "s, m2", "s, m3", "s, m4",
+
+ // All three argument expressions with two scalars as second and third argument
+ "s, s, s - m4, s, s",
+
+ // All three argument expressions with two scalars as first and second argument
+ "s, s, v2", "s, s, v3", "s, s, v4", "s, s, m2", "s, s, m3", "s, s, m4",
+
+ // Four argument expression
+ "s, s, s, s"
+ ];
+
+ case "vec4":
+ case "ivec4":
+ case "bvec4":
+ case "mat2":
+ return [
+ // No arguments and all single argument expressions
+ " - m4",
+
+ // All two argument expressions with a scalar as second argument
+ "s, s - m4, s",
+
+ // All two argument expressions with a scalar as first argument
+ "s, v2", "s, v3", "s, v4", "s, m2", "s, m3", "s, m4",
+
+ // All three argument expressions with two scalars as second and third argument
+ "s, s, s - m4, s, s",
+
+ // All three argument expressions with two scalars as first and second argument
+ "s, s, v2", "s, s, v3", "s, s, v4", "s, s, m2", "s, s, m3", "s, s, m4",
+
+ // All four argument expressions with three scalars as second, third and fourth argument
+ "s, s, s, s - m4, s, s, s",
+
+ // All four argument expressions with three scalars as first, second and third argument
+ "s, s, s, v2", "s, s, s, v3", "s, s, s, v4", "s, s, s, m2", "s, s, s, m3", "s, s, s, m4",
+
+ // Five argument expression
+ "s, s, s, s, s"
+ ];
+
+ case "mat3":
+ case "mat4":
+ return [
+ // No arguments and all single argument expressions
+ " - m4",
+
+ // All two argument expressions with a scalar as second argument
+ "s, s - m4, s",
+
+ // All two argument expressions with a scalar as first argument
+ "s, v2", "s, v3", "s, v4", "s, m2", "s, m3", "s, m4",
+
+ // Several argument sequences
+ "v4, s, v4", "v4, s, v3, v2", "v4, v4, v3, v2", "v4, v4, v4, v4", "v2, v2, v2, v2, v2", "v2, v2, v2, v2, v2, v2, v2, v2",
+ "v3, v3, v3", "v3, v3, v3, s", "v3, v3, v3, v3, v3, s", "v3, v3, v3, v3, v3, s, s",
+ ];
+ }
+}
+
+
+// Return publics
+return {
+ getConstructorTests: getConstructorTests,
+ getDefaultTestSet: getDefaultTestSet
+};
+
+}());
+
+
+// Input is an array of intervals of argument types
+// The generated test argument sequences are from (including) the lower interval boundary
+// until (including) the upper boundary
+// Coding and order of the different argument types :
+// s : scalar
+// v2 : vec2
+// v3 : vec3
+// v4 : vec4
+// m2 : mat2
+// m3 : mat3
+// m4 : mat4
+
+// One interval is put in one string
+// Low and high bound are separated by a dash.
+// If there is no dash it is regarded as an interval of one expression
+// The individual argument codes are separated by commas
+// The individual arguments are incremented from left to right
+// The left most argument is the one which is incremented first
+// Once the left most arguments wraps the second argument is increased
+// Examples :
+// "s - m4" : All single arguments from scalar up to (including) mat4
+// "m2, s - m4, s" : All two argument expressions with a matrix argument as first argument and a scalar as second argument
+// " - m4, m4" : The empty argument, all one arguments and all two argument expressions
+// "m2, s, v3, m4" : One 4 argument expression : mat2, scalar, vec3, mat4
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-feature-tests.css b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-feature-tests.css
new file mode 100644
index 000000000..c8063d92b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-feature-tests.css
@@ -0,0 +1,29 @@
+canvas {
+ background-color: white;
+ background-image: linear-gradient(0, rgba(200, 200, 200, .5) 50%, transparent 50%), linear-gradient(rgba(200, 200, 200, .5) 50%, transparent 50%);
+ background-size: 8px 8px;
+}
+
+.shader-source {
+ border: 1px dashed black;
+ padding: 1em;
+}
+
+.shader-source li:nth-child(odd) { background: #f8f8f8; }
+.shader-source li:nth-child(even) { background: #f0f0f0; }
+
+.testimages {
+}
+
+.testimages br {
+ clear: both;
+}
+
+.testimages > div {
+ float: left;
+ margin: 1em;
+}
+
+IMG {
+ border: 1px solid black;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-generator.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-generator.js
new file mode 100644
index 000000000..940c0cd17
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/glsl-generator.js
@@ -0,0 +1,1251 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+GLSLGenerator = (function() {
+
+var vertexShaderTemplate = [
+ "attribute vec4 aPosition;",
+ "",
+ "varying vec4 vColor;",
+ "",
+ "$(extra)",
+ "$(emu)",
+ "",
+ "void main()",
+ "{",
+ " gl_Position = aPosition;",
+ " vec2 texcoord = vec2(aPosition.xy * 0.5 + vec2(0.5, 0.5));",
+ " vec4 color = vec4(",
+ " texcoord,",
+ " texcoord.x * texcoord.y,",
+ " (1.0 - texcoord.x) * texcoord.y * 0.5 + 0.5);",
+ " $(test)",
+ "}"
+].join("\n");
+
+var fragmentShaderTemplate = [
+ "precision mediump float;",
+ "",
+ "varying vec4 vColor;",
+ "",
+ "$(extra)",
+ "$(emu)",
+ "",
+ "void main()",
+ "{",
+ " $(test)",
+ "}"
+].join("\n");
+
+var baseVertexShader = [
+ "attribute vec4 aPosition;",
+ "",
+ "varying vec4 vColor;",
+ "",
+ "void main()",
+ "{",
+ " gl_Position = aPosition;",
+ " vec2 texcoord = vec2(aPosition.xy * 0.5 + vec2(0.5, 0.5));",
+ " vColor = vec4(",
+ " texcoord,",
+ " texcoord.x * texcoord.y,",
+ " (1.0 - texcoord.x) * texcoord.y * 0.5 + 0.5);",
+ "}"
+].join("\n");
+
+var baseVertexShaderWithColor = [
+ "attribute vec4 aPosition;",
+ "attribute vec4 aColor;",
+ "",
+ "varying vec4 vColor;",
+ "",
+ "void main()",
+ "{",
+ " gl_Position = aPosition;",
+ " vColor = aColor;",
+ "}"
+].join("\n");
+
+var baseFragmentShader = [
+ "precision mediump float;",
+ "varying vec4 vColor;",
+ "",
+ "void main()",
+ "{",
+ " gl_FragColor = vColor;",
+ "}"
+].join("\n");
+
+var types = [
+ { type: "float",
+ code: [
+ "float $(func)_emu($(args)) {",
+ " return $(func)_base($(baseArgs));",
+ "}"].join("\n")
+ },
+ { type: "vec2",
+ code: [
+ "vec2 $(func)_emu($(args)) {",
+ " return vec2(",
+ " $(func)_base($(baseArgsX)),",
+ " $(func)_base($(baseArgsY)));",
+ "}"].join("\n")
+ },
+ { type: "vec3",
+ code: [
+ "vec3 $(func)_emu($(args)) {",
+ " return vec3(",
+ " $(func)_base($(baseArgsX)),",
+ " $(func)_base($(baseArgsY)),",
+ " $(func)_base($(baseArgsZ)));",
+ "}"].join("\n")
+ },
+ { type: "vec4",
+ code: [
+ "vec4 $(func)_emu($(args)) {",
+ " return vec4(",
+ " $(func)_base($(baseArgsX)),",
+ " $(func)_base($(baseArgsY)),",
+ " $(func)_base($(baseArgsZ)),",
+ " $(func)_base($(baseArgsW)));",
+ "}"].join("\n")
+ }
+];
+
+var bvecTypes = [
+ { type: "bvec2",
+ code: [
+ "bvec2 $(func)_emu($(args)) {",
+ " return bvec2(",
+ " $(func)_base($(baseArgsX)),",
+ " $(func)_base($(baseArgsY)));",
+ "}"].join("\n")
+ },
+ { type: "bvec3",
+ code: [
+ "bvec3 $(func)_emu($(args)) {",
+ " return bvec3(",
+ " $(func)_base($(baseArgsX)),",
+ " $(func)_base($(baseArgsY)),",
+ " $(func)_base($(baseArgsZ)));",
+ "}"].join("\n")
+ },
+ { type: "bvec4",
+ code: [
+ "vec4 $(func)_emu($(args)) {",
+ " return bvec4(",
+ " $(func)_base($(baseArgsX)),",
+ " $(func)_base($(baseArgsY)),",
+ " $(func)_base($(baseArgsZ)),",
+ " $(func)_base($(baseArgsW)));",
+ "}"].join("\n")
+ }
+];
+
+var replaceRE = /\$\((\w+)\)/g;
+
+var replaceParams = function(str) {
+ var args = arguments;
+ return str.replace(replaceRE, function(str, p1, offset, s) {
+ for (var ii = 1; ii < args.length; ++ii) {
+ if (args[ii][p1] !== undefined) {
+ return args[ii][p1];
+ }
+ }
+ throw "unknown string param '" + p1 + "'";
+ });
+};
+
+var generateReferenceShader = function(
+ shaderInfo, template, params, typeInfo, test) {
+ var input = shaderInfo.input;
+ var output = shaderInfo.output;
+ var feature = params.feature;
+ var testFunc = params.testFunc;
+ var emuFunc = params.emuFunc || "";
+ var extra = params.extra || '';
+ var args = params.args || "$(type) value";
+ var type = typeInfo.type;
+ var typeCode = typeInfo.code;
+
+ var baseArgs = params.baseArgs || "value$(field)";
+ var baseArgsX = replaceParams(baseArgs, {field: ".x"});
+ var baseArgsY = replaceParams(baseArgs, {field: ".y"});
+ var baseArgsZ = replaceParams(baseArgs, {field: ".z"});
+ var baseArgsW = replaceParams(baseArgs, {field: ".w"});
+ var baseArgs = replaceParams(baseArgs, {field: ""});
+
+ test = replaceParams(test, {
+ input: input,
+ output: output,
+ func: feature + "_emu"
+ });
+ emuFunc = replaceParams(emuFunc, {
+ func: feature
+ });
+ args = replaceParams(args, {
+ type: type
+ });
+ typeCode = replaceParams(typeCode, {
+ func: feature,
+ type: type,
+ args: args,
+ baseArgs: baseArgs,
+ baseArgsX: baseArgsX,
+ baseArgsY: baseArgsY,
+ baseArgsZ: baseArgsZ,
+ baseArgsW: baseArgsW
+ });
+ var shader = replaceParams(template, {
+ extra: extra,
+ emu: emuFunc + "\n\n" + typeCode,
+ test: test
+ });
+ return shader;
+};
+
+var generateTestShader = function(
+ shaderInfo, template, params, test) {
+ var input = shaderInfo.input;
+ var output = shaderInfo.output;
+ var feature = params.feature;
+ var testFunc = params.testFunc;
+ var extra = params.extra || '';
+
+ test = replaceParams(test, {
+ input: input,
+ output: output,
+ func: feature
+ });
+ var shader = replaceParams(template, {
+ extra: extra,
+ emu: '',
+ test: test
+ });
+ return shader;
+};
+
+function _reportResults(refData, refImg, testData, testImg, tolerance,
+ width, height, ctx, imgData, wtu, canvas2d, consoleDiv) {
+ var same = true;
+ var firstFailure = null;
+ for (var yy = 0; yy < height; ++yy) {
+ for (var xx = 0; xx < width; ++xx) {
+ var offset = (yy * width + xx) * 4;
+ var imgOffset = ((height - yy - 1) * width + xx) * 4;
+ imgData.data[imgOffset + 0] = 0;
+ imgData.data[imgOffset + 1] = 0;
+ imgData.data[imgOffset + 2] = 0;
+ imgData.data[imgOffset + 3] = 255;
+ if (Math.abs(refData[offset + 0] - testData[offset + 0]) > tolerance ||
+ Math.abs(refData[offset + 1] - testData[offset + 1]) > tolerance ||
+ Math.abs(refData[offset + 2] - testData[offset + 2]) > tolerance ||
+ Math.abs(refData[offset + 3] - testData[offset + 3]) > tolerance) {
+ var detail = 'at (' + xx + ',' + yy + '): ref=(' +
+ refData[offset + 0] + ',' +
+ refData[offset + 1] + ',' +
+ refData[offset + 2] + ',' +
+ refData[offset + 3] + ') test=(' +
+ testData[offset + 0] + ',' +
+ testData[offset + 1] + ',' +
+ testData[offset + 2] + ',' +
+ testData[offset + 3] + ') tolerance=' + tolerance;
+ consoleDiv.appendChild(document.createTextNode(detail));
+ consoleDiv.appendChild(document.createElement('br'));
+ if (!firstFailure) {
+ firstFailure = ": " + detail;
+ }
+ imgData.data[imgOffset] = 255;
+ same = false;
+ }
+ }
+ }
+
+ var diffImg = null;
+ if (!same) {
+ ctx.putImageData(imgData, 0, 0);
+ diffImg = wtu.makeImageFromCanvas(canvas2d);
+ }
+
+ var div = document.createElement("div");
+ div.className = "testimages";
+ wtu.insertImage(div, "ref", refImg);
+ wtu.insertImage(div, "test", testImg);
+ if (diffImg) {
+ wtu.insertImage(div, "diff", diffImg);
+ }
+ div.appendChild(document.createElement('br'));
+
+ consoleDiv.appendChild(div);
+
+ if (!same) {
+ testFailed("images are different" + (firstFailure ? firstFailure : ""));
+ } else {
+ testPassed("images are the same");
+ }
+
+ consoleDiv.appendChild(document.createElement('hr'));
+}
+
+var runFeatureTest = function(params) {
+ var wtu = WebGLTestUtils;
+ var gridRes = params.gridRes;
+ var vertexTolerance = params.tolerance || 0;
+ var fragmentTolerance = params.tolerance || 1;
+ if ('fragmentTolerance' in params)
+ fragmentTolerance = params.fragmentTolerance;
+
+ description("Testing GLSL feature: " + params.feature);
+
+ var width = 32;
+ var height = 32;
+
+ var consoleDiv = document.getElementById("console");
+ var canvas = document.createElement('canvas');
+ canvas.width = width;
+ canvas.height = height;
+ var gl = wtu.create3DContext(canvas, { premultipliedAlpha: false });
+ if (!gl) {
+ testFailed("context does not exist");
+ finishTest();
+ return;
+ }
+
+ var canvas2d = document.createElement('canvas');
+ canvas2d.width = width;
+ canvas2d.height = height;
+ var ctx = canvas2d.getContext("2d");
+ var imgData = ctx.getImageData(0, 0, width, height);
+
+ var shaderInfos = [
+ { type: "vertex",
+ input: "color",
+ output: "vColor",
+ vertexShaderTemplate: vertexShaderTemplate,
+ fragmentShaderTemplate: baseFragmentShader,
+ tolerance: vertexTolerance
+ },
+ { type: "fragment",
+ input: "vColor",
+ output: "gl_FragColor",
+ vertexShaderTemplate: baseVertexShader,
+ fragmentShaderTemplate: fragmentShaderTemplate,
+ tolerance: fragmentTolerance
+ }
+ ];
+ for (var ss = 0; ss < shaderInfos.length; ++ss) {
+ var shaderInfo = shaderInfos[ss];
+ var tests = params.tests;
+ var testTypes = params.emuFuncs || (params.bvecTest ? bvecTypes : types);
+ // Test vertex shaders
+ for (var ii = 0; ii < tests.length; ++ii) {
+ var type = testTypes[ii];
+ if (params.simpleEmu) {
+ type = {
+ type: type.type,
+ code: params.simpleEmu
+ };
+ }
+ debug("");
+ var str = replaceParams(params.testFunc, {
+ func: params.feature,
+ type: type.type,
+ arg0: type.type
+ });
+ var passMsg = "Testing: " + str + " in " + shaderInfo.type + " shader";
+ debug(passMsg);
+
+ var referenceVertexShaderSource = generateReferenceShader(
+ shaderInfo,
+ shaderInfo.vertexShaderTemplate,
+ params,
+ type,
+ tests[ii]);
+ var referenceFragmentShaderSource = generateReferenceShader(
+ shaderInfo,
+ shaderInfo.fragmentShaderTemplate,
+ params,
+ type,
+ tests[ii]);
+ var testVertexShaderSource = generateTestShader(
+ shaderInfo,
+ shaderInfo.vertexShaderTemplate,
+ params,
+ tests[ii]);
+ var testFragmentShaderSource = generateTestShader(
+ shaderInfo,
+ shaderInfo.fragmentShaderTemplate,
+ params,
+ tests[ii]);
+
+
+ debug("");
+ var referenceVertexShader = wtu.loadShader(gl, referenceVertexShaderSource, gl.VERTEX_SHADER, testFailed, true, 'reference');
+ var referenceFragmentShader = wtu.loadShader(gl, referenceFragmentShaderSource, gl.FRAGMENT_SHADER, testFailed, true, 'reference');
+ var testVertexShader = wtu.loadShader(gl, testVertexShaderSource, gl.VERTEX_SHADER, testFailed, true, 'test');
+ var testFragmentShader = wtu.loadShader(gl, testFragmentShaderSource, gl.FRAGMENT_SHADER, testFailed, true, 'test');
+ debug("");
+
+ if (parseInt(wtu.getUrlOptions().dumpShaders)) {
+ var vRefInfo = {
+ shader: referenceVertexShader,
+ shaderSuccess: true,
+ label: "reference vertex shader",
+ source: referenceVertexShaderSource
+ };
+ var fRefInfo = {
+ shader: referenceFragmentShader,
+ shaderSuccess: true,
+ label: "reference fragment shader",
+ source: referenceFragmentShaderSource
+ };
+ wtu.dumpShadersInfo(gl, window.location.pathname, passMsg, vRefInfo, fRefInfo);
+
+ var vTestInfo = {
+ shader: testVertexShader,
+ shaderSuccess: true,
+ label: "test vertex shader",
+ source: testVertexShaderSource
+ };
+ var fTestInfo = {
+ shader: testFragmentShader,
+ shaderSuccess: true,
+ label: "test fragment shader",
+ source: testFragmentShaderSource
+ };
+ wtu.dumpShadersInfo(gl, window.location.pathname, passMsg, vTestInfo, fTestInfo);
+ }
+
+ var refData = draw(
+ referenceVertexShader, referenceFragmentShader);
+ var refImg = wtu.makeImageFromCanvas(canvas);
+ if (ss == 0) {
+ var testData = draw(
+ testVertexShader, referenceFragmentShader);
+ } else {
+ var testData = draw(
+ referenceVertexShader, testFragmentShader);
+ }
+ var testImg = wtu.makeImageFromCanvas(canvas);
+
+ _reportResults(refData, refImg, testData, testImg, shaderInfo.tolerance,
+ width, height, ctx, imgData, wtu, canvas2d, consoleDiv);
+ }
+ }
+
+ finishTest();
+
+ function draw(vertexShader, fragmentShader) {
+ var program = wtu.createProgram(gl, vertexShader, fragmentShader, testFailed);
+
+ var posLoc = gl.getAttribLocation(program, "aPosition");
+ wtu.setupIndexedQuad(gl, gridRes, posLoc);
+
+ gl.useProgram(program);
+ wtu.clearAndDrawIndexedQuad(gl, gridRes, [0, 0, 255, 255]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from draw");
+
+ var img = new Uint8Array(width * height * 4);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, img);
+ return img;
+ }
+
+};
+
+var runBasicTest = function(params) {
+ var wtu = WebGLTestUtils;
+ var gridRes = params.gridRes;
+ var vertexTolerance = params.tolerance || 0;
+ var fragmentTolerance = vertexTolerance;
+ if ('fragmentTolerance' in params)
+ fragmentTolerance = params.fragmentTolerance || 0;
+
+ description("Testing : " + document.getElementsByTagName("title")[0].innerText);
+
+ var width = 32;
+ var height = 32;
+
+ var consoleDiv = document.getElementById("console");
+ var canvas = document.createElement('canvas');
+ canvas.width = width;
+ canvas.height = height;
+ var gl = wtu.create3DContext(canvas);
+ if (!gl) {
+ testFailed("context does not exist");
+ finishTest();
+ return;
+ }
+
+ var canvas2d = document.createElement('canvas');
+ canvas2d.width = width;
+ canvas2d.height = height;
+ var ctx = canvas2d.getContext("2d");
+ var imgData = ctx.getImageData(0, 0, width, height);
+
+ var shaderInfos = [
+ { type: "vertex",
+ input: "color",
+ output: "vColor",
+ vertexShaderTemplate: vertexShaderTemplate,
+ fragmentShaderTemplate: baseFragmentShader,
+ tolerance: vertexTolerance
+ },
+ { type: "fragment",
+ input: "vColor",
+ output: "gl_FragColor",
+ vertexShaderTemplate: baseVertexShader,
+ fragmentShaderTemplate: fragmentShaderTemplate,
+ tolerance: fragmentTolerance
+ }
+ ];
+ for (var ss = 0; ss < shaderInfos.length; ++ss) {
+ var shaderInfo = shaderInfos[ss];
+ var tests = params.tests;
+// var testTypes = params.emuFuncs || (params.bvecTest ? bvecTypes : types);
+ // Test vertex shaders
+ for (var ii = 0; ii < tests.length; ++ii) {
+ var test = tests[ii];
+ debug("");
+ var passMsg = "Testing: " + test.name + " in " + shaderInfo.type + " shader";
+ debug(passMsg);
+
+ function genShader(shaderInfo, template, shader, subs) {
+ shader = replaceParams(shader, subs, {
+ input: shaderInfo.input,
+ output: shaderInfo.output
+ });
+ shader = replaceParams(template, subs, {
+ test: shader,
+ emu: "",
+ extra: ""
+ });
+ return shader;
+ }
+
+ var referenceVertexShaderSource = genShader(
+ shaderInfo,
+ shaderInfo.vertexShaderTemplate,
+ test.reference.shader,
+ test.reference.subs);
+ var referenceFragmentShaderSource = genShader(
+ shaderInfo,
+ shaderInfo.fragmentShaderTemplate,
+ test.reference.shader,
+ test.reference.subs);
+ var testVertexShaderSource = genShader(
+ shaderInfo,
+ shaderInfo.vertexShaderTemplate,
+ test.test.shader,
+ test.test.subs);
+ var testFragmentShaderSource = genShader(
+ shaderInfo,
+ shaderInfo.fragmentShaderTemplate,
+ test.test.shader,
+ test.test.subs);
+
+ debug("");
+ var referenceVertexShader = wtu.loadShader(gl, referenceVertexShaderSource, gl.VERTEX_SHADER, testFailed, true, 'reference');
+ var referenceFragmentShader = wtu.loadShader(gl, referenceFragmentShaderSource, gl.FRAGMENT_SHADER, testFailed, true, 'reference');
+ var testVertexShader = wtu.loadShader(gl, testVertexShaderSource, gl.VERTEX_SHADER, testFailed, true, 'test');
+ var testFragmentShader = wtu.loadShader(gl, testFragmentShaderSource, gl.FRAGMENT_SHADER, testFailed, true, 'test');
+ debug("");
+
+ if (parseInt(wtu.getUrlOptions().dumpShaders)) {
+ var vRefInfo = {
+ shader: referenceVertexShader,
+ shaderSuccess: true,
+ label: "reference vertex shader",
+ source: referenceVertexShaderSource
+ };
+ var fRefInfo = {
+ shader: referenceFragmentShader,
+ shaderSuccess: true,
+ label: "reference fragment shader",
+ source: referenceFragmentShaderSource
+ };
+ wtu.dumpShadersInfo(gl, window.location.pathname, passMsg, vRefInfo, fRefInfo);
+
+ var vTestInfo = {
+ shader: testVertexShader,
+ shaderSuccess: true,
+ label: "test vertex shader",
+ source: testVertexShaderSource
+ };
+ var fTestInfo = {
+ shader: testFragmentShader,
+ shaderSuccess: true,
+ label: "test fragment shader",
+ source: testFragmentShaderSource
+ };
+ wtu.dumpShadersInfo(gl, window.location.pathname, passMsg, vTestInfo, fTestInfo);
+ }
+
+ var refData = draw(referenceVertexShader, referenceFragmentShader);
+ var refImg = wtu.makeImageFromCanvas(canvas);
+ if (ss == 0) {
+ var testData = draw(testVertexShader, referenceFragmentShader);
+ } else {
+ var testData = draw(referenceVertexShader, testFragmentShader);
+ }
+ var testImg = wtu.makeImageFromCanvas(canvas);
+
+ _reportResults(refData, refImg, testData, testImg, shaderInfo.tolerance,
+ width, height, ctx, imgData, wtu, canvas2d, consoleDiv);
+ }
+ }
+
+ finishTest();
+
+ function draw(vertexShader, fragmentShader) {
+ var program = wtu.createProgram(gl, vertexShader, fragmentShader, testFailed);
+
+ var posLoc = gl.getAttribLocation(program, "aPosition");
+ wtu.setupIndexedQuad(gl, gridRes, posLoc);
+
+ gl.useProgram(program);
+ wtu.clearAndDrawIndexedQuad(gl, gridRes, [0, 0, 255, 255]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from draw");
+
+ var img = new Uint8Array(width * height * 4);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, img);
+ return img;
+ }
+
+};
+
+var runReferenceImageTest = function(params) {
+ var wtu = WebGLTestUtils;
+ var gridRes = params.gridRes;
+ var vertexTolerance = params.tolerance || 0;
+ var fragmentTolerance = vertexTolerance;
+ if ('fragmentTolerance' in params)
+ fragmentTolerance = params.fragmentTolerance || 0;
+
+ description("Testing GLSL feature: " + params.feature);
+
+ var width = 32;
+ var height = 32;
+
+ var consoleDiv = document.getElementById("console");
+ var canvas = document.createElement('canvas');
+ canvas.width = width;
+ canvas.height = height;
+ var gl = wtu.create3DContext(canvas, { antialias: false, premultipliedAlpha: false });
+ if (!gl) {
+ testFailed("context does not exist");
+ finishTest();
+ return;
+ }
+
+ var canvas2d = document.createElement('canvas');
+ canvas2d.width = width;
+ canvas2d.height = height;
+ var ctx = canvas2d.getContext("2d");
+ var imgData = ctx.getImageData(0, 0, width, height);
+
+ // State for reference images for vertex shader tests.
+ // These are drawn with the same tessellated grid as the test vertex
+ // shader so that the interpolation is identical. The grid is reused
+ // from test to test; the colors are changed.
+
+ var indexedQuadForReferenceVertexShader =
+ wtu.setupIndexedQuad(gl, gridRes, 0);
+ var referenceVertexShaderProgram =
+ wtu.setupProgram(gl, [ baseVertexShaderWithColor, baseFragmentShader ],
+ ["aPosition", "aColor"]);
+ var referenceVertexShaderColorBuffer = gl.createBuffer();
+
+ var shaderInfos = [
+ { type: "vertex",
+ input: "color",
+ output: "vColor",
+ vertexShaderTemplate: vertexShaderTemplate,
+ fragmentShaderTemplate: baseFragmentShader,
+ tolerance: vertexTolerance
+ },
+ { type: "fragment",
+ input: "vColor",
+ output: "gl_FragColor",
+ vertexShaderTemplate: baseVertexShader,
+ fragmentShaderTemplate: fragmentShaderTemplate,
+ tolerance: fragmentTolerance
+ }
+ ];
+ for (var ss = 0; ss < shaderInfos.length; ++ss) {
+ var shaderInfo = shaderInfos[ss];
+ var tests = params.tests;
+ var testTypes = params.emuFuncs || (params.bvecTest ? bvecTypes : types);
+ // Test vertex shaders
+ for (var ii = 0; ii < tests.length; ++ii) {
+ var type = testTypes[ii];
+ var isVertex = (ss == 0);
+ debug("");
+ var str = replaceParams(params.testFunc, {
+ func: params.feature,
+ type: type.type,
+ arg0: type.type
+ });
+ var passMsg = "Testing: " + str + " in " + shaderInfo.type + " shader";
+ debug(passMsg);
+
+ var referenceVertexShaderSource = generateReferenceShader(
+ shaderInfo,
+ shaderInfo.vertexShaderTemplate,
+ params,
+ type,
+ tests[ii].source);
+ var referenceFragmentShaderSource = generateReferenceShader(
+ shaderInfo,
+ shaderInfo.fragmentShaderTemplate,
+ params,
+ type,
+ tests[ii].source);
+ var testVertexShaderSource = generateTestShader(
+ shaderInfo,
+ shaderInfo.vertexShaderTemplate,
+ params,
+ tests[ii].source);
+ var testFragmentShaderSource = generateTestShader(
+ shaderInfo,
+ shaderInfo.fragmentShaderTemplate,
+ params,
+ tests[ii].source);
+ var referenceTextureOrArray = generateReferenceImage(
+ gl,
+ tests[ii].generator,
+ isVertex ? gridRes : width,
+ isVertex ? gridRes : height,
+ isVertex);
+
+ debug("");
+ var testVertexShader = wtu.loadShader(gl, testVertexShaderSource, gl.VERTEX_SHADER, testFailed, true);
+ var testFragmentShader = wtu.loadShader(gl, testFragmentShaderSource, gl.FRAGMENT_SHADER, testFailed, true);
+ debug("");
+
+
+ if (parseInt(wtu.getUrlOptions().dumpShaders)) {
+ var vRefInfo = {
+ shader: referenceVertexShader,
+ shaderSuccess: true,
+ label: "reference vertex shader",
+ source: referenceVertexShaderSource
+ };
+ var fRefInfo = {
+ shader: referenceFragmentShader,
+ shaderSuccess: true,
+ label: "reference fragment shader",
+ source: referenceFragmentShaderSource
+ };
+ wtu.dumpShadersInfo(gl, window.location.pathname, passMsg, vRefInfo, fRefInfo);
+
+ var vTestInfo = {
+ shader: testVertexShader,
+ shaderSuccess: true,
+ label: "test vertex shader",
+ source: testVertexShaderSource
+ };
+ var fTestInfo = {
+ shader: testFragmentShader,
+ shaderSuccess: true,
+ label: "test fragment shader",
+ source: testFragmentShaderSource
+ };
+ wtu.dumpShadersInfo(gl, window.location.pathname, passMsg, vTestInfo, fTestInfo);
+ }
+
+ var refData;
+ if (isVertex) {
+ refData = drawVertexReferenceImage(referenceTextureOrArray);
+ } else {
+ refData = drawFragmentReferenceImage(referenceTextureOrArray);
+ }
+ var refImg = wtu.makeImageFromCanvas(canvas);
+ var testData;
+ if (isVertex) {
+ var referenceFragmentShader = wtu.loadShader(gl, referenceFragmentShaderSource, gl.FRAGMENT_SHADER, testFailed);
+ testData = draw(
+ testVertexShader, referenceFragmentShader);
+ } else {
+ var referenceVertexShader = wtu.loadShader(gl, referenceVertexShaderSource, gl.VERTEX_SHADER, testFailed);
+ testData = draw(
+ referenceVertexShader, testFragmentShader);
+ }
+ var testImg = wtu.makeImageFromCanvas(canvas);
+ var testTolerance = shaderInfo.tolerance;
+ // Provide per-test tolerance so that we can increase it only for those desired.
+ if ('tolerance' in tests[ii])
+ testTolerance = tests[ii].tolerance || 0;
+ _reportResults(refData, refImg, testData, testImg, testTolerance,
+ width, height, ctx, imgData, wtu, canvas2d, consoleDiv);
+ }
+ }
+
+ finishTest();
+
+ function draw(vertexShader, fragmentShader) {
+ var program = wtu.createProgram(gl, vertexShader, fragmentShader, testFailed);
+
+ var posLoc = gl.getAttribLocation(program, "aPosition");
+ wtu.setupIndexedQuad(gl, gridRes, posLoc);
+
+ gl.useProgram(program);
+ wtu.clearAndDrawIndexedQuad(gl, gridRes, [0, 0, 255, 255]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from draw");
+
+ var img = new Uint8Array(width * height * 4);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, img);
+ return img;
+ }
+
+ function drawVertexReferenceImage(colors) {
+ gl.bindBuffer(gl.ARRAY_BUFFER, indexedQuadForReferenceVertexShader[0]);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+ gl.bindBuffer(gl.ARRAY_BUFFER, referenceVertexShaderColorBuffer);
+ gl.bufferData(gl.ARRAY_BUFFER, colors, gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(1);
+ gl.vertexAttribPointer(1, 4, gl.UNSIGNED_BYTE, true, 0, 0);
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexedQuadForReferenceVertexShader[1]);
+ gl.useProgram(referenceVertexShaderProgram);
+ wtu.clearAndDrawIndexedQuad(gl, gridRes);
+ gl.disableVertexAttribArray(0);
+ gl.disableVertexAttribArray(1);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from draw");
+
+ var img = new Uint8Array(width * height * 4);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, img);
+ return img;
+ }
+
+ function drawFragmentReferenceImage(texture) {
+ var program = wtu.setupTexturedQuad(gl);
+
+ gl.activeTexture(gl.TEXTURE0);
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ var texLoc = gl.getUniformLocation(program, "tex");
+ gl.uniform1i(texLoc, 0);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no errors from draw");
+
+ var img = new Uint8Array(width * height * 4);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, img);
+ return img;
+ }
+
+ /**
+ * Creates and returns either a Uint8Array (for vertex shaders) or
+ * WebGLTexture (for fragment shaders) containing the reference
+ * image for the function being tested. Exactly how the function is
+ * evaluated, and the size of the returned texture or array, depends on
+ * whether we are testing a vertex or fragment shader. If a fragment
+ * shader, the function is evaluated at the pixel centers. If a
+ * vertex shader, the function is evaluated at the triangle's
+ * vertices.
+ *
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use to generate texture objects.
+ * @param {!function(number,number,number,number): !Array.<number>} generator The reference image generator function.
+ * @param {number} width The width of the texture to generate if testing a fragment shader; the grid resolution if testing a vertex shader.
+ * @param {number} height The height of the texture to generate if testing a fragment shader; the grid resolution if testing a vertex shader.
+ * @param {boolean} isVertex True if generating a reference image for a vertex shader; false if for a fragment shader.
+ * @return {!WebGLTexture|!Uint8Array} The texture object or array that was generated.
+ */
+ function generateReferenceImage(
+ gl,
+ generator,
+ width,
+ height,
+ isVertex) {
+
+ // Note: the math in this function must match that in the vertex and
+ // fragment shader templates above.
+ function computeTexCoord(x) {
+ return x * 0.5 + 0.5;
+ }
+
+ function computeVertexColor(texCoordX, texCoordY) {
+ return [ texCoordX,
+ texCoordY,
+ texCoordX * texCoordY,
+ (1.0 - texCoordX) * texCoordY * 0.5 + 0.5 ];
+ }
+
+ /**
+ * Computes fragment color according to the algorithm used for interpolation
+ * in OpenGL (GLES 2.0 spec 3.5.1, OpenGL 4.3 spec 14.6.1).
+ */
+ function computeInterpolatedColor(texCoordX, texCoordY) {
+ // Calculate grid line indexes below and to the left from texCoord.
+ var gridBottom = Math.floor(texCoordY * gridRes);
+ if (gridBottom == gridRes) {
+ --gridBottom;
+ }
+ var gridLeft = Math.floor(texCoordX * gridRes);
+ if (gridLeft == gridRes) {
+ --gridLeft;
+ }
+
+ // Calculate coordinates relative to the grid cell.
+ var cellX = texCoordX * gridRes - gridLeft;
+ var cellY = texCoordY * gridRes - gridBottom;
+
+ // Barycentric coordinates inside either triangle ACD or ABC
+ // are used as weights for the vertex colors in the corners:
+ // A--B
+ // |\ |
+ // | \|
+ // D--C
+
+ var aColor = computeVertexColor(gridLeft / gridRes, (gridBottom + 1) / gridRes);
+ var bColor = computeVertexColor((gridLeft + 1) / gridRes, (gridBottom + 1) / gridRes);
+ var cColor = computeVertexColor((gridLeft + 1) / gridRes, gridBottom / gridRes);
+ var dColor = computeVertexColor(gridLeft / gridRes, gridBottom / gridRes);
+
+ // Calculate weights.
+ var a, b, c, d;
+
+ if (cellX + cellY < 1) {
+ // In bottom triangle ACD.
+ a = cellY; // area of triangle C-D-(cellX, cellY) relative to ACD
+ c = cellX; // area of triangle D-A-(cellX, cellY) relative to ACD
+ d = 1 - a - c;
+ b = 0;
+ } else {
+ // In top triangle ABC.
+ a = 1 - cellX; // area of the triangle B-C-(cellX, cellY) relative to ABC
+ c = 1 - cellY; // area of the triangle A-B-(cellX, cellY) relative to ABC
+ b = 1 - a - c;
+ d = 0;
+ }
+
+ var interpolated = [];
+ for (var ii = 0; ii < aColor.length; ++ii) {
+ interpolated.push(a * aColor[ii] + b * bColor[ii] + c * cColor[ii] + d * dColor[ii]);
+ }
+ return interpolated;
+ }
+
+ function clamp(value, minVal, maxVal) {
+ return Math.max(minVal, Math.min(value, maxVal));
+ }
+
+ // Evaluates the function at clip coordinates (px,py), storing the
+ // result in the array "pixel". Each channel's result is clamped
+ // between 0 and 255.
+ function evaluateAtClipCoords(px, py, pixel, colorFunc) {
+ var tcx = computeTexCoord(px);
+ var tcy = computeTexCoord(py);
+
+ var color = colorFunc(tcx, tcy);
+
+ var output = generator(color[0], color[1], color[2], color[3]);
+
+ // Multiply by 256 to get even distribution for all values between 0 and 1.
+ // Use rounding rather than truncation to more closely match the GPU's behavior.
+ pixel[0] = clamp(Math.round(256 * output[0]), 0, 255);
+ pixel[1] = clamp(Math.round(256 * output[1]), 0, 255);
+ pixel[2] = clamp(Math.round(256 * output[2]), 0, 255);
+ pixel[3] = clamp(Math.round(256 * output[3]), 0, 255);
+ }
+
+ function generateFragmentReference() {
+ var data = new Uint8Array(4 * width * height);
+
+ var horizTexel = 1.0 / width;
+ var vertTexel = 1.0 / height;
+ var halfHorizTexel = 0.5 * horizTexel;
+ var halfVertTexel = 0.5 * vertTexel;
+
+ var pixel = new Array(4);
+
+ for (var yi = 0; yi < height; ++yi) {
+ for (var xi = 0; xi < width; ++xi) {
+ // The function must be evaluated at pixel centers.
+
+ // Compute desired position in clip space
+ var px = -1.0 + 2.0 * (halfHorizTexel + xi * horizTexel);
+ var py = -1.0 + 2.0 * (halfVertTexel + yi * vertTexel);
+
+ evaluateAtClipCoords(px, py, pixel, computeInterpolatedColor);
+ var index = 4 * (width * yi + xi);
+ data[index + 0] = pixel[0];
+ data[index + 1] = pixel[1];
+ data[index + 2] = pixel[2];
+ data[index + 3] = pixel[3];
+ }
+ }
+
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0,
+ gl.RGBA, gl.UNSIGNED_BYTE, data);
+ return texture;
+ }
+
+ function generateVertexReference() {
+ // We generate a Uint8Array which contains the evaluation of the
+ // function at the vertices of the triangle mesh. It is expected
+ // that the width and the height are identical, and equivalent
+ // to the grid resolution.
+ if (width != height) {
+ throw "width and height must be equal";
+ }
+
+ var texSize = 1 + width;
+ var data = new Uint8Array(4 * texSize * texSize);
+
+ var step = 2.0 / width;
+
+ var pixel = new Array(4);
+
+ for (var yi = 0; yi < texSize; ++yi) {
+ for (var xi = 0; xi < texSize; ++xi) {
+ // The function is evaluated at the triangles' vertices.
+
+ // Compute desired position in clip space
+ var px = -1.0 + (xi * step);
+ var py = -1.0 + (yi * step);
+
+ evaluateAtClipCoords(px, py, pixel, computeVertexColor);
+ var index = 4 * (texSize * yi + xi);
+ data[index + 0] = pixel[0];
+ data[index + 1] = pixel[1];
+ data[index + 2] = pixel[2];
+ data[index + 3] = pixel[3];
+ }
+ }
+
+ return data;
+ }
+
+ //----------------------------------------------------------------------
+ // Body of generateReferenceImage
+ //
+
+ if (isVertex) {
+ return generateVertexReference();
+ } else {
+ return generateFragmentReference();
+ }
+ }
+};
+
+return {
+ /**
+ * runs a bunch of GLSL tests using the passed in parameters
+ * The parameters are:
+ *
+ * feature:
+ * the name of the function being tested (eg, sin, dot,
+ * normalize)
+ *
+ * testFunc:
+ * The prototype of function to be tested not including the
+ * return type.
+ *
+ * emuFunc:
+ * A base function that can be used to generate emulation
+ * functions. Example for 'ceil'
+ *
+ * float $(func)_base(float value) {
+ * float m = mod(value, 1.0);
+ * return m != 0.0 ? (value + 1.0 - m) : value;
+ * }
+ *
+ * args:
+ * The arguments to the function
+ *
+ * baseArgs: (optional)
+ * The arguments when a base function is used to create an
+ * emulation function. For example 'float sign_base(float v)'
+ * is used to implemenent vec2 sign_emu(vec2 v).
+ *
+ * simpleEmu:
+ * if supplied, the code that can be used to generate all
+ * functions for all types.
+ *
+ * Example for 'normalize':
+ *
+ * $(type) $(func)_emu($(args)) {
+ * return value / length(value);
+ * }
+ *
+ * gridRes: (optional)
+ * The resolution of the mesh to generate. The default is a
+ * 1x1 grid but many vertex shaders need a higher resolution
+ * otherwise the only values passed in are the 4 corners
+ * which often have the same value.
+ *
+ * tests:
+ * The code for each test. It is assumed the tests are for
+ * float, vec2, vec3, vec4 in that order.
+ *
+ * tolerance: (optional)
+ * Allow some tolerance in the comparisons. The tolerance is applied to
+ * both vertex and fragment shaders. The default tolerance is 0, meaning
+ * the values have to be identical.
+ *
+ * fragmentTolerance: (optional)
+ * Specify a tolerance which only applies to fragment shaders. The
+ * fragment-only tolerance will override the shared tolerance for
+ * fragment shaders if both are specified. Fragment shaders usually
+ * use mediump float precision so they sometimes require higher tolerance
+ * than vertex shaders which use highp by default.
+ */
+ runFeatureTest: runFeatureTest,
+
+ /*
+ * Runs a bunch of GLSL tests using the passed in parameters
+ *
+ * The parameters are:
+ *
+ * tests:
+ * Array of tests. For each test the following parameters are expected
+ *
+ * name:
+ * some description of the test
+ * reference:
+ * parameters for the reference shader (see below)
+ * test:
+ * parameters for the test shader (see below)
+ *
+ * The parameter for the reference and test shaders are
+ *
+ * shader: the GLSL for the shader
+ * subs: any substitutions you wish to define for the shader.
+ *
+ * Each shader is created from a basic template that
+ * defines an input and an output. You can see the
+ * templates at the top of this file. The input and output
+ * change depending on whether or not we are generating
+ * a vertex or fragment shader.
+ *
+ * All this code function does is a bunch of string substitutions.
+ * A substitution is defined by $(name). If name is found in
+ * the 'subs' parameter it is replaced. 4 special names exist.
+ *
+ * 'input' the input to your GLSL. Always a vec4. All change
+ * from 0 to 1 over the quad to be drawn.
+ *
+ * 'output' the output color. Also a vec4
+ *
+ * 'emu' a place to insert extra stuff
+ * 'extra' a place to insert extra stuff.
+ *
+ * You can think of the templates like this
+ *
+ * $(extra)
+ * $(emu)
+ *
+ * void main() {
+ * // do math to calculate input
+ * ...
+ *
+ * $(shader)
+ * }
+ *
+ * Your shader first has any subs you provided applied as well
+ * as 'input' and 'output'
+ *
+ * It is then inserted into the template which is also provided
+ * with your subs.
+ *
+ * gridRes: (optional)
+ * The resolution of the mesh to generate. The default is a
+ * 1x1 grid but many vertex shaders need a higher resolution
+ * otherwise the only values passed in are the 4 corners
+ * which often have the same value.
+ *
+ * tolerance: (optional)
+ * Allow some tolerance in the comparisons. The tolerance is applied to
+ * both vertex and fragment shaders. The default tolerance is 0, meaning
+ * the values have to be identical.
+ *
+ * fragmentTolerance: (optional)
+ * Specify a tolerance which only applies to fragment shaders. The
+ * fragment-only tolerance will override the shared tolerance for
+ * fragment shaders if both are specified. Fragment shaders usually
+ * use mediump float precision so they sometimes require higher tolerance
+ * than vertex shaders which use highp.
+ */
+ runBasicTest: runBasicTest,
+
+ /**
+ * Runs a bunch of GLSL tests using the passed in parameters. The
+ * expected results are computed as a reference image in JavaScript
+ * instead of on the GPU. The parameters are:
+ *
+ * feature:
+ * the name of the function being tested (eg, sin, dot,
+ * normalize)
+ *
+ * testFunc:
+ * The prototype of function to be tested not including the
+ * return type.
+ *
+ * args:
+ * The arguments to the function
+ *
+ * gridRes: (optional)
+ * The resolution of the mesh to generate. The default is a
+ * 1x1 grid but many vertex shaders need a higher resolution
+ * otherwise the only values passed in are the 4 corners
+ * which often have the same value.
+ *
+ * tests:
+ * Array of tests. It is assumed the tests are for float, vec2,
+ * vec3, vec4 in that order. For each test the following
+ * parameters are expected:
+ *
+ * source: the GLSL source code for the tests
+ *
+ * generator: a JavaScript function taking four parameters
+ * which evaluates the same function as the GLSL source,
+ * returning its result as a newly allocated array.
+ *
+ * tolerance: (optional) a per-test tolerance.
+ *
+ * extra: (optional)
+ * Extra GLSL code inserted at the top of each test's shader.
+ *
+ * tolerance: (optional)
+ * Allow some tolerance in the comparisons. The tolerance is applied to
+ * both vertex and fragment shaders. The default tolerance is 0, meaning
+ * the values have to be identical.
+ *
+ * fragmentTolerance: (optional)
+ * Specify a tolerance which only applies to fragment shaders. The
+ * fragment-only tolerance will override the shared tolerance for
+ * fragment shaders if both are specified. Fragment shaders usually
+ * use mediump float precision so they sometimes require higher tolerance
+ * than vertex shaders which use highp.
+ */
+ runReferenceImageTest: runReferenceImageTest,
+
+ none: false
+};
+
+}());
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256-with-128-alpha.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256-with-128-alpha.png
new file mode 100644
index 000000000..183e55de2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256-with-128-alpha.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256.png
new file mode 100644
index 000000000..01e486b5a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-default-gamma.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-default-gamma.png
new file mode 100644
index 000000000..a5a89beb7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-default-gamma.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma0.1.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma0.1.png
new file mode 100644
index 000000000..637c792da
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma0.1.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma1.0.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma1.0.png
new file mode 100644
index 000000000..40ceeb046
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma1.0.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma2.0.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma2.0.png
new file mode 100644
index 000000000..73fcf7b41
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma2.0.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma4.0.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma4.0.png
new file mode 100644
index 000000000..d878f1e96
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma4.0.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma9.0.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma9.0.png
new file mode 100644
index 000000000..8a69ed1f3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma9.0.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp.png
new file mode 100644
index 000000000..a5a89beb7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/green-2x2-16bit.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/green-2x2-16bit.png
new file mode 100644
index 000000000..7fcb96960
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/green-2x2-16bit.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/intArrayUniformShader.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/intArrayUniformShader.vert
new file mode 100644
index 000000000..d82074e47
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/intArrayUniformShader.vert
@@ -0,0 +1,8 @@
+uniform int ival;
+uniform int ival2[2];
+
+void main()
+{
+ int sum = ival + ival2[0] + ival2[1];
+ gl_Position = vec4(sum, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/intUniformShader.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/intUniformShader.vert
new file mode 100644
index 000000000..051c05e2b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/intUniformShader.vert
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2009 The Chromium Authors. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+uniform int ival;
+uniform ivec2 ival2;
+uniform ivec3 ival3;
+uniform ivec4 ival4;
+
+void main()
+{
+ int sum = ival
+ + ival2[0] + ival2[1]
+ + ival3[0] + ival3[1] + ival3[2]
+ + ival4[0] + ival4[1] + ival4[2] + ival4[3];
+ gl_Position = vec4(sum, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/iterable-test.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/iterable-test.js
new file mode 100644
index 000000000..31abe5011
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/iterable-test.js
@@ -0,0 +1,173 @@
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+IterableTest = (function() {
+
+ var wtu = WebGLTestUtils;
+
+ function run(test, iterations) {
+ var target = iterations || 10;
+ var count = 0;
+
+ function doNextTest() {
+ ++count;
+ debug("Test " + count + " of " + target);
+ var success = test();
+ if (count < target && success !== false) {
+ wtu.waitForComposite(doNextTest);
+ //setTimeout(doNextTest, 100);
+ } else {
+ finishTest();
+ }
+ }
+
+ doNextTest();
+ }
+
+ // Creates a canvas and a texture then exits. There are
+ // no references to either so both should be garbage collected.
+ function createContextCreationAndDestructionTest() {
+ var textureSize = null;
+
+ return function() {
+ var canvas = document.createElement("canvas");
+ // This is safe for any device. See drawingBufferWidth in spec.
+ canvas.width = 2048;
+ canvas.height = 2048;
+ var gl = wtu.create3DContext(canvas);
+ if (textureSize === null) {
+ var maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
+ textureSize = Math.min(1024, maxTextureSize);
+ }
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, textureSize, textureSize, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ null);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors");
+
+ return true;
+ };
+ }
+
+ // Creates many small canvases and attaches them to the DOM.
+ // This tests an edge case discovered in Chrome where the creation of multiple
+ // WebGL contexts would eventually lead to context creation failure.
+ // (crbug.com/319265) The test does not require that old contexts remain
+ // valid, only that new ones can be created.
+ function createContextCreationTest() {
+ return function() {
+ var canvas = document.createElement("canvas");
+ canvas.width = 1;
+ canvas.height = 1;
+
+ document.body.appendChild(canvas);
+
+ var gl = wtu.create3DContext(canvas);
+ if (!gl) {
+ return false;
+ }
+
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors");
+
+ return true;
+ };
+ }
+
+ // Draws rectangle on a passed canvas with preserveDrawingBuffer
+ // and antialiasing ON, tests rect color on every iteration.
+ function createMultisampleCorruptionTest(gl) {
+ var lastContext = null;
+ // Allocate a read back buffer in advance and reuse it for all iterations
+ // to avoid memory issues because of late garbage collection.
+ var readBackBuf = new Uint8Array(gl.canvas.width * gl.canvas.height * 4);
+
+ var program = wtu.loadStandardProgram(gl);
+ var uniforms = wtu.getUniformMap(gl, program);
+ gl.useProgram(program);
+
+ gl.clearColor(1.0, 0.0, 0.0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,2.5,0, 1.5,1.5,0, 2.5,1.5,0 ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+ gl.vertexAttrib3f(1, 0.0, 0.0, 1.0);
+
+ var identityMat = new Float32Array([
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1
+ ]);
+
+ gl.uniformMatrix4fv(uniforms.u_modelViewProjMatrix.location, false, identityMat);
+
+ function test() {
+ var gl2 = wtu.create3DContext(null, {antialias: true});
+
+ gl2.canvas.width = gl2.canvas.height = 1024;
+ gl2.canvas.style.width = gl2.canvas.style.height = "1px";
+ document.body.appendChild(gl2.canvas);
+
+ gl2.clearColor(1.0, 0.0, 0.0, 1.0);
+ gl2.clear(gl2.COLOR_BUFFER_BIT);
+
+ if(lastContext) {
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+ var msg = "Canvas should be red";
+ wtu.checkCanvasRectColor(gl,
+ 0, 0, gl.canvas.width, gl.canvas.height,
+ [255, 0, 0, 255], null,
+ function() {
+ testPassed(msg);
+ },
+ function() {
+ testFailed(msg);
+ return false;
+ },
+ debug, readBackBuf);
+ document.body.removeChild(lastContext.canvas);
+ }
+
+ lastContext = gl2;
+ return true;
+ };
+
+ // First pass does initialization
+ test();
+
+ return test;
+ }
+
+ return {
+ run: run,
+
+ createContextCreationAndDestructionTest: createContextCreationAndDestructionTest,
+ createContextCreationTest: createContextCreationTest,
+ createMultisampleCorruptionTest: createMultisampleCorruptionTest
+ };
+
+})();
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/matUniformShader.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/matUniformShader.vert
new file mode 100644
index 000000000..123a4be03
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/matUniformShader.vert
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2009 The Chromium Authors. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+uniform mat2 mval2;
+uniform mat3 mval3;
+uniform mat4 mval4;
+
+void main()
+{
+ gl_Position = vec4(mval2 * vec2(1.0, 2.0), 0.0, 0.0)
+ + vec4(mval3 * vec3(1.0, 2.0, 3.0), 0.0)
+ + mval4 * vec4(1.0, 2.0, 3.0, 4.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/noopUniformShader.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/noopUniformShader.frag
new file mode 100644
index 000000000..b2dfc9f1d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/noopUniformShader.frag
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2009 The Chromium Authors. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+void main()
+{
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/noopUniformShader.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/noopUniformShader.vert
new file mode 100644
index 000000000..821e440d4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/noopUniformShader.vert
@@ -0,0 +1,4 @@
+void main()
+{
+ gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/npot-video.mp4 b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/npot-video.mp4
new file mode 100644
index 000000000..59f5f774a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/npot-video.mp4
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/npot-video.theora.ogv b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/npot-video.theora.ogv
new file mode 100644
index 000000000..4458678fb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/npot-video.theora.ogv
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/npot-video.webmvp8.webm b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/npot-video.webmvp8.webm
new file mode 100644
index 000000000..47277bdaa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/npot-video.webmvp8.webm
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/oes-texture-float-and-half-float-linear.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/oes-texture-float-and-half-float-linear.js
new file mode 100644
index 000000000..7cc06312d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/oes-texture-float-and-half-float-linear.js
@@ -0,0 +1,183 @@
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+function generateTest(extensionTypeName, extensionName, pixelType, prologue) {
+ var wtu = WebGLTestUtils;
+ var gl = null;
+ var successfullyParsed = false;
+
+ var init = function()
+ {
+ description("This test verifies the functionality of the " + extensionName + " extension, if it is available.");
+
+ var canvas = document.getElementById("canvas");
+ gl = wtu.create3DContext(canvas);
+
+ if (!prologue(gl, extensionTypeName)) {
+ finishTest();
+ return;
+ }
+
+ // Before the extension is enabled
+ var extensionEnabled = false;
+ runTestSuite(extensionEnabled);
+
+ if (!gl.getExtension(extensionName))
+ testPassed("No " + extensionName + " support -- this is legal");
+ else {
+ // After the extension is enabled
+ extensionEnabled = true;
+ runTestSuite(extensionEnabled);
+ }
+
+ finishTest();
+ }
+
+ function runTestSuite(extensionEnabled)
+ {
+ var magF = [gl.NEAREST, gl.LINEAR];
+ var minF = [gl.NEAREST, gl.LINEAR, gl.NEAREST_MIPMAP_NEAREST, gl.NEAREST_MIPMAP_LINEAR, gl.LINEAR_MIPMAP_NEAREST, gl.LINEAR_MIPMAP_LINEAR];
+ var tex2DFShader = [
+ 'uniform sampler2D tex;',
+ 'void main() {',
+ ' gl_FragData[0] = texture2D(tex, vec2(0.5, 0.5)) * vec4(4.0, 2.0, 2.0, 1);',
+ '}'].join('\n');
+
+ var positionVertexShader = [
+ 'attribute vec4 vPosition;',
+ 'void main() {',
+ ' gl_Position = vPosition;',
+ '}'].join('\n');
+
+ var texCubeFShader = [
+ 'uniform samplerCube tex;',
+ 'void main() {',
+ ' gl_FragColor = textureCube(tex, normalize(vec3(0.5, 0.5, 1))) * vec4(4.0, 2.0, 2.0, 1);',
+ '}'].join('\n');
+
+ var vs = wtu.loadShader(gl, positionVertexShader, gl.VERTEX_SHADER);
+ var fs_2d = wtu.loadShader(gl, tex2DFShader, gl.FRAGMENT_SHADER);
+ var fs_cube = wtu.loadShader(gl, texCubeFShader, gl.FRAGMENT_SHADER);
+
+ // TEXTURE_2D
+ var program = wtu.setupProgram(gl, [vs, fs_2d]);
+ gl.useProgram(program);
+ wtu.setupUnitQuad(gl);
+ for (var kk = 0; kk < 2; ++kk) {
+ for (var ii = 0; ii < 6; ++ii) {
+ var linear = false;
+ if (magF[kk] == gl.LINEAR || (minF[ii] != gl.NEAREST && minF[ii] != gl.NEAREST_MIPMAP_NEAREST))
+ linear = true;
+ var color = (!extensionEnabled && linear) ? [0, 0, 0, 255] : [255, 255, 255, 255];
+ runEachTest(gl.TEXTURE_2D, magF[kk], minF[ii], linear, extensionEnabled, color);
+ }
+ }
+
+ // TEXTURE_CUBE_MAP
+ var programCube = wtu.setupProgram(gl, [vs, fs_cube]);
+ gl.useProgram(programCube);
+ wtu.setupUnitQuad(gl);
+ for (var kk = 0; kk < 2; ++kk) {
+ for (var ii = 0; ii < 6; ++ii) {
+ var linear = false;
+ if (magF[kk] == gl.LINEAR || (minF[ii] != gl.NEAREST && minF[ii] != gl.NEAREST_MIPMAP_NEAREST))
+ linear = true;
+ var color = (!extensionEnabled && linear) ? [0, 0, 0, 255] : [255, 255, 255, 255];
+ runEachTest(gl.TEXTURE_CUBE_MAP, magF[kk], minF[ii], linear, extensionEnabled, color);
+ }
+ }
+ }
+
+ function runEachTest(textureTarget, magFilter, minFilter, linear, extensionEnabled, expected)
+ {
+ var format = gl.RGBA;
+ var numberOfChannels = 4;
+ debug("");
+ debug("testing target: " + wtu.glEnumToString(gl,textureTarget) +
+ ", testing format: " + wtu.glEnumToString(gl, format) +
+ ", magFilter is: " + wtu.glEnumToString(gl, magFilter) +
+ ", minFilter is: " + wtu.glEnumToString(gl, minFilter) +
+ ", " + extensionName + " is " + (extensionEnabled ? "enabled": "not enabled")
+ );
+
+ // Generate data.
+ var width = 4;
+ var height = 4;
+ var canvas2d = document.createElement('canvas');
+ canvas2d.width = width;
+ canvas2d.height = height;
+ var ctx2d = canvas2d.getContext('2d');
+ var color = [64, 128, 128, 255];
+ ctx2d.fillStyle = "rgba(" + color[0] + "," + color[1] + "," + color[2] + "," + color[3] + ")";
+ ctx2d.fillRect(0, 0, width, height);
+
+ var texture = gl.createTexture();
+ gl.bindTexture(textureTarget, texture);
+ gl.texParameteri(textureTarget, gl.TEXTURE_MAG_FILTER, magFilter);
+ gl.texParameteri(textureTarget, gl.TEXTURE_MIN_FILTER, minFilter);
+ gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+
+ if (textureTarget == gl.TEXTURE_2D) {
+ gl.texImage2D(gl.TEXTURE_2D, 0, format, format, gl[pixelType], canvas2d);
+ if (minFilter != gl.NEAREST && minFilter != gl.LINEAR) {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors during texture setup");
+ gl.generateMipmap(gl.TEXTURE_2D);
+ if (gl.getError() != gl.NO_ERROR) {
+ debug("generateMipmap failed for floating-point TEXTURE_2D -- this is legal -- skipping the rest of this test");
+ return;
+ }
+ }
+ } else if (textureTarget == gl.TEXTURE_CUBE_MAP) {
+ var targets = [
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z];
+ for (var tt = 0; tt < targets.length; ++tt)
+ gl.texImage2D(targets[tt], 0, format, format, gl[pixelType], canvas2d);
+ if (minFilter != gl.NEAREST && minFilter != gl.LINEAR) {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors during texture setup");
+ gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
+ if (gl.getError() != gl.NO_ERROR) {
+ debug("generateMipmap failed for floating-point TEXTURE_CUBE_MAP -- this is legal -- skipping the rest of this test");
+ return;
+ }
+ }
+ }
+ wtu.clearAndDrawUnitQuad(gl);
+ if (!linear) {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, extensionTypeName + " texture with non-Linear filter should succeed with NO_ERROR no matter whether " + extensionName + " is enabled or not");
+ } else if (!extensionEnabled) {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, extensionTypeName + " texture with Linear filter should produce [0, 0, 0, 1.0] with NO_ERROR if " + extensionName + " isn't enabled");
+ } else {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, extensionTypeName + " texture with Linear filter should succeed with NO_ERROR if " + extensionTypeName + " is enabled");
+ }
+
+ wtu.checkCanvas(gl, expected, "should be " + expected[0] + "," + expected[1] + "," + expected[2] + "," + expected[3]);
+ }
+
+ return init;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/ogles-tests.css b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/ogles-tests.css
new file mode 100644
index 000000000..42269c8b6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/ogles-tests.css
@@ -0,0 +1,30 @@
+canvas {
+ background-color: white;
+ background-size: 8px 8px;
+}
+
+.shader-source {
+ border: 1px dashed black;
+ padding: 1em;
+}
+
+.shader-source li:nth-child(odd) { background: #f8f8f8; }
+.shader-source li:nth-child(even) { background: #f0f0f0; }
+
+.testimages {
+}
+
+.testimages br {
+ clear: both;
+}
+
+.testimages > div {
+ float: left;
+ margin: 1em;
+}
+
+IMG {
+ border: 1px solid black;
+ width: 250px;
+ height: 250px;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/opengl_logo.jpg b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/opengl_logo.jpg
new file mode 100644
index 000000000..e3b70bef3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/opengl_logo.jpg
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/out-of-bounds-test.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/out-of-bounds-test.js
new file mode 100644
index 000000000..1da05eb8d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/out-of-bounds-test.js
@@ -0,0 +1,329 @@
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+'use strict';
+
+var OutOfBoundsTest = (function() {
+
+var runCommonInvalidValueTests = function(callTemplate, gl, wtu, ext) {
+ wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, wtu.replaceParams(callTemplate, {count: -1, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, wtu.replaceParams(callTemplate, {count: 0, type: 'gl.UNSIGNED_BYTE', offset: -1}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, wtu.replaceParams(callTemplate, {count: -1, type: 'gl.UNSIGNED_BYTE', offset: 1}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, wtu.replaceParams(callTemplate, {count: 1, type: 'gl.UNSIGNED_BYTE', offset: -1}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, wtu.replaceParams(callTemplate, {count: '0xffffffff', type: 'gl.UNSIGNED_BYTE', offset: 0}));
+};
+
+var setupProgramAndBindVertexArray = function(gl, wtu) {
+ var program = wtu.loadStandardProgram(gl);
+
+ gl.useProgram(program);
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.enableVertexAttribArray(0);
+
+ return program;
+};
+
+var setupProgram2 = function(gl, wtu) {
+ var vshader = [
+ 'attribute vec3 aOne;',
+ 'attribute vec2 aTwo;',
+ 'void main() {',
+ ' gl_Position = vec4(aOne, 1.0) + vec4(aTwo, 0.0, 1.0);',
+ '}'
+ ].join('\n');
+
+ var fshader = [
+ 'void main() {',
+ ' gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);',
+ '}'
+ ].join('\n');
+
+ var program = wtu.setupProgram(gl, [vshader, fshader], [ "aOne", "aTwo" ]);
+ if (!program) {
+ testFailed("failed to create test program");
+ }
+ return program;
+};
+
+var runDrawArraysTest = function(callTemplate, gl, wtu, ext) {
+ var program = setupProgramAndBindVertexArray(gl, wtu);
+
+ debug("Test empty buffer")
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ ]), gl.STATIC_DRAW);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 1}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 10000}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 10000000000000}));
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 1, count: 0}));
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 0, count: 0}));
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 100, count: 0}));
+ runCommonInvalidValueTests(callTemplate, gl, wtu, ext);
+
+ debug("")
+ debug("Test buffer with 3 float vectors")
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 0, count: 3}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 3, count: 2}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 10000}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 10000000000000}));
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 0, count: 0}));
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 100, count: 0}));
+ runCommonInvalidValueTests(callTemplate, gl, wtu, ext);
+
+ debug("")
+ debug("Test buffer with interleaved (3+2) float vectors")
+
+ setupProgram2(gl, wtu);
+
+ var vbo = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ // enough for 9 vertices, so 3 triangles
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(9*5), gl.STATIC_DRAW);
+
+ // bind first 3 elements, with a stride of 5 float elements
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 5*4, 0);
+ // bind 2 elements, starting after the first 3; same stride of 5 float elements
+ gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 5*4, 3*4);
+
+ gl.enableVertexAttribArray(0);
+ gl.enableVertexAttribArray(1);
+
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 0, count: 9}));
+
+ // negative values must generate INVALID_VALUE; they can never be valid
+ wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, wtu.replaceParams(callTemplate, {offset: 0, count: -500}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, wtu.replaceParams(callTemplate, {offset: -200, count: 1}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, wtu.replaceParams(callTemplate, {offset: -200, count: -500}));
+
+ // 0xffffffff needs to convert to a 'long' IDL argument as -1, as per
+ // WebIDL 4.1.7. JS ToInt32(0xffffffff) == -1. Thus INVALID_VALUE.
+ wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, wtu.replaceParams(callTemplate, {offset: 0, count: '0xffffffff'}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, wtu.replaceParams(callTemplate, {offset: '0xffffffff', count: '0xffffffff'}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, wtu.replaceParams(callTemplate, {offset: '0xffffffff', count: 1}));
+
+ // values that could otherwise be valid but aren't due to bindings generate
+ // INVALID_OPERATION
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 200}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: '0x7fffffff'}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: '0x7fffffff', count: 1}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: '0x7fffffff', count: '0x7fffffff'}));
+};
+
+var runDrawElementsTest = function(callTemplate, gl, wtu, ext) {
+ var program = setupProgramAndBindVertexArray(gl, wtu);
+
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ var indexObject = gl.createBuffer();
+
+ debug('Test empty index buffer');
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexObject);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint8Array([ ]), gl.STATIC_DRAW);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {count: 0, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 3, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 10000, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 10000000000000, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 1, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ runCommonInvalidValueTests(callTemplate, gl, wtu, ext);
+
+ debug('');
+ debug('Test buffer with 3 byte indexes');
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexObject);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint8Array([ 0, 1, 2 ]), gl.STATIC_DRAW);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {count: 3, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 3, type: 'gl.UNSIGNED_BYTE', offset: 2}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 10000, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 10000000000000, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ runCommonInvalidValueTests(callTemplate, gl, wtu, ext);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {count: 0, type: 'gl.UNSIGNED_BYTE', offset: 4}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: '0x7fffffff', type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: '0x7fffffff', type: 'gl.UNSIGNED_BYTE', offset: '0x7fffffff'}));
+
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, 'gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, (new Uint8Array([ 3, 0, 1, 2 ])).subarray(1), gl.STATIC_DRAW)');
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {count: 3, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, 'gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint8Array([ 3, 0, 1]))');
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 3, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, 'gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, (new Uint8Array([ 3, 0, 1, 2 ])).subarray(1))');
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {count: 3, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {count: 0, type: 'gl.UNSIGNED_BYTE', offset: 0}));
+
+ debug('');
+ debug('Test buffer with interleaved (3+2) float vectors');
+
+ setupProgram2(gl, wtu);
+
+ var vbo = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ // enough for 9 vertices, so 3 triangles
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(9*5), gl.STATIC_DRAW);
+
+ // bind first 3 elements, with a stride of 5 float elements
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 5*4, 0);
+ // bind 2 elements, starting after the first 3; same stride of 5 float elements
+ gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 5*4, 3*4);
+
+ gl.enableVertexAttribArray(0);
+ gl.enableVertexAttribArray(1);
+
+ var ebo = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ebo);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(
+ [ 0, 1, 2,
+ 1, 2, 0,
+ 2, 0, 1,
+ 200, 200, 200,
+ 0x7fff, 0x7fff, 0x7fff,
+ 0xffff, 0xffff, 0xffff ]),
+ gl.STATIC_DRAW);
+
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {count: 9, type: 'gl.UNSIGNED_SHORT', offset: 0}));
+
+
+ // invalid operation with indices that would be valid with correct bindings
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 9, type: 'gl.UNSIGNED_SHORT', offset: 1000}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 12, type: 'gl.UNSIGNED_SHORT', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 15, type: 'gl.UNSIGNED_SHORT', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 18, type: 'gl.UNSIGNED_SHORT', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 3, type: 'gl.UNSIGNED_SHORT', offset: 2*15}));
+
+ // 0xffffffff needs to convert to a 'long' IDL argument as -1, as per
+ // WebIDL 4.1.7. JS ToInt32(0xffffffff) == -1. Thus INVALID_VALUE.
+ wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, wtu.replaceParams(callTemplate, {count: '0xffffffff', type: 'gl.UNSIGNED_SHORT', offset: 0}));
+ // offset is defined as GLintptr, which is long long in IDL (64-bit).
+ // 2^32 - 1 should not overflow, and only result in INVALID_OPERATION.
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 1, type: 'gl.UNSIGNED_SHORT', offset: '0xffffffff'}));
+
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: '0x7fffffff', type: 'gl.UNSIGNED_SHORT', offset: 0}));
+
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {count: 0, type: 'gl.UNSIGNED_SHORT', offset: 0}));
+
+ // invalid operation with offset that's not a multiple of the type size
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {count: 6, type: 'gl.UNSIGNED_SHORT', offset: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 6, type: 'gl.UNSIGNED_SHORT', offset: 1}));
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {count: 6, type: 'gl.UNSIGNED_SHORT', offset: 2}));
+
+ // invalid operation if no buffer is bound to ELEMENT_ARRAY_BUFFER
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 6, type: 'gl.UNSIGNED_SHORT', offset: 0}));
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ebo);
+
+ debug('');
+ debug('Test buffer setting attrib 0 to a buffer too small and disable it.');
+ var smallVBO = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, smallVBO);
+ gl.bufferData(gl.ARRAY_BUFFER, 1, gl.STATIC_DRAW);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0x10);
+ gl.disableVertexAttribArray(0);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {count: 6, type: 'gl.UNSIGNED_SHORT', offset: 2}));
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {count: 6, type: 'gl.UNSIGNED_SHORT', offset: 2}));
+};
+
+var runInstancedTest = function(callTemplate, gl, wtu, ext) {
+ setupProgram2(gl, wtu);
+
+ // Initialize non-instanced attribute data.
+ // Enough for 9 vertices, so 3 triangles.
+ var vbo = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(9*3), gl.STATIC_DRAW);
+
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ // Setup buffer for instanced attribute data.
+ var vbo2 = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo2);
+ gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, 0);
+
+ gl.enableVertexAttribArray(0);
+ gl.enableVertexAttribArray(1);
+
+ debug('Test out-of-range instanced attributes');
+ debug('');
+
+ debug('Test with an empty buffer for the instanced attribute');
+ ext.vertexAttribDivisorANGLE(1, 1);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 0}));
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 0, count: 10000, primcount: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 1}));
+
+ debug('Test with a buffer with 1 float for the instanced attribute');
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(1), gl.STATIC_DRAW);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 0}));
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 0, count: 10000, primcount: 0}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 1}));
+
+ debug('');
+ debug('Test with a buffer with 2 floats for the instanced attribute');
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(2), gl.STATIC_DRAW);
+ debug('Divisor 1');
+ ext.vertexAttribDivisorANGLE(1, 1);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 1}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 2}));
+ debug('Divisor 3');
+ ext.vertexAttribDivisorANGLE(1, 3);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 3}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 4}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 10000}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: '0x7fffffff'}));
+
+ debug('');
+ debug('Test with a buffer with 4 floats for the instanced attribute');
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(4), gl.STATIC_DRAW);
+ debug('Divisor 1');
+ ext.vertexAttribDivisorANGLE(1, 1);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 2}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 3}));
+ debug('Divisor 2');
+ ext.vertexAttribDivisorANGLE(1, 2);
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 4}));
+ wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, wtu.replaceParams(callTemplate, {offset: 0, count: 9, primcount: 5}));
+};
+
+var runDrawArraysInstancedTest = function(callTemplate, gl, wtu, ext) {
+ runInstancedTest(callTemplate, gl, wtu, ext);
+};
+
+var runDrawElementsInstancedTest = function(callTemplate, gl, wtu, ext) {
+ var ebo = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ebo);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint8Array(
+ [ 0, 1, 2,
+ 5, 4, 3,
+ 6, 7, 8 ]),
+ gl.STATIC_DRAW);
+ callTemplate = wtu.replaceParams(callTemplate, {type: 'gl.UNSIGNED_BYTE', offset: '$(offset)', count: '$(count)', primcount: '$(primcount)'});
+ runInstancedTest(callTemplate, gl, wtu, ext);
+};
+
+return {
+ runDrawArraysTest: runDrawArraysTest,
+ runDrawArraysInstancedTest: runDrawArraysInstancedTest,
+ runDrawElementsTest: runDrawElementsTest,
+ runDrawElementsInstancedTest: runDrawElementsInstancedTest
+};
+
+})();
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/pnglib.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/pnglib.js
new file mode 100644
index 000000000..d2a9b99e0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/pnglib.js
@@ -0,0 +1,207 @@
+/**
+* A handy class to calculate color values.
+*
+* @version 1.0
+* @author Robert Eisele <robert@xarg.org>
+* @copyright Copyright (c) 2010, Robert Eisele
+* @link http://www.xarg.org/2010/03/generate-client-side-png-files-using-javascript/
+* @license http://www.opensource.org/licenses/bsd-license.php BSD License
+*
+*/
+
+(function() {
+
+ // helper functions for that ctx
+ function write(buffer, offs) {
+ for (var i = 2; i < arguments.length; i++) {
+ for (var j = 0; j < arguments[i].length; j++) {
+ buffer[offs++] = arguments[i].charAt(j);
+ }
+ }
+ }
+
+ function byte2(w) {
+ return String.fromCharCode((w >> 8) & 255, w & 255);
+ }
+
+ function byte4(w) {
+ return String.fromCharCode((w >> 24) & 255, (w >> 16) & 255, (w >> 8) & 255, w & 255);
+ }
+
+ function byte2lsb(w) {
+ return String.fromCharCode(w & 255, (w >> 8) & 255);
+ }
+
+ window.PNGlib = function(width,height,depth) {
+
+ this.width = width;
+ this.height = height;
+ this.depth = depth;
+
+ // pixel data and row filter identifier size
+ this.pix_size = height * (width + 1);
+
+ // deflate header, pix_size, block headers, adler32 checksum
+ this.data_size = 2 + this.pix_size + 5 * Math.floor((0xfffe + this.pix_size) / 0xffff) + 4;
+
+ // offsets and sizes of Png chunks
+ this.ihdr_offs = 0; // IHDR offset and size
+ this.ihdr_size = 4 + 4 + 13 + 4;
+ this.plte_offs = this.ihdr_offs + this.ihdr_size; // PLTE offset and size
+ this.plte_size = 4 + 4 + 3 * depth + 4;
+ this.trns_offs = this.plte_offs + this.plte_size; // tRNS offset and size
+ this.trns_size = 4 + 4 + depth + 4;
+ this.idat_offs = this.trns_offs + this.trns_size; // IDAT offset and size
+ this.idat_size = 4 + 4 + this.data_size + 4;
+ this.iend_offs = this.idat_offs + this.idat_size; // IEND offset and size
+ this.iend_size = 4 + 4 + 4;
+ this.buffer_size = this.iend_offs + this.iend_size; // total PNG size
+
+ this.buffer = new Array();
+ this.palette = new Object();
+ this.pindex = 0;
+
+ var _crc32 = new Array();
+
+ // initialize buffer with zero bytes
+ for (var i = 0; i < this.buffer_size; i++) {
+ this.buffer[i] = "\x00";
+ }
+
+ // initialize non-zero elements
+ write(this.buffer, this.ihdr_offs, byte4(this.ihdr_size - 12), 'IHDR', byte4(width), byte4(height), "\x08\x03");
+ write(this.buffer, this.plte_offs, byte4(this.plte_size - 12), 'PLTE');
+ write(this.buffer, this.trns_offs, byte4(this.trns_size - 12), 'tRNS');
+ write(this.buffer, this.idat_offs, byte4(this.idat_size - 12), 'IDAT');
+ write(this.buffer, this.iend_offs, byte4(this.iend_size - 12), 'IEND');
+
+ // initialize deflate header
+ var header = ((8 + (7 << 4)) << 8) | (3 << 6);
+ header+= 31 - (header % 31);
+
+ write(this.buffer, this.idat_offs + 8, byte2(header));
+
+ // initialize deflate block headers
+ for (var i = 0; (i << 16) - 1 < this.pix_size; i++) {
+ var size, bits;
+ if (i + 0xffff < this.pix_size) {
+ size = 0xffff;
+ bits = "\x00";
+ } else {
+ size = this.pix_size - (i << 16) - i;
+ bits = "\x01";
+ }
+ write(this.buffer, this.idat_offs + 8 + 2 + (i << 16) + (i << 2), bits, byte2lsb(size), byte2lsb(~size));
+ }
+
+ /* Create crc32 lookup table */
+ for (var i = 0; i < 256; i++) {
+ var c = i;
+ for (var j = 0; j < 8; j++) {
+ if (c & 1) {
+ c = -306674912 ^ ((c >> 1) & 0x7fffffff);
+ } else {
+ c = (c >> 1) & 0x7fffffff;
+ }
+ }
+ _crc32[i] = c;
+ }
+
+ // compute the index into a png for a given pixel
+ this.index = function(x,y) {
+ var i = y * (this.width + 1) + x + 1;
+ var j = this.idat_offs + 8 + 2 + 5 * Math.floor((i / 0xffff) + 1) + i;
+ return j;
+ }
+
+ // convert a color and build up the palette
+ this.color = function(red, green, blue, alpha) {
+
+ alpha = alpha >= 0 ? alpha : 255;
+ var color = (((((alpha << 8) | red) << 8) | green) << 8) | blue;
+
+ if (typeof this.palette[color] == "undefined") {
+ if (this.pindex == this.depth) return "\x00";
+
+ var ndx = this.plte_offs + 8 + 3 * this.pindex;
+
+ this.buffer[ndx + 0] = String.fromCharCode(red);
+ this.buffer[ndx + 1] = String.fromCharCode(green);
+ this.buffer[ndx + 2] = String.fromCharCode(blue);
+ this.buffer[this.trns_offs+8+this.pindex] = String.fromCharCode(alpha);
+
+ this.palette[color] = String.fromCharCode(this.pindex++);
+ }
+ return this.palette[color];
+ }
+
+ // output a PNG string, Base64 encoded
+ this.getBase64 = function() {
+
+ var s = this.getDump();
+
+ var ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+ var c1, c2, c3, e1, e2, e3, e4;
+ var l = s.length;
+ var i = 0;
+ var r = "";
+
+ do {
+ c1 = s.charCodeAt(i);
+ e1 = c1 >> 2;
+ c2 = s.charCodeAt(i+1);
+ e2 = ((c1 & 3) << 4) | (c2 >> 4);
+ c3 = s.charCodeAt(i+2);
+ if (l < i+2) { e3 = 64; } else { e3 = ((c2 & 0xf) << 2) | (c3 >> 6); }
+ if (l < i+3) { e4 = 64; } else { e4 = c3 & 0x3f; }
+ r+= ch.charAt(e1) + ch.charAt(e2) + ch.charAt(e3) + ch.charAt(e4);
+ } while ((i+= 3) < l);
+ return r;
+ }
+
+ // output a PNG string
+ this.getDump = function() {
+
+ // compute adler32 of output pixels + row filter bytes
+ var BASE = 65521; /* largest prime smaller than 65536 */
+ var NMAX = 5552; /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
+ var s1 = 1;
+ var s2 = 0;
+ var n = NMAX;
+
+ for (var y = 0; y < this.height; y++) {
+ for (var x = -1; x < this.width; x++) {
+ s1+= this.buffer[this.index(x, y)].charCodeAt(0);
+ s2+= s1;
+ if ((n-= 1) == 0) {
+ s1%= BASE;
+ s2%= BASE;
+ n = NMAX;
+ }
+ }
+ }
+ s1%= BASE;
+ s2%= BASE;
+ write(this.buffer, this.idat_offs + this.idat_size - 8, byte4((s2 << 16) | s1));
+
+ // compute crc32 of the PNG chunks
+ function crc32(png, offs, size) {
+ var crc = -1;
+ for (var i = 4; i < size-4; i += 1) {
+ crc = _crc32[(crc ^ png[offs+i].charCodeAt(0)) & 0xff] ^ ((crc >> 8) & 0x00ffffff);
+ }
+ write(png, offs+size-4, byte4(crc ^ -1));
+ }
+
+ crc32(this.buffer, this.ihdr_offs, this.ihdr_size);
+ crc32(this.buffer, this.plte_offs, this.plte_size);
+ crc32(this.buffer, this.trns_offs, this.trns_size);
+ crc32(this.buffer, this.idat_offs, this.idat_size);
+ crc32(this.buffer, this.iend_offs, this.iend_size);
+
+ // convert PNG to string
+ return "\211PNG\r\n\032\n"+this.buffer.join('');
+ }
+ }
+
+})();
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.mp4 b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.mp4
new file mode 100644
index 000000000..4bd6d5965
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.mp4
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.png
new file mode 100644
index 000000000..605ac9ba1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.svg b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.svg
new file mode 100644
index 000000000..9f8adfae5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.svg
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" width="1" height="2">
+ <rect fill="#f00" width="1" height="1"/>
+ <rect fill="#0f0" y="1" width="1" height="1"/>
+</svg> \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.theora.ogv b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.theora.ogv
new file mode 100644
index 000000000..1543915a1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.theora.ogv
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.webmvp8.webm b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.webmvp8.webm
new file mode 100644
index 000000000..fde59a18b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-green.webmvp8.webm
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-indexed.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-indexed.png
new file mode 100644
index 000000000..3188d2d75
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/red-indexed.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/samplerUniformShader.frag b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/samplerUniformShader.frag
new file mode 100644
index 000000000..11cba1274
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/samplerUniformShader.frag
@@ -0,0 +1,8 @@
+precision mediump float;
+uniform sampler2D s2D;
+uniform samplerCube sCube;
+void main()
+{
+ gl_FragColor = texture2D(s2D, vec2(0.5, 0.5)) +
+ textureCube(sCube, vec3(0.5, 0.5, 0.5));
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-cie-rgb-profile.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-cie-rgb-profile.png
new file mode 100644
index 000000000..aa8bf3771
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-cie-rgb-profile.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colormatch-profile.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colormatch-profile.png
new file mode 100644
index 000000000..63454ec0d
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colormatch-profile.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.jpg b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.jpg
new file mode 100644
index 000000000..a9186968f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.jpg
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.png
new file mode 100644
index 000000000..592262737
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-e-srgb-profile.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-e-srgb-profile.png
new file mode 100644
index 000000000..2792b0ac5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-e-srgb-profile.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-smpte-c-profile.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-smpte-c-profile.png
new file mode 100644
index 000000000..2904e8952
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-smpte-c-profile.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-srgb-iec61966-2.1-profile.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-srgb-iec61966-2.1-profile.png
new file mode 100644
index 000000000..a0201f113
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-srgb-iec61966-2.1-profile.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/structUniformShader.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/structUniformShader.vert
new file mode 100644
index 000000000..59c719a00
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/structUniformShader.vert
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2009 The Chromium Authors. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+attribute vec4 a_vertex;
+attribute vec3 a_normal;
+
+uniform mat4 u_modelViewProjMatrix;
+
+struct MyStruct
+{
+ int x;
+ int y;
+};
+
+uniform MyStruct u_struct;
+uniform float u_array[4];
+
+varying vec3 v_normal;
+
+void main()
+{
+ v_normal = a_normal;
+ gl_Position = u_modelViewProjMatrix * a_vertex +
+ vec4(u_struct.x, u_struct.y, 0, 1) +
+ vec4(u_array[0], u_array[1], u_array[2], u_array[3]);
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-canvas.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-canvas.js
new file mode 100644
index 000000000..665236b5a
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-canvas.js
@@ -0,0 +1,212 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+function generateTest(pixelFormat, pixelType, prologue) {
+ var wtu = WebGLTestUtils;
+ var gl = null;
+ var successfullyParsed = false;
+
+ var init = function()
+ {
+ description('Verify texImage2D and texSubImage2D code paths taking canvas elements (' + pixelFormat + '/' + pixelType + ')');
+
+ gl = wtu.create3DContext("example");
+
+ if (!prologue(gl)) {
+ finishTest();
+ return;
+ }
+
+ var program = wtu.setupTexturedQuad(gl);
+
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
+
+ var testCanvas = document.createElement('canvas');
+ runTest(testCanvas);
+ //document.body.appendChild(testCanvas);
+ }
+
+ function setCanvasToRedGreen(ctx) {
+ var width = ctx.canvas.width;
+ var height = ctx.canvas.height;
+ var halfHeight = Math.floor(height / 2);
+ ctx.fillStyle = "#ff0000";
+ ctx.fillRect(0, 0, width, halfHeight);
+ ctx.fillStyle = "#00ff00";
+ ctx.fillRect(0, halfHeight, width, height - halfHeight);
+ }
+
+ function drawTextInCanvas(ctx) {
+ var width = ctx.canvas.width;
+ var height = ctx.canvas.height;
+ ctx.fillStyle = "#ffffff";
+ ctx.fillRect(0, 0, width, height);
+ ctx.font = '20pt Arial';
+ ctx.fillStyle = 'black';
+ ctx.textAlign = "center";
+ ctx.textBaseline = "middle";
+ ctx.fillText("1234567890", width / 2, height / 4);
+ }
+
+ function setCanvasTo257x257(ctx) {
+ ctx.canvas.width = 257;
+ ctx.canvas.height = 257;
+ setCanvasToRedGreen(ctx);
+ }
+
+ function setCanvasTo1x2(ctx) {
+ ctx.canvas.width = 1;
+ ctx.canvas.height = 2;
+ setCanvasToRedGreen(ctx);
+ }
+
+ function runOneIteration(canvas, useTexSubImage2D, flipY, opt_texture, opt_fontTest)
+ {
+ debug('Testing ' + (useTexSubImage2D ? 'texSubImage2D' : 'texImage2D') +
+ ' with flipY=' + flipY + ' canvas size: ' + canvas.width + 'x' + canvas.height +
+ (opt_fontTest ? " with fonts" : " with red-green"));
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ if (!opt_texture) {
+ var texture = gl.createTexture();
+ // Bind the texture to texture unit 0
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ // Set up texture parameters
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ } else {
+ var texture = opt_texture;
+ }
+ // Set up pixel store parameters
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
+ gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);
+ // Upload the image into the texture
+ if (useTexSubImage2D) {
+ // Initialize the texture to black first
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], canvas.width, canvas.height, 0,
+ gl[pixelFormat], gl[pixelType], null);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl[pixelFormat], gl[pixelType], canvas);
+ } else {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], gl[pixelFormat], gl[pixelType], canvas);
+ }
+
+ // Draw the triangles
+ wtu.clearAndDrawUnitQuad(gl, [0, 255, 0, 255]);
+
+ var width = gl.canvas.width;
+ var height = gl.canvas.height;
+ var halfHeight = Math.floor(height / 2);
+ var top = flipY ? 0 : (height - halfHeight);
+ var bottom = flipY ? (height - halfHeight) : 0;
+
+ if (opt_fontTest) {
+ // check half is a solid color.
+ wtu.checkCanvasRect(
+ gl, 0, top, width, halfHeight,
+ [255, 255, 255, 255],
+ "should be white");
+ // check other half is not a solid color.
+ wtu.checkCanvasRectColor(
+ gl, 0, bottom, width, halfHeight,
+ [255, 255, 255, 255], 0,
+ function() {
+ testFailed("font missing");
+ },
+ function() {
+ testPassed("font renderered");
+ },
+ debug);
+ } else {
+ // Check the top and bottom halves and make sure they have the right color.
+ var red = [255, 0, 0];
+ var green = [0, 255, 0];
+ debug("Checking " + (flipY ? "top" : "bottom"));
+ wtu.checkCanvasRect(gl, 0, bottom, width, halfHeight, red,
+ "shouldBe " + red);
+ debug("Checking " + (flipY ? "bottom" : "top"));
+ wtu.checkCanvasRect(gl, 0, top, width, halfHeight, green,
+ "shouldBe " + green);
+ }
+
+ if (false) {
+ var m = wtu.makeImageFromCanvas(gl.canvas);
+ document.getElementById("console").appendChild(m);
+ document.getElementById("console").appendChild(document.createElement("hr"));
+ }
+
+ return texture;
+ }
+
+ function runTest(canvas)
+ {
+ var ctx = canvas.getContext("2d");
+
+ var count = 4;
+ var caseNdx = 0;
+
+ var cases = [
+ { sub: false, flipY: true, font: false, init: setCanvasTo1x2 },
+ { sub: false, flipY: false, font: false },
+ { sub: true, flipY: true, font: false },
+ { sub: true, flipY: false, font: false },
+ { sub: false, flipY: true, font: false, init: setCanvasTo257x257 },
+ { sub: false, flipY: false, font: false },
+ { sub: true, flipY: true, font: false },
+ { sub: true, flipY: false, font: false },
+ { sub: false, flipY: true, font: true, init: drawTextInCanvas },
+ { sub: false, flipY: false, font: true },
+ { sub: true, flipY: true, font: true },
+ { sub: true, flipY: false, font: true },
+ ];
+
+ var texture;
+ function runNextTest() {
+ var c = cases[caseNdx];
+ if (c.init) {
+ c.init(ctx);
+ }
+ texture = runOneIteration(canvas, c.sub, c.flipY, texture, c.font);
+ // for the first 2 iterations always make a new texture.
+ if (count > 2) {
+ texture = undefined;
+ }
+ ++caseNdx;
+ if (caseNdx == cases.length) {
+ caseNdx = 0;
+ --count;
+ if (!count) {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+ finishTest();
+ return;
+ }
+ }
+ wtu.waitForComposite(runNextTest);
+ }
+ runNextTest();
+ }
+
+ return init;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-image-data.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-image-data.js
new file mode 100644
index 000000000..7b6d98fff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-image-data.js
@@ -0,0 +1,133 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+function generateTest(pixelFormat, pixelType, prologue) {
+ var wtu = WebGLTestUtils;
+ var gl = null;
+ var textureLoc = null;
+ var successfullyParsed = false;
+ var imageData = null;
+
+ var init = function()
+ {
+ description('Verify texImage2D and texSubImage2D code paths taking ImageData (' + pixelFormat + '/' + pixelType + ')');
+
+ gl = wtu.create3DContext("example");
+
+ if (!prologue(gl)) {
+ finishTest();
+ return;
+ }
+
+ var program = wtu.setupTexturedQuad(gl);
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
+ gl.disable(gl.BLEND);
+
+ textureLoc = gl.getUniformLocation(program, "tex");
+
+ var canvas2d = document.getElementById("texcanvas");
+ var context2d = canvas2d.getContext("2d");
+ imageData = context2d.createImageData(1, 2);
+ var data = imageData.data;
+ data[0] = 255;
+ data[1] = 0;
+ data[2] = 0;
+ data[3] = 255;
+ data[4] = 0;
+ data[5] = 255;
+ data[6] = 0;
+ data[7] = 0;
+
+ runTest();
+ }
+
+ function runOneIteration(useTexSubImage2D, flipY, premultiplyAlpha, topColor, bottomColor)
+ {
+ debug('Testing ' + (useTexSubImage2D ? 'texSubImage2D' : 'texImage2D') +
+ ' with flipY=' + flipY + ' and premultiplyAlpha=' + premultiplyAlpha);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ // Enable writes to the RGBA channels
+ gl.colorMask(1, 1, 1, 0);
+ var texture = gl.createTexture();
+ // Bind the texture to texture unit 0
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ // Set up texture parameters
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ // Set up pixel store parameters
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, premultiplyAlpha);
+ // Upload the image into the texture
+ if (useTexSubImage2D) {
+ // Initialize the texture to black first
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], 1, 2, 0,
+ gl[pixelFormat], gl[pixelType], null);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl[pixelFormat], gl[pixelType], imageData);
+ } else {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], gl[pixelFormat], gl[pixelType], imageData);
+ }
+
+ // Point the uniform sampler to texture unit 0
+ gl.uniform1i(textureLoc, 0);
+ // Draw the triangles
+ wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
+
+ // Check the top pixel and bottom pixel and make sure they have
+ // the right color.
+ debug("Checking bottom pixel");
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, bottomColor, "shouldBe " + bottomColor);
+ debug("Checking top pixel");
+ wtu.checkCanvasRect(gl, 0, 1, 1, 1, topColor, "shouldBe " + topColor);
+ }
+
+ function runTest()
+ {
+ var red = [255, 0, 0, 255];
+ var green = [0, 255, 0, 255];
+ var redPremultiplyAlpha = [255, 0, 0, 255];
+ var greenPremultiplyAlpha = [0, 0, 0, 255];
+
+ runOneIteration(false, true, false,
+ red, green);
+ runOneIteration(false, false, false,
+ green, red);
+ runOneIteration(false, true, true,
+ redPremultiplyAlpha, greenPremultiplyAlpha);
+ runOneIteration(false, false, true,
+ greenPremultiplyAlpha, redPremultiplyAlpha);
+ runOneIteration(true, true, false,
+ red, green);
+ runOneIteration(true, false, false,
+ green, red);
+ runOneIteration(true, true, true,
+ redPremultiplyAlpha, greenPremultiplyAlpha);
+ runOneIteration(true, false, true,
+ greenPremultiplyAlpha, redPremultiplyAlpha);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+ finishTest();
+ }
+
+ return init;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-image.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-image.js
new file mode 100644
index 000000000..0b6404247
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-image.js
@@ -0,0 +1,149 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+function generateTest(pixelFormat, pixelType, pathToTestRoot, prologue) {
+ var wtu = WebGLTestUtils;
+ var gl = null;
+ var textureLoc = null;
+ var successfullyParsed = false;
+ var imgCanvas;
+ var red = [255, 0, 0];
+ var green = [0, 255, 0];
+
+ var init = function()
+ {
+ description('Verify texImage2D and texSubImage2D code paths taking image elements (' + pixelFormat + '/' + pixelType + ')');
+
+ gl = wtu.create3DContext("example");
+
+ if (!prologue(gl)) {
+ finishTest();
+ return;
+ }
+
+ var program = wtu.setupTexturedQuad(gl);
+
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
+
+ textureLoc = gl.getUniformLocation(program, "tex");
+
+ wtu.loadTexture(gl, pathToTestRoot + "/resources/red-green.png", runTest);
+ }
+
+ function runOneIteration(image, useTexSubImage2D, flipY, topColor, bottomColor)
+ {
+ debug('Testing ' + (useTexSubImage2D ? 'texSubImage2D' : 'texImage2D') +
+ ' with flipY=' + flipY);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ // Disable any writes to the alpha channel
+ gl.colorMask(1, 1, 1, 0);
+ var texture = gl.createTexture();
+ // Bind the texture to texture unit 0
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ // Set up texture parameters
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ // Set up pixel store parameters
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
+ gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);
+ // Upload the image into the texture
+ if (useTexSubImage2D) {
+ // Initialize the texture to black first
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], image.width, image.height, 0,
+ gl[pixelFormat], gl[pixelType], null);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl[pixelFormat], gl[pixelType], image);
+ } else {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], gl[pixelFormat], gl[pixelType], image);
+ }
+
+ // Point the uniform sampler to texture unit 0
+ gl.uniform1i(textureLoc, 0);
+ // Draw the triangles
+ wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
+ // Check a few pixels near the top and bottom and make sure they have
+ // the right color.
+ debug("Checking lower left corner");
+ wtu.checkCanvasRect(gl, 4, 4, 2, 2, bottomColor,
+ "shouldBe " + bottomColor);
+ debug("Checking upper left corner");
+ wtu.checkCanvasRect(gl, 4, gl.canvas.height - 8, 2, 2, topColor,
+ "shouldBe " + topColor);
+ }
+
+ function runTestOnImage(image) {
+ runOneIteration(image, false, true, red, green);
+ runOneIteration(image, false, false, green, red);
+ runOneIteration(image, true, true, red, green);
+ runOneIteration(image, true, false, green, red);
+ }
+
+ function runTest(image)
+ {
+ runTestOnImage(image);
+
+ imgCanvas = document.createElement("canvas");
+ imgCanvas.width = 1;
+ imgCanvas.height = 2;
+ var imgCtx = imgCanvas.getContext("2d");
+ var imgData = imgCtx.createImageData(1, 2);
+ imgData.data[0] = red[0];
+ imgData.data[1] = red[1];
+ imgData.data[2] = red[2];
+ imgData.data[3] = 255;
+ imgData.data[4] = green[0];
+ imgData.data[5] = green[1];
+ imgData.data[6] = green[2];
+ imgData.data[7] = 255;
+ imgCtx.putImageData(imgData, 0, 0);
+
+ // apparently Image is different than <img>.
+ var newImage = new Image();
+ newImage.onload = function() {
+ runTest2(newImage);
+ };
+ newImage.onerror = function() {
+ testFailed("Creating image from canvas failed. Image src: " + this.src);
+ finishTest();
+ };
+ newImage.src = imgCanvas.toDataURL();
+ }
+
+ function runTest2(image) {
+ runTestOnImage(image);
+
+ wtu.makeImageFromCanvas(imgCanvas, function() {
+ runTest3(this);
+ });
+ }
+
+ function runTest3(image) {
+ runTestOnImage(image);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+ finishTest();
+ }
+
+ return init;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-svg-image.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-svg-image.js
new file mode 100644
index 000000000..bcc497eb4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-svg-image.js
@@ -0,0 +1,105 @@
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+function generateTest(pixelFormat, pixelType, pathToTestRoot, prologue) {
+ var wtu = WebGLTestUtils;
+ var gl = null;
+ var textureLoc = null;
+ var successfullyParsed = false;
+ var imgCanvas;
+ var red = [255, 0, 0];
+ var green = [0, 255, 0];
+
+ var init = function()
+ {
+ description('Verify texImage2D and texSubImage2D code paths taking SVG image elements (' + pixelFormat + '/' + pixelType + ')');
+
+ gl = wtu.create3DContext("example");
+
+ if (!prologue(gl)) {
+ finishTest();
+ return;
+ }
+
+ var program = wtu.setupTexturedQuad(gl);
+
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
+
+ textureLoc = gl.getUniformLocation(program, "tex");
+
+ wtu.loadTexture(gl, pathToTestRoot + "/resources/red-green.svg", runTest);
+ }
+
+ function runOneIteration(image, useTexSubImage2D, flipY, topColor, bottomColor)
+ {
+ debug('Testing ' + (useTexSubImage2D ? 'texSubImage2D' : 'texImage2D') +
+ ' with flipY=' + flipY);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ // Disable any writes to the alpha channel
+ gl.colorMask(1, 1, 1, 0);
+ var texture = gl.createTexture();
+ // Bind the texture to texture unit 0
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ // Set up texture parameters
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ // Set up pixel store parameters
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
+ gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);
+ // Upload the image into the texture
+ if (useTexSubImage2D) {
+ // Initialize the texture to black first
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], image.width, image.height, 0,
+ gl[pixelFormat], gl[pixelType], null);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl[pixelFormat], gl[pixelType], image);
+ } else {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], gl[pixelFormat], gl[pixelType], image);
+ }
+
+ // Point the uniform sampler to texture unit 0
+ gl.uniform1i(textureLoc, 0);
+ // Draw the triangles
+ wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
+ // Check a few pixels near the top and bottom and make sure they have
+ // the right color.
+ debug("Checking lower left corner");
+ wtu.checkCanvasRect(gl, 4, 4, 2, 2, bottomColor,
+ "shouldBe " + bottomColor);
+ debug("Checking upper left corner");
+ wtu.checkCanvasRect(gl, 4, gl.canvas.height - 8, 2, 2, topColor,
+ "shouldBe " + topColor);
+ }
+
+ function runTest(image)
+ {
+ runOneIteration(image, false, true, red, green);
+ runOneIteration(image, false, false, green, red);
+ runOneIteration(image, true, true, red, green);
+ runOneIteration(image, true, false, green, red);
+ finishTest();
+ }
+
+ return init;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-video.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-video.js
new file mode 100644
index 000000000..e59d3b1a7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-video.js
@@ -0,0 +1,172 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// This block needs to be outside the onload handler in order for this
+// test to run reliably in WebKit's test harness (at least the
+// Chromium port). https://bugs.webkit.org/show_bug.cgi?id=87448
+initTestingHarness();
+
+var old = debug;
+var debug = function(msg) {
+ console.log(msg);
+ old(msg);
+};
+
+function generateTest(pixelFormat, pixelType, prologue) {
+ var wtu = WebGLTestUtils;
+ var gl = null;
+ var textureLoc = null;
+ var successfullyParsed = false;
+
+ // Test each format separately because many browsers implement each
+ // differently. Some might be GPU accelerated, some might not. Etc...
+ var videos = [
+ { src: "../resources/red-green.mp4" , type: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"', },
+ { src: "../resources/red-green.webmvp8.webm", type: 'video/webm; codecs="vp8, vorbis"', },
+ { src: "../resources/red-green.theora.ogv", type: 'video/ogg; codecs="theora, vorbis"', },
+ ];
+
+ var videoNdx = 0;
+ var video;
+
+ function runNextVideo() {
+ if (video) {
+ video.pause();
+ }
+
+ if (videoNdx == videos.length) {
+ finishTest();
+ return;
+ }
+
+ var info = videos[videoNdx++];
+ debug("");
+ debug("testing: " + info.type);
+ video = document.createElement("video");
+ var canPlay = true;
+ if (!video.canPlayType) {
+ testFailed("video.canPlayType required method missing");
+ runNextVideo();
+ return;
+ }
+
+ if(!video.canPlayType(info.type).replace(/no/, '')) {
+ debug(info.type + " unsupported");
+ runNextVideo();
+ return;
+ };
+
+ document.body.appendChild(video);
+ video.type = info.type;
+ video.src = info.src;
+ wtu.startPlayingAndWaitForVideo(video, runTest);
+ }
+
+ var init = function()
+ {
+ description('Verify texImage2D and texSubImage2D code paths taking video elements (' + pixelFormat + '/' + pixelType + ')');
+
+ gl = wtu.create3DContext("example");
+
+ if (!prologue(gl)) {
+ finishTest();
+ return;
+ }
+
+ var program = wtu.setupTexturedQuad(gl);
+
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
+
+ textureLoc = gl.getUniformLocation(program, "tex");
+ runNextVideo();
+ }
+
+ function runOneIteration(videoElement, useTexSubImage2D, flipY, topColor, bottomColor)
+ {
+ debug('Testing ' + (useTexSubImage2D ? 'texSubImage2D' : 'texImage2D') +
+ ' with flipY=' + flipY);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ // Disable any writes to the alpha channel
+ gl.colorMask(1, 1, 1, 0);
+ var texture = gl.createTexture();
+ // Bind the texture to texture unit 0
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ // Set up texture parameters
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ // Set up pixel store parameters
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
+ // Upload the videoElement into the texture
+ if (useTexSubImage2D) {
+ // Initialize the texture to black first
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat],
+ videoElement.videoWidth, videoElement.videoHeight, 0,
+ gl[pixelFormat], gl[pixelType], null);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl[pixelFormat], gl[pixelType], videoElement);
+ } else {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], gl[pixelFormat], gl[pixelType], videoElement);
+ }
+
+ var c = document.createElement("canvas");
+ c.width = 16;
+ c.height = 16;
+ c.style.border = "1px solid black";
+ var ctx = c.getContext("2d");
+ ctx.drawImage(videoElement, 0, 0, 16, 16);
+ document.body.appendChild(c);
+
+ // Point the uniform sampler to texture unit 0
+ gl.uniform1i(textureLoc, 0);
+ // Draw the triangles
+ wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
+ // Check a few pixels near the top and bottom and make sure they have
+ // the right color.
+ var tolerance = 5;
+ debug("Checking lower left corner");
+ wtu.checkCanvasRect(gl, 4, 4, 2, 2, bottomColor,
+ "shouldBe " + bottomColor, tolerance);
+ debug("Checking upper left corner");
+ wtu.checkCanvasRect(gl, 4, gl.canvas.height - 8, 2, 2, topColor,
+ "shouldBe " + topColor, tolerance);
+ }
+
+ function runTest(videoElement)
+ {
+ var red = [255, 0, 0];
+ var green = [0, 255, 0];
+ runOneIteration(videoElement, false, true, red, green);
+ runOneIteration(videoElement, false, false, green, red);
+ runOneIteration(videoElement, true, true, red, green);
+ runOneIteration(videoElement, true, false, green, red);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+
+ runNextVideo();
+ }
+
+ return init;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-webgl-canvas.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-webgl-canvas.js
new file mode 100644
index 000000000..4a8c6bf03
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-webgl-canvas.js
@@ -0,0 +1,186 @@
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+function generateTest(pixelFormat, pixelType, prologue) {
+ var wtu = WebGLTestUtils;
+ var gl = null;
+ var successfullyParsed = false;
+
+ var init = function()
+ {
+ description('Verify texImage2D and texSubImage2D code paths taking webgl canvas elements (' + pixelFormat + '/' + pixelType + ')');
+
+ gl = wtu.create3DContext("example");
+
+ if (!prologue(gl)) {
+ finishTest();
+ return;
+ }
+
+ var program = wtu.setupTexturedQuad(gl);
+
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
+
+ runTest();
+ }
+
+ function setCanvasToRedGreen(ctx) {
+ var width = ctx.canvas.width;
+ var height = ctx.canvas.height;
+ var halfHeight = Math.floor(height / 2);
+
+ ctx.viewport(0, 0, width, height);
+
+ ctx.enable(ctx.SCISSOR_TEST);
+ ctx.scissor(0, 0, width, halfHeight);
+ ctx.clearColor(1.0, 0, 0, 1.0);
+ ctx.clear(ctx.COLOR_BUFFER_BIT);
+ ctx.scissor(0, halfHeight, width, height - halfHeight);
+ ctx.clearColor(0.0, 1.0, 0, 1.0);
+ ctx.clear(ctx.COLOR_BUFFER_BIT);
+ ctx.disable(ctx.SCISSOR_TEST);
+ }
+
+ function setCanvasTo257x257(ctx) {
+ ctx.canvas.width = 257;
+ ctx.canvas.height = 257;
+ setCanvasToRedGreen(ctx);
+ }
+
+ function setCanvasTo1x2(ctx) {
+ ctx.canvas.width = 1;
+ ctx.canvas.height = 2;
+ setCanvasToRedGreen(ctx);
+ }
+
+ function runOneIteration(canvas, useTexSubImage2D, flipY, opt_texture)
+ {
+ debug('Testing ' + (useTexSubImage2D ? 'texSubImage2D' : 'texImage2D') +
+ ' with flipY=' + flipY + ' canvas size: ' + canvas.width + 'x' + canvas.height +
+ ' with red-green');
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ if (!opt_texture) {
+ var texture = gl.createTexture();
+ // Bind the texture to texture unit 0
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ // Set up texture parameters
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ } else {
+ var texture = opt_texture;
+ }
+ // Set up pixel store parameters
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
+ gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);
+ // Upload the image into the texture
+ if (useTexSubImage2D) {
+ // Initialize the texture to black first
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], canvas.width, canvas.height, 0,
+ gl[pixelFormat], gl[pixelType], null);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl[pixelFormat], gl[pixelType], canvas);
+ } else {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], gl[pixelFormat], gl[pixelType], canvas);
+ }
+
+ // Draw the triangles
+ wtu.clearAndDrawUnitQuad(gl, [0, 255, 0, 255]);
+
+ var width = gl.canvas.width;
+ var height = gl.canvas.height;
+ var halfHeight = Math.floor(height / 2);
+ var top = flipY ? (height - halfHeight) : 0;
+ var bottom = flipY ? 0 : (height - halfHeight);
+
+ // Check the top and bottom halves and make sure they have the right color.
+ var red = [255, 0, 0];
+ var green = [0, 255, 0];
+ debug("Checking " + (flipY ? "top" : "bottom"));
+ wtu.checkCanvasRect(gl, 0, bottom, width, halfHeight, red,
+ "shouldBe " + red);
+ debug("Checking " + (flipY ? "bottom" : "top"));
+ wtu.checkCanvasRect(gl, 0, top, width, halfHeight, green,
+ "shouldBe " + green);
+
+ if (false) {
+ var ma = wtu.makeImageFromCanvas(canvas);
+ document.getElementById("console").appendChild(ma);
+
+ var m = wtu.makeImageFromCanvas(gl.canvas);
+ document.getElementById("console").appendChild(m);
+ document.getElementById("console").appendChild(document.createElement("hr"));
+ }
+
+ return texture;
+ }
+
+ function runTest()
+ {
+ var ctx = wtu.create3DContext();
+ var canvas = ctx.canvas;
+
+ var count = 4;
+ var caseNdx = 0;
+
+ var cases = [
+ { sub: false, flipY: true, init: setCanvasTo1x2 },
+ { sub: false, flipY: false },
+ { sub: true, flipY: true },
+ { sub: true, flipY: false },
+ { sub: false, flipY: true, init: setCanvasTo257x257 },
+ { sub: false, flipY: false },
+ { sub: true, flipY: true },
+ { sub: true, flipY: false },
+ ];
+
+ var texture;
+ function runNextTest() {
+ var c = cases[caseNdx];
+ if (c.init) {
+ c.init(ctx);
+ }
+ texture = runOneIteration(canvas, c.sub, c.flipY, texture);
+ // for the first 2 iterations always make a new texture.
+ if (count > 2) {
+ texture = undefined;
+ }
+ ++caseNdx;
+ if (caseNdx == cases.length) {
+ caseNdx = 0;
+ --count;
+ if (!count) {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+ finishTest();
+ return;
+ }
+ }
+ wtu.waitForComposite(runNextTest);
+ }
+ runNextTest();
+ }
+
+ return init;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/thunderbird-logo-64x64.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/thunderbird-logo-64x64.png
new file mode 100644
index 000000000..e2326f551
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/thunderbird-logo-64x64.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/transparent-on-left-indexed.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/transparent-on-left-indexed.png
new file mode 100644
index 000000000..2be312744
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/transparent-on-left-indexed.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/vertexShader.vert b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/vertexShader.vert
new file mode 100644
index 000000000..fe6640b75
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/vertexShader.vert
@@ -0,0 +1,36 @@
+/*
+Copyright (C) 2009 Apple Computer, Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. AS IS AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+attribute vec4 a_vertex;
+attribute vec3 a_normal;
+
+uniform mediump mat4 u_modelViewProjMatrix;
+
+varying vec3 v_normal;
+
+void main()
+{
+ v_normal = a_normal;
+ gl_Position = u_modelViewProjMatrix * a_vertex;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/webgl-test-utils.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/webgl-test-utils.js
new file mode 100644
index 000000000..4f2bae34e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/webgl-test-utils.js
@@ -0,0 +1,2754 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+var WebGLTestUtils = (function() {
+"use strict";
+
+/**
+ * Wrapped logging function.
+ * @param {string} msg The message to log.
+ */
+var log = function(msg) {
+ if (window.console && window.console.log) {
+ window.console.log(msg);
+ }
+};
+
+/**
+ * Wrapped logging function.
+ * @param {string} msg The message to log.
+ */
+var error = function(msg) {
+ if (window.console) {
+ if (window.console.error) {
+ window.console.error(msg);
+ }
+ else if (window.console.log) {
+ window.console.log(msg);
+ }
+ }
+};
+
+/**
+ * Turn off all logging.
+ */
+var loggingOff = function() {
+ log = function() {};
+ error = function() {};
+};
+
+/**
+ * Converts a WebGL enum to a string.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number} value The enum value.
+ * @return {string} The enum as a string.
+ */
+var glEnumToString = function(gl, value) {
+ // Optimization for the most common enum:
+ if (value === gl.NO_ERROR) {
+ return "NO_ERROR";
+ }
+ for (var p in gl) {
+ if (gl[p] == value) {
+ return p;
+ }
+ }
+ return "0x" + value.toString(16);
+};
+
+var lastError = "";
+
+/**
+ * Returns the last compiler/linker error.
+ * @return {string} The last compiler/linker error.
+ */
+var getLastError = function() {
+ return lastError;
+};
+
+/**
+ * Whether a haystack ends with a needle.
+ * @param {string} haystack String to search
+ * @param {string} needle String to search for.
+ * @param {boolean} True if haystack ends with needle.
+ */
+var endsWith = function(haystack, needle) {
+ return haystack.substr(haystack.length - needle.length) === needle;
+};
+
+/**
+ * Whether a haystack starts with a needle.
+ * @param {string} haystack String to search
+ * @param {string} needle String to search for.
+ * @param {boolean} True if haystack starts with needle.
+ */
+var startsWith = function(haystack, needle) {
+ return haystack.substr(0, needle.length) === needle;
+};
+
+/**
+ * A vertex shader for a single texture.
+ * @type {string}
+ */
+var simpleTextureVertexShader = [
+ 'attribute vec4 vPosition;',
+ 'attribute vec2 texCoord0;',
+ 'varying vec2 texCoord;',
+ 'void main() {',
+ ' gl_Position = vPosition;',
+ ' texCoord = texCoord0;',
+ '}'].join('\n');
+
+/**
+ * A fragment shader for a single texture.
+ * @type {string}
+ */
+var simpleTextureFragmentShader = [
+ 'precision mediump float;',
+ 'uniform sampler2D tex;',
+ 'varying vec2 texCoord;',
+ 'void main() {',
+ ' gl_FragData[0] = texture2D(tex, texCoord);',
+ '}'].join('\n');
+
+/**
+ * A vertex shader for a single texture.
+ * @type {string}
+ */
+var noTexCoordTextureVertexShader = [
+ 'attribute vec4 vPosition;',
+ 'varying vec2 texCoord;',
+ 'void main() {',
+ ' gl_Position = vPosition;',
+ ' texCoord = vPosition.xy * 0.5 + 0.5;',
+ '}'].join('\n');
+
+/**
+ * A vertex shader for a uniform color.
+ * @type {string}
+ */
+var simpleColorVertexShader = [
+ 'attribute vec4 vPosition;',
+ 'void main() {',
+ ' gl_Position = vPosition;',
+ '}'].join('\n');
+
+/**
+ * A fragment shader for a uniform color.
+ * @type {string}
+ */
+var simpleColorFragmentShader = [
+ 'precision mediump float;',
+ 'uniform vec4 u_color;',
+ 'void main() {',
+ ' gl_FragData[0] = u_color;',
+ '}'].join('\n');
+
+/**
+ * A vertex shader for vertex colors.
+ * @type {string}
+ */
+var simpleVertexColorVertexShader = [
+ 'attribute vec4 vPosition;',
+ 'attribute vec4 a_color;',
+ 'varying vec4 v_color;',
+ 'void main() {',
+ ' gl_Position = vPosition;',
+ ' v_color = a_color;',
+ '}'].join('\n');
+
+/**
+ * A fragment shader for vertex colors.
+ * @type {string}
+ */
+var simpleVertexColorFragmentShader = [
+ 'precision mediump float;',
+ 'varying vec4 v_color;',
+ 'void main() {',
+ ' gl_FragData[0] = v_color;',
+ '}'].join('\n');
+
+/**
+ * Creates a simple texture vertex shader.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @return {!WebGLShader}
+ */
+var setupSimpleTextureVertexShader = function(gl) {
+ return loadShader(gl, simpleTextureVertexShader, gl.VERTEX_SHADER);
+};
+
+/**
+ * Creates a simple texture fragment shader.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @return {!WebGLShader}
+ */
+var setupSimpleTextureFragmentShader = function(gl) {
+ return loadShader(
+ gl, simpleTextureFragmentShader, gl.FRAGMENT_SHADER);
+};
+
+/**
+ * Creates a texture vertex shader that doesn't need texcoords.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @return {!WebGLShader}
+ */
+var setupNoTexCoordTextureVertexShader = function(gl) {
+ return loadShader(gl, noTexCoordTextureVertexShader, gl.VERTEX_SHADER);
+};
+
+/**
+ * Creates a simple vertex color vertex shader.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @return {!WebGLShader}
+ */
+var setupSimpleVertexColorVertexShader = function(gl) {
+ return loadShader(gl, simpleVertexColorVertexShader, gl.VERTEX_SHADER);
+};
+
+/**
+ * Creates a simple vertex color fragment shader.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @return {!WebGLShader}
+ */
+var setupSimpleVertexColorFragmentShader = function(gl) {
+ return loadShader(
+ gl, simpleVertexColorFragmentShader, gl.FRAGMENT_SHADER);
+};
+
+/**
+ * Creates a simple color vertex shader.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @return {!WebGLShader}
+ */
+var setupSimpleColorVertexShader = function(gl) {
+ return loadShader(gl, simpleColorVertexShader, gl.VERTEX_SHADER);
+};
+
+/**
+ * Creates a simple color fragment shader.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @return {!WebGLShader}
+ */
+var setupSimpleColorFragmentShader = function(gl) {
+ return loadShader(
+ gl, simpleColorFragmentShader, gl.FRAGMENT_SHADER);
+};
+
+/**
+ * Creates a program, attaches shaders, binds attrib locations, links the
+ * program and calls useProgram.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!Array.<!WebGLShader|string>} shaders The shaders to
+ * attach, or the source, or the id of a script to get
+ * the source from.
+ * @param {!Array.<string>} opt_attribs The attribs names.
+ * @param {!Array.<number>} opt_locations The locations for the attribs.
+ * @param {boolean} opt_logShaders Whether to log shader source.
+ */
+var setupProgram = function(
+ gl, shaders, opt_attribs, opt_locations, opt_logShaders) {
+ var realShaders = [];
+ var program = gl.createProgram();
+ var shaderCount = 0;
+ for (var ii = 0; ii < shaders.length; ++ii) {
+ var shader = shaders[ii];
+ var shaderType = undefined;
+ if (typeof shader == 'string') {
+ var element = document.getElementById(shader);
+ if (element) {
+ if (element.type != "x-shader/x-vertex" && element.type != "x-shader/x-fragment")
+ shaderType = ii ? gl.FRAGMENT_SHADER : gl.VERTEX_SHADER;
+ shader = loadShaderFromScript(gl, shader, shaderType, undefined, opt_logShaders);
+ } else if (endsWith(shader, ".vert")) {
+ shader = loadShaderFromFile(gl, shader, gl.VERTEX_SHADER, undefined, opt_logShaders);
+ } else if (endsWith(shader, ".frag")) {
+ shader = loadShaderFromFile(gl, shader, gl.FRAGMENT_SHADER, undefined, opt_logShaders);
+ } else {
+ shader = loadShader(gl, shader, ii ? gl.FRAGMENT_SHADER : gl.VERTEX_SHADER, undefined, opt_logShaders);
+ }
+ } else if (opt_logShaders) {
+ throw 'Shader source logging requested but no shader source provided';
+ }
+ if (shader) {
+ ++shaderCount;
+ gl.attachShader(program, shader);
+ }
+ }
+ if (shaderCount != 2) {
+ error("Error in compiling shader");
+ return null;
+ }
+ if (opt_attribs) {
+ for (var ii = 0; ii < opt_attribs.length; ++ii) {
+ gl.bindAttribLocation(
+ program,
+ opt_locations ? opt_locations[ii] : ii,
+ opt_attribs[ii]);
+ }
+ }
+ gl.linkProgram(program);
+
+ // Check the link status
+ var linked = gl.getProgramParameter(program, gl.LINK_STATUS);
+ if (!linked) {
+ // something went wrong with the link
+ lastError = gl.getProgramInfoLog (program);
+ error("Error in program linking:" + lastError);
+
+ gl.deleteProgram(program);
+ return null;
+ }
+
+ gl.useProgram(program);
+ return program;
+};
+
+/**
+ * Creates a simple texture program.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @return {WebGLProgram}
+ */
+var setupNoTexCoordTextureProgram = function(gl) {
+ var vs = setupNoTexCoordTextureVertexShader(gl);
+ var fs = setupSimpleTextureFragmentShader(gl);
+ if (!vs || !fs) {
+ return null;
+ }
+ var program = setupProgram(
+ gl,
+ [vs, fs],
+ ['vPosition'],
+ [0]);
+ if (!program) {
+ gl.deleteShader(fs);
+ gl.deleteShader(vs);
+ }
+ gl.useProgram(program);
+ return program;
+};
+
+/**
+ * Creates a simple texture program.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number} opt_positionLocation The attrib location for position.
+ * @param {number} opt_texcoordLocation The attrib location for texture coords.
+ * @return {WebGLProgram}
+ */
+var setupSimpleTextureProgram = function(
+ gl, opt_positionLocation, opt_texcoordLocation) {
+ opt_positionLocation = opt_positionLocation || 0;
+ opt_texcoordLocation = opt_texcoordLocation || 1;
+ var vs = setupSimpleTextureVertexShader(gl);
+ var fs = setupSimpleTextureFragmentShader(gl);
+ if (!vs || !fs) {
+ return null;
+ }
+ var program = setupProgram(
+ gl,
+ [vs, fs],
+ ['vPosition', 'texCoord0'],
+ [opt_positionLocation, opt_texcoordLocation]);
+ if (!program) {
+ gl.deleteShader(fs);
+ gl.deleteShader(vs);
+ }
+ gl.useProgram(program);
+ return program;
+};
+
+/**
+ * Creates a simple vertex color program.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number} opt_positionLocation The attrib location for position.
+ * @param {number} opt_vertexColorLocation The attrib location
+ * for vertex colors.
+ * @return {WebGLProgram}
+ */
+var setupSimpleVertexColorProgram = function(
+ gl, opt_positionLocation, opt_vertexColorLocation) {
+ opt_positionLocation = opt_positionLocation || 0;
+ opt_vertexColorLocation = opt_vertexColorLocation || 1;
+ var vs = setupSimpleVertexColorVertexShader(gl);
+ var fs = setupSimpleVertexColorFragmentShader(gl);
+ if (!vs || !fs) {
+ return null;
+ }
+ var program = setupProgram(
+ gl,
+ [vs, fs],
+ ['vPosition', 'a_color'],
+ [opt_positionLocation, opt_vertexColorLocation]);
+ if (!program) {
+ gl.deleteShader(fs);
+ gl.deleteShader(vs);
+ }
+ gl.useProgram(program);
+ return program;
+};
+
+/**
+ * Creates a simple color program.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number} opt_positionLocation The attrib location for position.
+ * @return {WebGLProgram}
+ */
+var setupSimpleColorProgram = function(gl, opt_positionLocation) {
+ opt_positionLocation = opt_positionLocation || 0;
+ var vs = setupSimpleColorVertexShader(gl);
+ var fs = setupSimpleColorFragmentShader(gl);
+ if (!vs || !fs) {
+ return null;
+ }
+ var program = setupProgram(
+ gl,
+ [vs, fs],
+ ['vPosition'],
+ [opt_positionLocation]);
+ if (!program) {
+ gl.deleteShader(fs);
+ gl.deleteShader(vs);
+ }
+ gl.useProgram(program);
+ return program;
+};
+
+/**
+ * Creates buffers for a textured unit quad and attaches them to vertex attribs.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number} opt_positionLocation The attrib location for position.
+ * @param {number} opt_texcoordLocation The attrib location for texture coords.
+ * @return {!Array.<WebGLBuffer>} The buffer objects that were
+ * created.
+ */
+var setupUnitQuad = function(gl, opt_positionLocation, opt_texcoordLocation) {
+ return setupUnitQuadWithTexCoords(gl, [ 0.0, 0.0 ], [ 1.0, 1.0 ],
+ opt_positionLocation, opt_texcoordLocation);
+};
+
+/**
+ * Creates buffers for a textured unit quad with specified lower left
+ * and upper right texture coordinates, and attaches them to vertex
+ * attribs.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!Array.<number>} lowerLeftTexCoords The texture coordinates for the lower left corner.
+ * @param {!Array.<number>} upperRightTexCoords The texture coordinates for the upper right corner.
+ * @param {number} opt_positionLocation The attrib location for position.
+ * @param {number} opt_texcoordLocation The attrib location for texture coords.
+ * @return {!Array.<WebGLBuffer>} The buffer objects that were
+ * created.
+ */
+var setupUnitQuadWithTexCoords = function(
+ gl, lowerLeftTexCoords, upperRightTexCoords,
+ opt_positionLocation, opt_texcoordLocation) {
+ return setupQuad(gl, {
+ positionLocation: opt_positionLocation || 0,
+ texcoordLocation: opt_texcoordLocation || 1,
+ lowerLeftTexCoords: lowerLeftTexCoords,
+ upperRightTexCoords: upperRightTexCoords,
+ });
+};
+
+/**
+ * Makes a quad with various options.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!Object} options.
+ *
+ * scale: scale to multiple unit quad values by. default 1.0.
+ * positionLocation: attribute location for position.
+ * texcoordLocation: attribute location for texcoords.
+ * If this does not exist no texture coords are created.
+ * lowerLeftTexCoords: an array of 2 values for the
+ * lowerLeftTexCoords.
+ * upperRightTexCoords: an array of 2 values for the
+ * upperRightTexCoords.
+ */
+var setupQuad = function(gl, options) {
+ var positionLocation = options.positionLocation || 0;
+ var scale = options.scale || 1;
+
+ var objects = [];
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ 1.0 * scale , 1.0 * scale,
+ -1.0 * scale , 1.0 * scale,
+ -1.0 * scale , -1.0 * scale,
+ 1.0 * scale , 1.0 * scale,
+ -1.0 * scale , -1.0 * scale,
+ 1.0 * scale , -1.0 * scale,]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(positionLocation);
+ gl.vertexAttribPointer(positionLocation, 2, gl.FLOAT, false, 0, 0);
+ objects.push(vertexObject);
+
+ if (options.texcoordLocation !== undefined) {
+ var llx = options.lowerLeftTexCoords[0];
+ var lly = options.lowerLeftTexCoords[1];
+ var urx = options.upperRightTexCoords[0];
+ var ury = options.upperRightTexCoords[1];
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+ urx, ury,
+ llx, ury,
+ llx, lly,
+ urx, ury,
+ llx, lly,
+ urx, lly]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(options.texcoordLocation);
+ gl.vertexAttribPointer(options.texcoordLocation, 2, gl.FLOAT, false, 0, 0);
+ objects.push(vertexObject);
+ }
+
+ return objects;
+};
+
+/**
+ * Creates a program and buffers for rendering a textured quad.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number} opt_positionLocation The attrib location for
+ * position. Default = 0.
+ * @param {number} opt_texcoordLocation The attrib location for
+ * texture coords. Default = 1.
+ * @return {!WebGLProgram}
+ */
+var setupTexturedQuad = function(
+ gl, opt_positionLocation, opt_texcoordLocation) {
+ var program = setupSimpleTextureProgram(
+ gl, opt_positionLocation, opt_texcoordLocation);
+ setupUnitQuad(gl, opt_positionLocation, opt_texcoordLocation);
+ return program;
+};
+
+/**
+ * Creates a program and buffers for rendering a color quad.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number} opt_positionLocation The attrib location for position.
+ * @return {!WebGLProgram}
+ */
+var setupColorQuad = function(gl, opt_positionLocation) {
+ opt_positionLocation = opt_positionLocation || 0;
+ var program = setupSimpleColorProgram(gl);
+ setupUnitQuad(gl, opt_positionLocation);
+ return program;
+};
+
+/**
+ * Creates a program and buffers for rendering a textured quad with
+ * specified lower left and upper right texture coordinates.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!Array.<number>} lowerLeftTexCoords The texture coordinates for the lower left corner.
+ * @param {!Array.<number>} upperRightTexCoords The texture coordinates for the upper right corner.
+ * @param {number} opt_positionLocation The attrib location for position.
+ * @param {number} opt_texcoordLocation The attrib location for texture coords.
+ * @return {!WebGLProgram}
+ */
+var setupTexturedQuadWithTexCoords = function(
+ gl, lowerLeftTexCoords, upperRightTexCoords,
+ opt_positionLocation, opt_texcoordLocation) {
+ var program = setupSimpleTextureProgram(
+ gl, opt_positionLocation, opt_texcoordLocation);
+ setupUnitQuadWithTexCoords(gl, lowerLeftTexCoords, upperRightTexCoords,
+ opt_positionLocation, opt_texcoordLocation);
+ return program;
+};
+
+/**
+ * Creates a unit quad with only positions of a given resolution.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number} gridRes The resolution of the mesh grid,
+ * expressed in the number of quads across and down.
+ * @param {number} opt_positionLocation The attrib location for position.
+ */
+var setupIndexedQuad = function (
+ gl, gridRes, opt_positionLocation, opt_flipOddTriangles) {
+ return setupIndexedQuadWithOptions(gl,
+ { gridRes: gridRes,
+ positionLocation: opt_positionLocation,
+ flipOddTriangles: opt_flipOddTriangles
+ });
+};
+
+/**
+ * Creates a quad with various options.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!Object) options The options. See below.
+ * @return {!Array.<WebGLBuffer>} The created buffers.
+ * [positions, <colors>, indices]
+ *
+ * Options:
+ * gridRes: number of quads across and down grid.
+ * positionLocation: attrib location for position
+ * flipOddTriangles: reverse order of vertices of every other
+ * triangle
+ * positionOffset: offset added to each vertex
+ * positionMult: multipier for each vertex
+ * colorLocation: attrib location for vertex colors. If
+ * undefined no vertex colors will be created.
+ */
+var setupIndexedQuadWithOptions = function (gl, options) {
+ var positionLocation = options.positionLocation || 0;
+ var objects = [];
+
+ var gridRes = options.gridRes || 1;
+ var positionOffset = options.positionOffset || 0;
+ var positionMult = options.positionMult || 1;
+ var vertsAcross = gridRes + 1;
+ var numVerts = vertsAcross * vertsAcross;
+ var positions = new Float32Array(numVerts * 3);
+ var indices = new Uint16Array(6 * gridRes * gridRes);
+ var poffset = 0;
+
+ for (var yy = 0; yy <= gridRes; ++yy) {
+ for (var xx = 0; xx <= gridRes; ++xx) {
+ positions[poffset + 0] = (-1 + 2 * xx / gridRes) * positionMult + positionOffset;
+ positions[poffset + 1] = (-1 + 2 * yy / gridRes) * positionMult + positionOffset;
+ positions[poffset + 2] = 0;
+
+ poffset += 3;
+ }
+ }
+
+ var buf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(positionLocation);
+ gl.vertexAttribPointer(positionLocation, 3, gl.FLOAT, false, 0, 0);
+ objects.push(buf);
+
+ if (options.colorLocation !== undefined) {
+ var colors = new Float32Array(numVerts * 4);
+ for (var yy = 0; yy <= gridRes; ++yy) {
+ for (var xx = 0; xx <= gridRes; ++xx) {
+ if (options.color !== undefined) {
+ colors[poffset + 0] = options.color[0];
+ colors[poffset + 1] = options.color[1];
+ colors[poffset + 2] = options.color[2];
+ colors[poffset + 3] = options.color[3];
+ } else {
+ colors[poffset + 0] = xx / gridRes;
+ colors[poffset + 1] = yy / gridRes;
+ colors[poffset + 2] = (xx / gridRes) * (yy / gridRes);
+ colors[poffset + 3] = (yy % 2) * 0.5 + 0.5;
+ }
+ poffset += 4;
+ }
+ }
+
+ var buf = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+ gl.bufferData(gl.ARRAY_BUFFER, colors, gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(options.colorLocation);
+ gl.vertexAttribPointer(options.colorLocation, 4, gl.FLOAT, false, 0, 0);
+ objects.push(buf);
+ }
+
+ var tbase = 0;
+ for (var yy = 0; yy < gridRes; ++yy) {
+ var index = yy * vertsAcross;
+ for (var xx = 0; xx < gridRes; ++xx) {
+ indices[tbase + 0] = index + 0;
+ indices[tbase + 1] = index + 1;
+ indices[tbase + 2] = index + vertsAcross;
+ indices[tbase + 3] = index + vertsAcross;
+ indices[tbase + 4] = index + 1;
+ indices[tbase + 5] = index + vertsAcross + 1;
+
+ if (options.flipOddTriangles) {
+ indices[tbase + 4] = index + vertsAcross + 1;
+ indices[tbase + 5] = index + 1;
+ }
+
+ index += 1;
+ tbase += 6;
+ }
+ }
+
+ var buf = gl.createBuffer();
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, buf);
+ gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+ objects.push(buf);
+
+ return objects;
+};
+
+/**
+ * Returns the constructor for a typed array that corresponds to the given
+ * WebGL type.
+ * @param {!WebGLRenderingContext} gl A WebGLRenderingContext.
+ * @param {number} type The WebGL type (eg, gl.UNSIGNED_BYTE)
+ * @return {!Constructor} The typed array constructor that
+ * corresponds to the given type.
+ */
+var glTypeToTypedArrayType = function(gl, type) {
+ switch (type) {
+ case gl.BYTE:
+ return window.Int8Array;
+ case gl.UNSIGNED_BYTE:
+ return window.Uint8Array;
+ case gl.SHORT:
+ return window.Int16Array;
+ case gl.UNSIGNED_SHORT:
+ case gl.UNSIGNED_SHORT_5_6_5:
+ case gl.UNSIGNED_SHORT_4_4_4_4:
+ case gl.UNSIGNED_SHORT_5_5_5_1:
+ return window.Uint16Array;
+ case gl.INT:
+ return window.Int32Array;
+ case gl.UNSIGNED_INT:
+ return window.Uint32Array;
+ default:
+ throw 'unknown gl type ' + glEnumToString(gl, type);
+ }
+};
+
+/**
+ * Returns the number of bytes per component for a given WebGL type.
+ * @param {!WebGLRenderingContext} gl A WebGLRenderingContext.
+ * @param {GLenum} type The WebGL type (eg, gl.UNSIGNED_BYTE)
+ * @return {number} The number of bytes per component.
+ */
+var getBytesPerComponent = function(gl, type) {
+ switch (type) {
+ case gl.BYTE:
+ case gl.UNSIGNED_BYTE:
+ return 1;
+ case gl.SHORT:
+ case gl.UNSIGNED_SHORT:
+ case gl.UNSIGNED_SHORT_5_6_5:
+ case gl.UNSIGNED_SHORT_4_4_4_4:
+ case gl.UNSIGNED_SHORT_5_5_5_1:
+ return 2;
+ case gl.INT:
+ case gl.UNSIGNED_INT:
+ return 4;
+ default:
+ throw 'unknown gl type ' + glEnumToString(gl, type);
+ }
+};
+
+/**
+ * Returns the number of typed array elements per pixel for a given WebGL
+ * format/type combination. The corresponding typed array type can be determined
+ * by calling glTypeToTypedArrayType.
+ * @param {!WebGLRenderingContext} gl A WebGLRenderingContext.
+ * @param {GLenum} format The WebGL format (eg, gl.RGBA)
+ * @param {GLenum} type The WebGL type (eg, gl.UNSIGNED_BYTE)
+ * @return {number} The number of typed array elements per pixel.
+ */
+var getTypedArrayElementsPerPixel = function(gl, format, type) {
+ switch (type) {
+ case gl.UNSIGNED_SHORT_5_6_5:
+ case gl.UNSIGNED_SHORT_4_4_4_4:
+ case gl.UNSIGNED_SHORT_5_5_5_1:
+ return 1;
+ case gl.UNSIGNED_BYTE:
+ break;
+ default:
+ throw 'not a gl type for color information ' + glEnumToString(gl, type);
+ }
+
+ switch (format) {
+ case gl.RGBA:
+ return 4;
+ case gl.RGB:
+ return 3;
+ case gl.LUMINANCE_ALPHA:
+ return 2;
+ case gl.LUMINANCE:
+ case gl.ALPHA:
+ return 1;
+ default:
+ throw 'unknown gl format ' + glEnumToString(gl, format);
+ }
+};
+
+/**
+ * Fills the given texture with a solid color.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!WebGLTexture} tex The texture to fill.
+ * @param {number} width The width of the texture to create.
+ * @param {number} height The height of the texture to create.
+ * @param {!Array.<number>} color The color to fill with.
+ * where each element is in the range 0 to 255.
+ * @param {number} opt_level The level of the texture to fill. Default = 0.
+ * @param {number} opt_format The format for the texture.
+ */
+var fillTexture = function(gl, tex, width, height, color, opt_level, opt_format, opt_type) {
+ opt_level = opt_level || 0;
+ opt_format = opt_format || gl.RGBA;
+ opt_type = opt_type || gl.UNSIGNED_BYTE;
+ var pack = gl.getParameter(gl.UNPACK_ALIGNMENT);
+ var numComponents = color.length;
+ var bytesPerComponent = getBytesPerComponent(gl, opt_type);
+ var rowSize = numComponents * width * bytesPerComponent;
+ var paddedRowSize = Math.floor((rowSize + pack - 1) / pack) * pack;
+ var size = rowSize + (height - 1) * paddedRowSize;
+ size = Math.floor((size + bytesPerComponent - 1) / bytesPerComponent) * bytesPerComponent;
+ var buf = new (glTypeToTypedArrayType(gl, opt_type))(size);
+ for (var yy = 0; yy < height; ++yy) {
+ var off = yy * paddedRowSize;
+ for (var xx = 0; xx < width; ++xx) {
+ for (var jj = 0; jj < numComponents; ++jj) {
+ buf[off++] = color[jj];
+ }
+ }
+ }
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(
+ gl.TEXTURE_2D, opt_level, opt_format, width, height, 0,
+ opt_format, opt_type, buf);
+};
+
+/**
+ * Creates a texture and fills it with a solid color.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number} width The width of the texture to create.
+ * @param {number} height The height of the texture to create.
+ * @param {!Array.<number>} color The color to fill with. A 4 element array
+ * where each element is in the range 0 to 255.
+ * @return {!WebGLTexture}
+ */
+var createColoredTexture = function(gl, width, height, color) {
+ var tex = gl.createTexture();
+ fillTexture(gl, tex, width, height, color);
+ return tex;
+};
+
+var ubyteToFloat = function(c) {
+ return c / 255;
+};
+
+var ubyteColorToFloatColor = function(color) {
+ var floatColor = [];
+ for (var ii = 0; ii < color.length; ++ii) {
+ floatColor[ii] = ubyteToFloat(color[ii]);
+ }
+ return floatColor;
+};
+
+/**
+ * Sets the "u_color" uniform of the current program to color.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!Array.<number> color 4 element array of 0-1 color
+ * components.
+ */
+var setFloatDrawColor = function(gl, color) {
+ var program = gl.getParameter(gl.CURRENT_PROGRAM);
+ var colorLocation = gl.getUniformLocation(program, "u_color");
+ gl.uniform4fv(colorLocation, color);
+};
+
+/**
+ * Sets the "u_color" uniform of the current program to color.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!Array.<number> color 4 element array of 0-255 color
+ * components.
+ */
+var setUByteDrawColor = function(gl, color) {
+ setFloatDrawColor(gl, ubyteColorToFloatColor(color));
+};
+
+/**
+ * Draws a previously setup quad in the given color.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!Array.<number>} color The color to draw with. A 4
+ * element array where each element is in the range 0 to
+ * 1.
+ */
+var drawFloatColorQuad = function(gl, color) {
+ var program = gl.getParameter(gl.CURRENT_PROGRAM);
+ var colorLocation = gl.getUniformLocation(program, "u_color");
+ gl.uniform4fv(colorLocation, color);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+};
+
+
+/**
+ * Draws a previously setup quad in the given color.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!Array.<number>} color The color to draw with. A 4
+ * element array where each element is in the range 0 to
+ * 255.
+ */
+var drawUByteColorQuad = function(gl, color) {
+ drawFloatColorQuad(gl, ubyteColorToFloatColor(color));
+};
+
+/**
+ * Draws a previously setupUnitQuad.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ */
+var drawUnitQuad = function(gl) {
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+};
+
+/**
+ * Clears then Draws a previously setupUnitQuad.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!Array.<number>} opt_color The color to fill clear with before
+ * drawing. A 4 element array where each element is in the range 0 to
+ * 255. Default [255, 255, 255, 255]
+ */
+var clearAndDrawUnitQuad = function(gl, opt_color) {
+ opt_color = opt_color || [255, 255, 255, 255];
+ gl.clearColor(
+ opt_color[0] / 255,
+ opt_color[1] / 255,
+ opt_color[2] / 255,
+ opt_color[3] / 255);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ drawUnitQuad(gl);
+};
+
+/**
+ * Draws a quad previously setup with setupIndexedQuad.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number} gridRes Resolution of grid.
+ */
+var drawIndexedQuad = function(gl, gridRes) {
+ gl.drawElements(gl.TRIANGLES, gridRes * gridRes * 6, gl.UNSIGNED_SHORT, 0);
+};
+
+/**
+ * Draws a previously setupIndexedQuad
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number} gridRes Resolution of grid.
+ * @param {!Array.<number>} opt_color The color to fill clear with before
+ * drawing. A 4 element array where each element is in the range 0 to
+ * 255. Default [255, 255, 255, 255]
+ */
+var clearAndDrawIndexedQuad = function(gl, gridRes, opt_color) {
+ opt_color = opt_color || [255, 255, 255, 255];
+ gl.clearColor(
+ opt_color[0] / 255,
+ opt_color[1] / 255,
+ opt_color[2] / 255,
+ opt_color[3] / 255);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ drawIndexedQuad(gl, gridRes);
+};
+
+/**
+ * Clips a range to min, max
+ * (Eg. clipToRange(-5,7,0,20) would return {value:0,extent:2}
+ * @param {number} value start of range
+ * @param {number} extent extent of range
+ * @param {number} min min.
+ * @param {number} max max.
+ * @return {!{value:number,extent:number} The clipped value.
+ */
+var clipToRange = function(value, extent, min, max) {
+ if (value < min) {
+ extent -= min - value;
+ value = min;
+ }
+ var end = value + extent;
+ if (end > max) {
+ extent -= end - max;
+ }
+ if (extent < 0) {
+ value = max;
+ extent = 0;
+ }
+ return {value:value, extent: extent};
+};
+
+/**
+ * Determines if the passed context is an instance of a WebGLRenderingContext
+ * or later variant (like WebGL2RenderingContext)
+ * @param {CanvasRenderingContext} ctx The context to check.
+ */
+var isWebGLContext = function(ctx) {
+ if (ctx instanceof WebGLRenderingContext)
+ return true;
+
+ if ('WebGL2RenderingContext' in window && ctx instanceof WebGL2RenderingContext)
+ return true;
+
+ return false;
+};
+
+/**
+ * Checks that a portion of a canvas or the currently attached framebuffer is 1 color.
+ * @param {!WebGLRenderingContext|CanvasRenderingContext2D} gl The
+ * WebGLRenderingContext or 2D context to use.
+ * @param {number} x left corner of region to check.
+ * @param {number} y bottom corner of region to check in case of checking from
+ * a GL context or top corner in case of checking from a 2D context.
+ * @param {number} width width of region to check.
+ * @param {number} height width of region to check.
+ * @param {!Array.<number>} color The color expected. A 4 element array where
+ * each element is in the range 0 to 255.
+ * @param {number} opt_errorRange Optional. Acceptable error in
+ * color checking. 0 by default.
+ * @param {!function()} sameFn Function to call if all pixels
+ * are the same as color.
+ * @param {!function()} differentFn Function to call if a pixel
+ * is different than color
+ * @param {!function()} logFn Function to call for logging.
+ * @param {Uint8Array} opt_readBackBuf typically passed to reuse existing
+ * buffer while reading back pixels.
+ */
+var checkCanvasRectColor = function(gl, x, y, width, height, color, opt_errorRange, sameFn, differentFn, logFn, opt_readBackBuf) {
+ if (isWebGLContext(gl) && !gl.getParameter(gl.FRAMEBUFFER_BINDING)) {
+ // We're reading the backbuffer so clip.
+ var xr = clipToRange(x, width, 0, gl.canvas.width);
+ var yr = clipToRange(y, height, 0, gl.canvas.height);
+ if (!xr.extent || !yr.extent) {
+ logFn("checking rect: effective width or height is zero");
+ sameFn();
+ return;
+ }
+ x = xr.value;
+ y = yr.value;
+ width = xr.extent;
+ height = yr.extent;
+ }
+ var errorRange = opt_errorRange || 0;
+ if (!errorRange.length) {
+ errorRange = [errorRange, errorRange, errorRange, errorRange]
+ }
+ var buf;
+ if (isWebGLContext(gl)) {
+ buf = opt_readBackBuf ? opt_readBackBuf : new Uint8Array(width * height * 4);
+ gl.readPixels(x, y, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ } else {
+ buf = gl.getImageData(x, y, width, height).data;
+ }
+ for (var i = 0; i < width * height; ++i) {
+ var offset = i * 4;
+ for (var j = 0; j < color.length; ++j) {
+ if (Math.abs(buf[offset + j] - color[j]) > errorRange[j]) {
+ var was = buf[offset + 0].toString();
+ for (j = 1; j < color.length; ++j) {
+ was += "," + buf[offset + j];
+ }
+ differentFn('at (' + (x + (i % width)) + ', ' + (y + Math.floor(i / width)) +
+ ') expected: ' + color + ' was ' + was);
+ return;
+ }
+ }
+ }
+ sameFn();
+};
+
+/**
+ * Checks that a portion of a canvas or the currently attached framebuffer is 1 color.
+ * @param {!WebGLRenderingContext|CanvasRenderingContext2D} gl The
+ * WebGLRenderingContext or 2D context to use.
+ * @param {number} x left corner of region to check.
+ * @param {number} y bottom corner of region to check in case of checking from
+ * a GL context or top corner in case of checking from a 2D context.
+ * @param {number} width width of region to check.
+ * @param {number} height width of region to check.
+ * @param {!Array.<number>} color The color expected. A 4 element array where
+ * each element is in the range 0 to 255.
+ * @param {string} opt_msg Message to associate with success. Eg
+ * ("should be red").
+ * @param {number} opt_errorRange Optional. Acceptable error in
+ * color checking. 0 by default.
+ */
+var checkCanvasRect = function(gl, x, y, width, height, color, opt_msg, opt_errorRange) {
+ checkCanvasRectColor(
+ gl, x, y, width, height, color, opt_errorRange,
+ function() {
+ var msg = opt_msg;
+ if (msg === undefined)
+ msg = "should be " + color.toString();
+ testPassed(msg);
+ },
+ testFailed,
+ debug);
+};
+
+/**
+ * Checks that an entire canvas or the currently attached framebuffer is 1 color.
+ * @param {!WebGLRenderingContext|CanvasRenderingContext2D} gl The
+ * WebGLRenderingContext or 2D context to use.
+ * @param {!Array.<number>} color The color expected. A 4 element array where
+ * each element is in the range 0 to 255.
+ * @param {string} msg Message to associate with success. Eg ("should be red").
+ * @param {number} errorRange Optional. Acceptable error in
+ * color checking. 0 by default.
+ */
+var checkCanvas = function(gl, color, msg, errorRange) {
+ checkCanvasRect(gl, 0, 0, gl.canvas.width, gl.canvas.height, color, msg, errorRange);
+};
+
+/**
+ * Checks a rectangular area both inside the area and outside
+ * the area.
+ * @param {!WebGLRenderingContext|CanvasRenderingContext2D} gl The
+ * WebGLRenderingContext or 2D context to use.
+ * @param {number} x left corner of region to check.
+ * @param {number} y bottom corner of region to check in case of checking from
+ * a GL context or top corner in case of checking from a 2D context.
+ * @param {number} width width of region to check.
+ * @param {number} height width of region to check.
+ * @param {!Array.<number>} innerColor The color expected inside
+ * the area. A 4 element array where each element is in the
+ * range 0 to 255.
+ * @param {!Array.<number>} outerColor The color expected
+ * outside. A 4 element array where each element is in the
+ * range 0 to 255.
+ * @param {!number} opt_edgeSize: The number of pixels to skip
+ * around the edges of the area. Defaut 0.
+ * @param {!{width:number, height:number}} opt_outerDimensions
+ * The outer dimensions. Default the size of gl.canvas.
+ */
+var checkAreaInAndOut = function(gl, x, y, width, height, innerColor, outerColor, opt_edgeSize, opt_outerDimensions) {
+ var outerDimensions = opt_outerDimensions || { width: gl.canvas.width, height: gl.canvas.height };
+ var edgeSize = opt_edgeSize || 0;
+ checkCanvasRect(gl, x + edgeSize, y + edgeSize, width - edgeSize * 2, height - edgeSize * 2, innerColor);
+ checkCanvasRect(gl, 0, 0, x - edgeSize, outerDimensions.height, outerColor);
+ checkCanvasRect(gl, x + width + edgeSize, 0, outerDimensions.width - x - width - edgeSize, outerDimensions.height, outerColor);
+ checkCanvasRect(gl, 0, 0, outerDimensions.width, y - edgeSize, outerColor);
+ checkCanvasRect(gl, 0, y + height + edgeSize, outerDimensions.width, outerDimensions.height - y - height - edgeSize, outerColor);
+};
+
+/**
+ * Loads a texture, calls callback when finished.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {string} url URL of image to load
+ * @param {function(!Image): void} callback Function that gets called after
+ * image has loaded
+ * @return {!WebGLTexture} The created texture.
+ */
+var loadTexture = function(gl, url, callback) {
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ var image = new Image();
+ image.onload = function() {
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
+ callback(image);
+ };
+ image.src = url;
+ return texture;
+};
+
+/**
+ * Checks whether the bound texture has expected dimensions. One corner pixel
+ * of the texture will be changed as a side effect.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!WebGLTexture} texture The texture to check.
+ * @param {number} width Expected width.
+ * @param {number} height Expected height.
+ * @param {GLenum} opt_format The texture's format. Defaults to RGBA.
+ * @param {GLenum} opt_type The texture's type. Defaults to UNSIGNED_BYTE.
+ */
+var checkTextureSize = function(gl, width, height, opt_format, opt_type) {
+ opt_format = opt_format || gl.RGBA;
+ opt_type = opt_type || gl.UNSIGNED_BYTE;
+
+ var numElements = getTypedArrayElementsPerPixel(gl, opt_format, opt_type);
+ var buf = new (glTypeToTypedArrayType(gl, opt_type))(numElements);
+
+ var errors = 0;
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, width - 1, height - 1, 1, 1, opt_format, opt_type, buf);
+ if (gl.getError() != gl.NO_ERROR) {
+ testFailed("Texture was smaller than the expected size " + width + "x" + height);
+ ++errors;
+ }
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, width - 1, height, 1, 1, opt_format, opt_type, buf);
+ if (gl.getError() == gl.NO_ERROR) {
+ testFailed("Texture was taller than " + height);
+ ++errors;
+ }
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, width, height - 1, 1, 1, opt_format, opt_type, buf);
+ if (gl.getError() == gl.NO_ERROR) {
+ testFailed("Texture was wider than " + width);
+ ++errors;
+ }
+ if (errors == 0) {
+ testPassed("Texture had the expected size " + width + "x" + height);
+ }
+};
+
+/**
+ * Makes a shallow copy of an object.
+ * @param {!Object) src Object to copy
+ * @return {!Object} The copy of src.
+ */
+var shallowCopyObject = function(src) {
+ var dst = {};
+ for (var attr in src) {
+ if (src.hasOwnProperty(attr)) {
+ dst[attr] = src[attr];
+ }
+ }
+ return dst;
+};
+
+/**
+ * Checks if an attribute exists on an object case insensitive.
+ * @param {!Object) obj Object to check
+ * @param {string} attr Name of attribute to look for.
+ * @return {string?} The name of the attribute if it exists,
+ * undefined if not.
+ */
+var hasAttributeCaseInsensitive = function(obj, attr) {
+ var lower = attr.toLowerCase();
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key) && key.toLowerCase() == lower) {
+ return key;
+ }
+ }
+};
+
+/**
+ * Returns a map of URL querystring options
+ * @return {Object?} Object containing all the values in the URL querystring
+ */
+var getUrlOptions = function() {
+ var options = {};
+ var s = window.location.href;
+ var q = s.indexOf("?");
+ var e = s.indexOf("#");
+ if (e < 0) {
+ e = s.length;
+ }
+ var query = s.substring(q + 1, e);
+ var pairs = query.split("&");
+ for (var ii = 0; ii < pairs.length; ++ii) {
+ var keyValue = pairs[ii].split("=");
+ var key = keyValue[0];
+ var value = decodeURIComponent(keyValue[1]);
+ options[key] = value;
+ }
+
+ return options;
+};
+
+/**
+ * Creates a webgl context.
+ * @param {!Canvas|string} opt_canvas The canvas tag to get
+ * context from. If one is not passed in one will be
+ * created. If it's a string it's assumed to be the id of a
+ * canvas.
+ * @param {Object} opt_attributes Context attributes.
+ * @param {!number} opt_version Version of WebGL context to create
+ * @return {!WebGLRenderingContext} The created context.
+ */
+var create3DContext = function(opt_canvas, opt_attributes, opt_version) {
+ if (window.initTestingHarness) {
+ window.initTestingHarness();
+ }
+ var attributes = shallowCopyObject(opt_attributes || {});
+ if (!hasAttributeCaseInsensitive(attributes, "antialias")) {
+ attributes.antialias = false;
+ }
+ if (!opt_version) {
+ opt_version = parseInt(getUrlOptions().webglVersion, 10) || 1;
+ }
+ opt_canvas = opt_canvas || document.createElement("canvas");
+ if (typeof opt_canvas == 'string') {
+ opt_canvas = document.getElementById(opt_canvas);
+ }
+ var context = null;
+
+ var names;
+ switch (opt_version) {
+ case 2:
+ names = ["webgl2", "experimental-webgl2"]; break;
+ default:
+ names = ["webgl", "experimental-webgl"]; break;
+ }
+
+ for (var i = 0; i < names.length; ++i) {
+ try {
+ context = opt_canvas.getContext(names[i], attributes);
+ } catch (e) {
+ }
+ if (context) {
+ break;
+ }
+ }
+ if (!context) {
+ testFailed("Unable to fetch WebGL rendering context for Canvas");
+ }
+ return context;
+}
+
+/**
+ * Wraps a WebGL function with a function that throws an exception if there is
+ * an error.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {string} fname Name of function to wrap.
+ * @return {function} The wrapped function.
+ */
+var createGLErrorWrapper = function(context, fname) {
+ return function() {
+ var rv = context[fname].apply(context, arguments);
+ var err = context.getError();
+ if (err != context.NO_ERROR)
+ throw "GL error " + glEnumToString(context, err) + " in " + fname;
+ return rv;
+ };
+};
+
+/**
+ * Creates a WebGL context where all functions are wrapped to throw an exception
+ * if there is an error.
+ * @param {!Canvas} canvas The HTML canvas to get a context from.
+ * @return {!Object} The wrapped context.
+ */
+function create3DContextWithWrapperThatThrowsOnGLError(canvas) {
+ var context = create3DContext(canvas);
+ var wrap = {};
+ for (var i in context) {
+ try {
+ if (typeof context[i] == 'function') {
+ wrap[i] = createGLErrorWrapper(context, i);
+ } else {
+ wrap[i] = context[i];
+ }
+ } catch (e) {
+ error("createContextWrapperThatThrowsOnGLError: Error accessing " + i);
+ }
+ }
+ wrap.getError = function() {
+ return context.getError();
+ };
+ return wrap;
+};
+
+/**
+ * Tests that an evaluated expression generates a specific GL error.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number|Array.<number>} glErrors The expected gl error or an array of expected errors.
+ * @param {string} evalStr The string to evaluate.
+ */
+var shouldGenerateGLError = function(gl, glErrors, evalStr) {
+ var exception;
+ try {
+ eval(evalStr);
+ } catch (e) {
+ exception = e;
+ }
+ if (exception) {
+ testFailed(evalStr + " threw exception " + exception);
+ } else {
+ glErrorShouldBe(gl, glErrors, "after evaluating: " + evalStr);
+ }
+};
+
+/**
+ * Tests that the first error GL returns is the specified error.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {number|Array.<number>} glErrors The expected gl error or an array of expected errors.
+ * @param {string} opt_msg Optional additional message.
+ */
+var glErrorShouldBe = function(gl, glErrors, opt_msg) {
+ if (!glErrors.length) {
+ glErrors = [glErrors];
+ }
+ opt_msg = opt_msg || "";
+ var err = gl.getError();
+ var ndx = glErrors.indexOf(err);
+ var errStrs = [];
+ for (var ii = 0; ii < glErrors.length; ++ii) {
+ errStrs.push(glEnumToString(gl, glErrors[ii]));
+ }
+ var expected = errStrs.join(" or ");
+ if (ndx < 0) {
+ var msg = "getError expected" + ((glErrors.length > 1) ? " one of: " : ": ");
+ testFailed(msg + expected + ". Was " + glEnumToString(gl, err) + " : " + opt_msg);
+ } else {
+ var msg = "getError was " + ((glErrors.length > 1) ? "one of: " : "expected value: ");
+ testPassed(msg + expected + " : " + opt_msg);
+ }
+};
+
+/**
+ * Links a WebGL program, throws if there are errors.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!WebGLProgram} program The WebGLProgram to link.
+ * @param {function(string): void) opt_errorCallback callback for errors.
+ */
+var linkProgram = function(gl, program, opt_errorCallback) {
+ var errFn = opt_errorCallback || testFailed;
+ // Link the program
+ gl.linkProgram(program);
+
+ // Check the link status
+ var linked = gl.getProgramParameter(program, gl.LINK_STATUS);
+ if (!linked) {
+ // something went wrong with the link
+ var error = gl.getProgramInfoLog (program);
+
+ errFn("Error in program linking:" + error);
+
+ gl.deleteProgram(program);
+ }
+};
+
+/**
+ * Loads text from an external file. This function is synchronous.
+ * @param {string} url The url of the external file.
+ * @param {!function(bool, string): void} callback that is sent a bool for
+ * success and the string.
+ */
+var loadTextFileAsync = function(url, callback) {
+ log ("loading: " + url);
+ var error = 'loadTextFileSynchronous failed to load url "' + url + '"';
+ var request;
+ if (window.XMLHttpRequest) {
+ request = new XMLHttpRequest();
+ if (request.overrideMimeType) {
+ request.overrideMimeType('text/plain');
+ }
+ } else {
+ throw 'XMLHttpRequest is disabled';
+ }
+ try {
+ request.open('GET', url, true);
+ request.onreadystatechange = function() {
+ if (request.readyState == 4) {
+ var text = '';
+ // HTTP reports success with a 200 status. The file protocol reports
+ // success with zero. HTTP does not use zero as a status code (they
+ // start at 100).
+ // https://developer.mozilla.org/En/Using_XMLHttpRequest
+ var success = request.status == 200 || request.status == 0;
+ if (success) {
+ text = request.responseText;
+ }
+ log("loaded: " + url);
+ callback(success, text);
+ }
+ };
+ request.send(null);
+ } catch (e) {
+ log("failed to load: " + url);
+ callback(false, '');
+ }
+};
+
+/**
+ * Recursively loads a file as a list. Each line is parsed for a relative
+ * path. If the file ends in .txt the contents of that file is inserted in
+ * the list.
+ *
+ * @param {string} url The url of the external file.
+ * @param {!function(bool, Array<string>): void} callback that is sent a bool
+ * for success and the array of strings.
+ */
+var getFileListAsync = function(url, callback) {
+ var files = [];
+
+ var getFileListImpl = function(url, callback) {
+ var files = [];
+ if (url.substr(url.length - 4) == '.txt') {
+ loadTextFileAsync(url, function() {
+ return function(success, text) {
+ if (!success) {
+ callback(false, '');
+ return;
+ }
+ var lines = text.split('\n');
+ var prefix = '';
+ var lastSlash = url.lastIndexOf('/');
+ if (lastSlash >= 0) {
+ prefix = url.substr(0, lastSlash + 1);
+ }
+ var fail = false;
+ var count = 1;
+ var index = 0;
+ for (var ii = 0; ii < lines.length; ++ii) {
+ var str = lines[ii].replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+ if (str.length > 4 &&
+ str[0] != '#' &&
+ str[0] != ";" &&
+ str.substr(0, 2) != "//") {
+ var names = str.split(/ +/);
+ new_url = prefix + str;
+ if (names.length == 1) {
+ new_url = prefix + str;
+ ++count;
+ getFileListImpl(new_url, function(index) {
+ return function(success, new_files) {
+ log("got files: " + new_files.length);
+ if (success) {
+ files[index] = new_files;
+ }
+ finish(success);
+ };
+ }(index++));
+ } else {
+ var s = "";
+ var p = "";
+ for (var jj = 0; jj < names.length; ++jj) {
+ s += p + prefix + names[jj];
+ p = " ";
+ }
+ files[index++] = s;
+ }
+ }
+ }
+ finish(true);
+
+ function finish(success) {
+ if (!success) {
+ fail = true;
+ }
+ --count;
+ log("count: " + count);
+ if (!count) {
+ callback(!fail, files);
+ }
+ }
+ }
+ }());
+
+ } else {
+ files.push(url);
+ callback(true, files);
+ }
+ };
+
+ getFileListImpl(url, function(success, files) {
+ // flatten
+ var flat = [];
+ flatten(files);
+ function flatten(files) {
+ for (var ii = 0; ii < files.length; ++ii) {
+ var value = files[ii];
+ if (typeof(value) == "string") {
+ flat.push(value);
+ } else {
+ flatten(value);
+ }
+ }
+ }
+ callback(success, flat);
+ });
+};
+
+/**
+ * Gets a file from a file/URL.
+ * @param {string} file the URL of the file to get.
+ * @return {string} The contents of the file.
+ */
+var readFile = function(file) {
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", file, false);
+ xhr.send();
+ return xhr.responseText.replace(/\r/g, "");
+};
+
+var readFileList = function(url) {
+ var files = [];
+ if (url.substr(url.length - 4) == '.txt') {
+ var lines = readFile(url).split('\n');
+ var prefix = '';
+ var lastSlash = url.lastIndexOf('/');
+ if (lastSlash >= 0) {
+ prefix = url.substr(0, lastSlash + 1);
+ }
+ for (var ii = 0; ii < lines.length; ++ii) {
+ var str = lines[ii].replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+ if (str.length > 4 &&
+ str[0] != '#' &&
+ str[0] != ";" &&
+ str.substr(0, 2) != "//") {
+ var names = str.split(/ +/);
+ if (names.length == 1) {
+ new_url = prefix + str;
+ files = files.concat(readFileList(new_url));
+ } else {
+ var s = "";
+ var p = "";
+ for (var jj = 0; jj < names.length; ++jj) {
+ s += p + prefix + names[jj];
+ p = " ";
+ }
+ files.push(s);
+ }
+ }
+ }
+ } else {
+ files.push(url);
+ }
+ return files;
+};
+
+/**
+ * Loads a shader.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {string} shaderSource The shader source.
+ * @param {number} shaderType The type of shader.
+ * @param {function(string): void) opt_errorCallback callback for errors.
+ * @param {boolean} opt_logShaders Whether to log shader source.
+ * @param {string} opt_shaderLabel Label that identifies the shader source in
+ * the log.
+ * @param {string} opt_url URL from where the shader source was loaded from.
+ * If opt_logShaders is set, then a link to the source file will also be
+ * added.
+ * @return {!WebGLShader} The created shader.
+ */
+var loadShader = function(
+ gl, shaderSource, shaderType, opt_errorCallback, opt_logShaders,
+ opt_shaderLabel, opt_url) {
+ var errFn = opt_errorCallback || error;
+ // Create the shader object
+ var shader = gl.createShader(shaderType);
+ if (shader == null) {
+ errFn("*** Error: unable to create shader '"+shaderSource+"'");
+ return null;
+ }
+
+ // Load the shader source
+ gl.shaderSource(shader, shaderSource);
+ var err = gl.getError();
+ if (err != gl.NO_ERROR) {
+ errFn("*** Error loading shader '" + shader + "':" + glEnumToString(gl, err));
+ return null;
+ }
+
+ // Compile the shader
+ gl.compileShader(shader);
+
+ if (opt_logShaders) {
+ var label = shaderType == gl.VERTEX_SHADER ? 'vertex shader' : 'fragment_shader';
+ if (opt_shaderLabel) {
+ label = opt_shaderLabel + ' ' + label;
+ }
+ addShaderSources(
+ gl, document.getElementById('console'), label, shader, shaderSource, opt_url);
+ }
+
+ // Check the compile status
+ var compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);
+ if (!compiled) {
+ // Something went wrong during compilation; get the error
+ lastError = gl.getShaderInfoLog(shader);
+ errFn("*** Error compiling " + glEnumToString(gl, shaderType) + " '" + shader + "':" + lastError);
+ gl.deleteShader(shader);
+ return null;
+ }
+
+ return shader;
+}
+
+/**
+ * Loads a shader from a URL.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {file} file The URL of the shader source.
+ * @param {number} type The type of shader.
+ * @param {function(string): void) opt_errorCallback callback for errors.
+ * @param {boolean} opt_logShaders Whether to log shader source.
+ * @return {!WebGLShader} The created shader.
+ */
+var loadShaderFromFile = function(
+ gl, file, type, opt_errorCallback, opt_logShaders) {
+ var shaderSource = readFile(file);
+ return loadShader(gl, shaderSource, type, opt_errorCallback,
+ opt_logShaders, undefined, file);
+};
+
+/**
+ * Gets the content of script.
+ * @param {string} scriptId The id of the script tag.
+ * @return {string} The content of the script.
+ */
+var getScript = function(scriptId) {
+ var shaderScript = document.getElementById(scriptId);
+ if (!shaderScript) {
+ throw("*** Error: unknown script element " + scriptId);
+ }
+ return shaderScript.text;
+};
+
+/**
+ * Loads a shader from a script tag.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {string} scriptId The id of the script tag.
+ * @param {number} opt_shaderType The type of shader. If not passed in it will
+ * be derived from the type of the script tag.
+ * @param {function(string): void) opt_errorCallback callback for errors.
+ * @param {boolean} opt_logShaders Whether to log shader source.
+ * @return {!WebGLShader} The created shader.
+ */
+var loadShaderFromScript = function(
+ gl, scriptId, opt_shaderType, opt_errorCallback, opt_logShaders) {
+ var shaderSource = "";
+ var shaderScript = document.getElementById(scriptId);
+ if (!shaderScript) {
+ throw("*** Error: unknown script element " + scriptId);
+ }
+ shaderSource = shaderScript.text;
+
+ if (!opt_shaderType) {
+ if (shaderScript.type == "x-shader/x-vertex") {
+ opt_shaderType = gl.VERTEX_SHADER;
+ } else if (shaderScript.type == "x-shader/x-fragment") {
+ opt_shaderType = gl.FRAGMENT_SHADER;
+ } else {
+ throw("*** Error: unknown shader type");
+ return null;
+ }
+ }
+
+ return loadShader(gl, shaderSource, opt_shaderType, opt_errorCallback,
+ opt_logShaders);
+};
+
+var loadStandardProgram = function(gl) {
+ var program = gl.createProgram();
+ gl.attachShader(program, loadStandardVertexShader(gl));
+ gl.attachShader(program, loadStandardFragmentShader(gl));
+ gl.bindAttribLocation(program, 0, "a_vertex");
+ gl.bindAttribLocation(program, 1, "a_normal");
+ linkProgram(gl, program);
+ return program;
+};
+
+/**
+ * Loads shaders from files, creates a program, attaches the shaders and links.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {string} vertexShaderPath The URL of the vertex shader.
+ * @param {string} fragmentShaderPath The URL of the fragment shader.
+ * @param {function(string): void) opt_errorCallback callback for errors.
+ * @return {!WebGLProgram} The created program.
+ */
+var loadProgramFromFile = function(
+ gl, vertexShaderPath, fragmentShaderPath, opt_errorCallback) {
+ var program = gl.createProgram();
+ var vs = loadShaderFromFile(
+ gl, vertexShaderPath, gl.VERTEX_SHADER, opt_errorCallback);
+ var fs = loadShaderFromFile(
+ gl, fragmentShaderPath, gl.FRAGMENT_SHADER, opt_errorCallback);
+ if (vs && fs) {
+ gl.attachShader(program, vs);
+ gl.attachShader(program, fs);
+ linkProgram(gl, program, opt_errorCallback);
+ }
+ if (vs) {
+ gl.deleteShader(vs);
+ }
+ if (fs) {
+ gl.deleteShader(fs);
+ }
+ return program;
+};
+
+/**
+ * Loads shaders from script tags, creates a program, attaches the shaders and
+ * links.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {string} vertexScriptId The id of the script tag that contains the
+ * vertex shader.
+ * @param {string} fragmentScriptId The id of the script tag that contains the
+ * fragment shader.
+ * @param {function(string): void) opt_errorCallback callback for errors.
+ * @return {!WebGLProgram} The created program.
+ */
+var loadProgramFromScript = function loadProgramFromScript(
+ gl, vertexScriptId, fragmentScriptId, opt_errorCallback) {
+ var program = gl.createProgram();
+ gl.attachShader(
+ program,
+ loadShaderFromScript(
+ gl, vertexScriptId, gl.VERTEX_SHADER, opt_errorCallback));
+ gl.attachShader(
+ program,
+ loadShaderFromScript(
+ gl, fragmentScriptId, gl.FRAGMENT_SHADER, opt_errorCallback));
+ linkProgram(gl, program, opt_errorCallback);
+ return program;
+};
+
+/**
+ * Loads shaders from source, creates a program, attaches the shaders and
+ * links.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!WebGLShader} vertexShader The vertex shader.
+ * @param {!WebGLShader} fragmentShader The fragment shader.
+ * @param {function(string): void) opt_errorCallback callback for errors.
+ * @return {!WebGLProgram} The created program.
+ */
+var createProgram = function(gl, vertexShader, fragmentShader, opt_errorCallback) {
+ var program = gl.createProgram();
+ gl.attachShader(program, vertexShader);
+ gl.attachShader(program, fragmentShader);
+ linkProgram(gl, program, opt_errorCallback);
+ return program;
+};
+
+/**
+ * Loads shaders from source, creates a program, attaches the shaders and
+ * links.
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {string} vertexShader The vertex shader source.
+ * @param {string} fragmentShader The fragment shader source.
+ * @param {function(string): void) opt_errorCallback callback for errors.
+ * @param {boolean} opt_logShaders Whether to log shader source.
+ * @return {!WebGLProgram} The created program.
+ */
+var loadProgram = function(
+ gl, vertexShader, fragmentShader, opt_errorCallback, opt_logShaders) {
+ var program;
+ var vs = loadShader(
+ gl, vertexShader, gl.VERTEX_SHADER, opt_errorCallback, opt_logShaders);
+ var fs = loadShader(
+ gl, fragmentShader, gl.FRAGMENT_SHADER, opt_errorCallback, opt_logShaders);
+ if (vs && fs) {
+ program = createProgram(gl, vs, fs, opt_errorCallback)
+ }
+ if (vs) {
+ gl.deleteShader(vs);
+ }
+ if (fs) {
+ gl.deleteShader(fs);
+ }
+ return program;
+};
+
+/**
+ * Loads shaders from source, creates a program, attaches the shaders and
+ * links but expects error.
+ *
+ * GLSL 1.0.17 10.27 effectively says that compileShader can
+ * always succeed as long as linkProgram fails so we can't
+ * rely on compileShader failing. This function expects
+ * one of the shader to fail OR linking to fail.
+ *
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {string} vertexShaderScriptId The vertex shader.
+ * @param {string} fragmentShaderScriptId The fragment shader.
+ * @return {WebGLProgram} The created program.
+ */
+var loadProgramFromScriptExpectError = function(
+ gl, vertexShaderScriptId, fragmentShaderScriptId) {
+ var vertexShader = loadShaderFromScript(gl, vertexShaderScriptId);
+ if (!vertexShader) {
+ return null;
+ }
+ var fragmentShader = loadShaderFromScript(gl, fragmentShaderScriptId);
+ if (!fragmentShader) {
+ return null;
+ }
+ var linkSuccess = true;
+ var program = gl.createProgram();
+ gl.attachShader(program, vertexShader);
+ gl.attachShader(program, fragmentShader);
+ linkSuccess = true;
+ linkProgram(gl, program, function() {
+ linkSuccess = false;
+ });
+ return linkSuccess ? program : null;
+};
+
+
+var getActiveMap = function(gl, program, typeInfo) {
+ var numVariables = gl.getProgramParameter(program, gl[typeInfo.param]);
+ var variables = {};
+ for (var ii = 0; ii < numVariables; ++ii) {
+ var info = gl[typeInfo.activeFn](program, ii);
+ variables[info.name] = {
+ name: info.name,
+ size: info.size,
+ type: info.type,
+ location: gl[typeInfo.locFn](program, info.name)
+ };
+ }
+ return variables;
+};
+
+/**
+ * Returns a map of attrib names to info about those
+ * attribs.
+ *
+ * eg:
+ * { "attrib1Name":
+ * {
+ * name: "attrib1Name",
+ * size: 1,
+ * type: gl.FLOAT_MAT2,
+ * location: 0
+ * },
+ * "attrib2Name[0]":
+ * {
+ * name: "attrib2Name[0]",
+ * size: 4,
+ * type: gl.FLOAT,
+ * location: 1
+ * },
+ * }
+ *
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {WebGLProgram} The program to query for attribs.
+ * @return the map.
+ */
+var getAttribMap = function(gl, program) {
+ return getActiveMap(gl, program, {
+ param: "ACTIVE_ATTRIBUTES",
+ activeFn: "getActiveAttrib",
+ locFn: "getAttribLocation"
+ });
+};
+
+/**
+ * Returns a map of uniform names to info about those uniforms.
+ *
+ * eg:
+ * { "uniform1Name":
+ * {
+ * name: "uniform1Name",
+ * size: 1,
+ * type: gl.FLOAT_MAT2,
+ * location: WebGLUniformLocation
+ * },
+ * "uniform2Name[0]":
+ * {
+ * name: "uniform2Name[0]",
+ * size: 4,
+ * type: gl.FLOAT,
+ * location: WebGLUniformLocation
+ * },
+ * }
+ *
+ * @param {!WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {WebGLProgram} The program to query for uniforms.
+ * @return the map.
+ */
+var getUniformMap = function(gl, program) {
+ return getActiveMap(gl, program, {
+ param: "ACTIVE_UNIFORMS",
+ activeFn: "getActiveUniform",
+ locFn: "getUniformLocation"
+ });
+};
+
+var basePath;
+var getBasePath = function() {
+ if (!basePath) {
+ var expectedBase = "webgl-test-utils.js";
+ var scripts = document.getElementsByTagName('script');
+ for (var script, i = 0; script = scripts[i]; i++) {
+ var src = script.src;
+ var l = src.length;
+ if (src.substr(l - expectedBase.length) == expectedBase) {
+ basePath = src.substr(0, l - expectedBase.length);
+ }
+ }
+ }
+ return basePath;
+};
+
+var loadStandardVertexShader = function(gl) {
+ return loadShaderFromFile(
+ gl, getBasePath() + "vertexShader.vert", gl.VERTEX_SHADER);
+};
+
+var loadStandardFragmentShader = function(gl) {
+ return loadShaderFromFile(
+ gl, getBasePath() + "fragmentShader.frag", gl.FRAGMENT_SHADER);
+};
+
+/**
+ * Loads an image asynchronously.
+ * @param {string} url URL of image to load.
+ * @param {!function(!Element): void} callback Function to call
+ * with loaded image.
+ */
+var loadImageAsync = function(url, callback) {
+ var img = document.createElement('img');
+ img.onload = function() {
+ callback(img);
+ };
+ img.src = url;
+};
+
+/**
+ * Loads an array of images.
+ * @param {!Array.<string>} urls URLs of images to load.
+ * @param {!function(!{string, img}): void} callback. Callback
+ * that gets passed map of urls to img tags.
+ */
+var loadImagesAsync = function(urls, callback) {
+ var count = 1;
+ var images = { };
+ function countDown() {
+ --count;
+ if (count == 0) {
+ log("loadImagesAsync: all images loaded");
+ callback(images);
+ }
+ }
+ function imageLoaded(url) {
+ return function(img) {
+ images[url] = img;
+ log("loadImagesAsync: loaded " + url);
+ countDown();
+ }
+ }
+ for (var ii = 0; ii < urls.length; ++ii) {
+ ++count;
+ loadImageAsync(urls[ii], imageLoaded(urls[ii]));
+ }
+ countDown();
+};
+
+/**
+ * Returns a map of key=value values from url.
+ * @return {!Object.<string, number>} map of keys to values.
+ */
+var getUrlArguments = function() {
+ var args = {};
+ try {
+ var s = window.location.href;
+ var q = s.indexOf("?");
+ var e = s.indexOf("#");
+ if (e < 0) {
+ e = s.length;
+ }
+ var query = s.substring(q + 1, e);
+ var pairs = query.split("&");
+ for (var ii = 0; ii < pairs.length; ++ii) {
+ var keyValue = pairs[ii].split("=");
+ var key = keyValue[0];
+ var value = decodeURIComponent(keyValue[1]);
+ args[key] = value;
+ }
+ } catch (e) {
+ throw "could not parse url";
+ }
+ return args;
+};
+
+/**
+ * Makes an image from a src.
+ * @param {string} src Image source URL.
+ * @param {function} onload Callback to call when the image has finised loading.
+ * @param {function} onerror Callback to call when an error occurs.
+ * @return {!Image} The created image.
+ */
+var makeImage = function(src, onload, onerror) {
+ var img = document.createElement('img');
+ if (onload) {
+ img.onload = onload;
+ }
+ if (onerror) {
+ img.onerror = onerror;
+ } else {
+ img.onerror = function() {
+ log("WARNING: creating image failed; src: " + this.src);
+ };
+ }
+ if (src) {
+ img.src = src;
+ }
+ return img;
+}
+
+/**
+ * Makes an image element from a canvas.
+ * @param {!HTMLCanvas} canvas Canvas to make image from.
+ * @param {function} onload Callback to call when the image has finised loading.
+ * @param {string} imageFormat Image format to be passed to toDataUrl().
+ * @return {!Image} The created image.
+ */
+var makeImageFromCanvas = function(canvas, onload, imageFormat) {
+ return makeImage(canvas.toDataURL(imageFormat), onload);
+};
+
+/**
+ * Makes a video element from a src.
+ * @param {string} src Video source URL.
+ * @param {function} onerror Callback to call when an error occurs.
+ * @return {!Video} The created video.
+ */
+var makeVideo = function(src, onerror) {
+ var vid = document.createElement('video');
+ if (onerror) {
+ vid.onerror = onerror;
+ } else {
+ vid.onerror = function() {
+ log("WARNING: creating video failed; src: " + this.src);
+ };
+ }
+ if (src) {
+ vid.src = src;
+ }
+ return vid;
+}
+
+/**
+ * Inserts an image with a caption into 'element'.
+ * @param {!HTMLElement} element Element to append image to.
+ * @param {string} caption caption to associate with image.
+ * @param {!Image) img image to insert.
+ */
+var insertImage = function(element, caption, img) {
+ var div = document.createElement("div");
+ div.appendChild(img);
+ var label = document.createElement("div");
+ label.appendChild(document.createTextNode(caption));
+ div.appendChild(label);
+ element.appendChild(div);
+};
+
+/**
+ * Inserts a 'label' that when clicked expands to the pre formatted text
+ * supplied by 'source'.
+ * @param {!HTMLElement} element element to append label to.
+ * @param {string} label label for anchor.
+ * @param {string} source preformatted text to expand to.
+ * @param {string} opt_url URL of source. If provided a link to the source file
+ * will also be added.
+ */
+var addShaderSource = function(element, label, source, opt_url) {
+ var div = document.createElement("div");
+ var s = document.createElement("pre");
+ s.className = "shader-source";
+ s.style.display = "none";
+ var ol = document.createElement("ol");
+ //s.appendChild(document.createTextNode(source));
+ var lines = source.split("\n");
+ for (var ii = 0; ii < lines.length; ++ii) {
+ var line = lines[ii];
+ var li = document.createElement("li");
+ li.appendChild(document.createTextNode(line));
+ ol.appendChild(li);
+ }
+ s.appendChild(ol);
+ var l = document.createElement("a");
+ l.href = "show-shader-source";
+ l.appendChild(document.createTextNode(label));
+ l.addEventListener('click', function(event) {
+ if (event.preventDefault) {
+ event.preventDefault();
+ }
+ s.style.display = (s.style.display == 'none') ? 'block' : 'none';
+ return false;
+ }, false);
+ div.appendChild(l);
+ if (opt_url) {
+ var u = document.createElement("a");
+ u.href = opt_url;
+ div.appendChild(document.createTextNode(" "));
+ u.appendChild(document.createTextNode("(" + opt_url + ")"));
+ div.appendChild(u);
+ }
+ div.appendChild(s);
+ element.appendChild(div);
+};
+
+/**
+ * Inserts labels that when clicked expand to show the original source of the
+ * shader and also translated source of the shader, if that is available.
+ * @param {WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {!HTMLElement} element element to append label to.
+ * @param {string} label label for anchor.
+ * @param {WebGLShader} shader Shader to show the sources for.
+ * @param {string} shaderSource Original shader source.
+ * @param {string} opt_url URL of source. If provided a link to the source file
+ * will also be added.
+ */
+var addShaderSources = function(
+ gl, element, label, shader, shaderSource, opt_url) {
+ addShaderSource(element, label, shaderSource, opt_url);
+
+ var debugShaders = gl.getExtension('WEBGL_debug_shaders');
+ if (debugShaders && shader) {
+ var translatedSource = debugShaders.getTranslatedShaderSource(shader);
+ if (translatedSource != '') {
+ addShaderSource(element, label + ' translated for driver', translatedSource);
+ }
+ }
+};
+
+/**
+ * Sends shader information to the server to be dumped into text files
+ * when tests are run from within the test-runner harness.
+ * @param {WebGLRenderingContext} gl The WebGLRenderingContext to use.
+ * @param {string} url URL of current.
+ * @param {string} passMsg Test description.
+ * @param {object} vInfo Object containing vertex shader information.
+ * @param {object} fInfo Object containing fragment shader information.
+ */
+var dumpShadersInfo = function(gl, url, passMsg, vInfo, fInfo) {
+ var shaderInfo = {};
+ shaderInfo.url = url;
+ shaderInfo.testDescription = passMsg;
+ shaderInfo.vLabel = vInfo.label;
+ shaderInfo.vShouldCompile = vInfo.shaderSuccess;
+ shaderInfo.vSource = vInfo.source;
+ shaderInfo.fLabel = fInfo.label;
+ shaderInfo.fShouldCompile = fInfo.shaderSuccess;
+ shaderInfo.fSource = fInfo.source;
+ shaderInfo.vTranslatedSource = null;
+ shaderInfo.fTranslatedSource = null;
+ var debugShaders = gl.getExtension('WEBGL_debug_shaders');
+ if (debugShaders) {
+ if (vInfo.shader)
+ shaderInfo.vTranslatedSource = debugShaders.getTranslatedShaderSource(vInfo.shader);
+ if (fInfo.shader)
+ shaderInfo.fTranslatedSource = debugShaders.getTranslatedShaderSource(fInfo.shader);
+ }
+
+ var dumpShaderInfoRequest = new XMLHttpRequest();
+ dumpShaderInfoRequest.open('POST', "/dumpShaderInfo", true);
+ dumpShaderInfoRequest.setRequestHeader("Content-Type", "text/plain");
+ dumpShaderInfoRequest.send(JSON.stringify(shaderInfo));
+};
+
+// Add your prefix here.
+var browserPrefixes = [
+ "",
+ "MOZ_",
+ "OP_",
+ "WEBKIT_"
+];
+
+/**
+ * Given an extension name like WEBGL_compressed_texture_s3tc
+ * returns the name of the supported version extension, like
+ * WEBKIT_WEBGL_compressed_teture_s3tc
+ * @param {string} name Name of extension to look for.
+ * @return {string} name of extension found or undefined if not
+ * found.
+ */
+var getSupportedExtensionWithKnownPrefixes = function(gl, name) {
+ var supported = gl.getSupportedExtensions();
+ for (var ii = 0; ii < browserPrefixes.length; ++ii) {
+ var prefixedName = browserPrefixes[ii] + name;
+ if (supported.indexOf(prefixedName) >= 0) {
+ return prefixedName;
+ }
+ }
+};
+
+/**
+ * Given an extension name like WEBGL_compressed_texture_s3tc
+ * returns the supported version extension, like
+ * WEBKIT_WEBGL_compressed_teture_s3tc
+ * @param {string} name Name of extension to look for.
+ * @return {WebGLExtension} The extension or undefined if not
+ * found.
+ */
+var getExtensionWithKnownPrefixes = function(gl, name) {
+ for (var ii = 0; ii < browserPrefixes.length; ++ii) {
+ var prefixedName = browserPrefixes[ii] + name;
+ var ext = gl.getExtension(prefixedName);
+ if (ext) {
+ return ext;
+ }
+ }
+};
+
+/**
+ * Returns possible prefixed versions of an extension's name.
+ * @param {string} name Name of extension. May already include a prefix.
+ * @return {Array.<string>} Variations of the extension name with known
+ * browser prefixes.
+ */
+var getExtensionPrefixedNames = function(name) {
+ var unprefix = function(name) {
+ for (var ii = 0; ii < browserPrefixes.length; ++ii) {
+ if (browserPrefixes[ii].length > 0 &&
+ name.substring(0, browserPrefixes[ii].length).toLowerCase() ===
+ browserPrefixes[ii].toLowerCase()) {
+ return name.substring(browserPrefixes[ii].length);
+ }
+ }
+ return name;
+ }
+
+ var unprefixed = unprefix(name);
+
+ var variations = [];
+ for (var ii = 0; ii < browserPrefixes.length; ++ii) {
+ variations.push(browserPrefixes[ii] + unprefixed);
+ }
+
+ return variations;
+};
+
+var replaceRE = /\$\((\w+)\)/g;
+
+/**
+ * Replaces strings with property values.
+ * Given a string like "hello $(first) $(last)" and an object
+ * like {first:"John", last:"Smith"} will return
+ * "hello John Smith".
+ * @param {string} str String to do replacements in.
+ * @param {...} 1 or more objects containing properties.
+ */
+var replaceParams = function(str) {
+ var args = arguments;
+ return str.replace(replaceRE, function(str, p1, offset, s) {
+ for (var ii = 1; ii < args.length; ++ii) {
+ if (args[ii][p1] !== undefined) {
+ return args[ii][p1];
+ }
+ }
+ throw "unknown string param '" + p1 + "'";
+ });
+};
+
+var upperCaseFirstLetter = function(str) {
+ return str.substring(0, 1).toUpperCase() + str.substring(1);
+};
+
+/**
+ * Gets a prefixed property. For example,
+ *
+ * var fn = getPrefixedProperty(
+ * window,
+ * "requestAnimationFrame");
+ *
+ * Will return either:
+ * "window.requestAnimationFrame",
+ * "window.oRequestAnimationFrame",
+ * "window.msRequestAnimationFrame",
+ * "window.mozRequestAnimationFrame",
+ * "window.webKitRequestAnimationFrame",
+ * undefined
+ *
+ * the non-prefixed function is tried first.
+ */
+var propertyPrefixes = ["", "moz", "ms", "o", "webkit"];
+var getPrefixedProperty = function(obj, propertyName) {
+ for (var ii = 0; ii < propertyPrefixes.length; ++ii) {
+ var prefix = propertyPrefixes[ii];
+ var name = prefix + propertyName;
+ log(name);
+ var property = obj[name];
+ if (property) {
+ return property;
+ }
+ if (ii == 0) {
+ propertyName = upperCaseFirstLetter(propertyName);
+ }
+ }
+ return undefined;
+};
+
+var _requestAnimFrame;
+
+/**
+ * Provides requestAnimationFrame in a cross browser way.
+ */
+var requestAnimFrame = function(callback) {
+ if (!_requestAnimFrame) {
+ _requestAnimFrame = getPrefixedProperty(window, "requestAnimationFrame") ||
+ function(callback, element) {
+ return window.setTimeout(callback, 1000 / 70);
+ };
+ }
+ log("requestAnimFrame: document.hidden = " + document.hidden);
+ _requestAnimFrame.call(window, callback);
+};
+
+var _cancelAnimFrame;
+
+/**
+ * Provides cancelAnimationFrame in a cross browser way.
+ */
+var cancelAnimFrame = function(request) {
+ if (!_cancelAnimFrame) {
+ _cancelAnimFrame = getPrefixedProperty(window, "cancelAnimationFrame") ||
+ window.clearTimeout;
+ }
+ _cancelAnimFrame.call(window, request);
+};
+
+/**
+ * Provides requestFullScreen in a cross browser way.
+ */
+var requestFullScreen = function(element) {
+ var fn = getPrefixedProperty(element, "requestFullScreen");
+ if (fn) {
+ fn.call(element);
+ }
+};
+
+/**
+ * Provides cancelFullScreen in a cross browser way.
+ */
+var cancelFullScreen = function() {
+ var fn = getPrefixedProperty(document, "cancelFullScreen");
+ if (fn) {
+ fn.call(document);
+ }
+};
+
+var fullScreenStateName;
+(function() {
+ var fullScreenStateNames = [
+ "isFullScreen",
+ "fullScreen",
+ ];
+ for (var ii = 0; ii < fullScreenStateNames.length; ++ii) {
+ var propertyName = fullScreenStateNames[ii];
+ for (var jj = 0; jj < propertyPrefixes.length; ++jj) {
+ var prefix = propertyPrefixes[jj];
+ if (prefix.length) {
+ propertyName = upperCaseFirstLetter(propertyName);
+ fullScreenStateName = prefix + propertyName;
+ if (document[fullScreenStateName] !== undefined) {
+ return;
+ }
+ }
+ }
+ fullScreenStateName = undefined;
+ }
+}());
+
+/**
+ * @return {boolean} True if fullscreen mode is active.
+ */
+var getFullScreenState = function() {
+ log("fullscreenstatename:" + fullScreenStateName);
+ log(document[fullScreenStateName]);
+ return document[fullScreenStateName];
+};
+
+/**
+ * @param {!HTMLElement} element The element to go fullscreen.
+ * @param {!function(boolean)} callback A function that will be called
+ * when entering/exiting fullscreen. It is passed true if
+ * entering fullscreen, false if exiting.
+ */
+var onFullScreenChange = function(element, callback) {
+ propertyPrefixes.forEach(function(prefix) {
+ var eventName = prefix + "fullscreenchange";
+ log("addevent: " + eventName);
+ document.addEventListener(eventName, function(event) {
+ log("event: " + eventName);
+ callback(getFullScreenState());
+ });
+ });
+};
+
+/**
+ * @param {!string} buttonId The id of the button that will toggle fullscreen
+ * mode.
+ * @param {!string} fullscreenId The id of the element to go fullscreen.
+ * @param {!function(boolean)} callback A function that will be called
+ * when entering/exiting fullscreen. It is passed true if
+ * entering fullscreen, false if exiting.
+ * @return {boolean} True if fullscreen mode is supported.
+ */
+var setupFullscreen = function(buttonId, fullscreenId, callback) {
+ if (!fullScreenStateName) {
+ return false;
+ }
+
+ var fullscreenElement = document.getElementById(fullscreenId);
+ onFullScreenChange(fullscreenElement, callback);
+
+ var toggleFullScreen = function(event) {
+ if (getFullScreenState()) {
+ cancelFullScreen(fullscreenElement);
+ } else {
+ requestFullScreen(fullscreenElement);
+ }
+ event.preventDefault();
+ return false;
+ };
+
+ var buttonElement = document.getElementById(buttonId);
+ buttonElement.addEventListener('click', toggleFullScreen);
+
+ return true;
+};
+
+/**
+ * Waits for the browser to composite the web page.
+ * @param {function()} callback A function to call after compositing has taken
+ * place.
+ */
+var waitForComposite = function(callback) {
+ var frames = 5;
+ var countDown = function() {
+ if (frames == 0) {
+ log("waitForComposite: callback");
+ callback();
+ } else {
+ log("waitForComposite: countdown(" + frames + ")");
+ --frames;
+ requestAnimFrame.call(window, countDown);
+ }
+ };
+ countDown();
+};
+
+/**
+ * Runs an array of functions, yielding to the browser between each step.
+ * If you want to know when all the steps are finished add a last step.
+ * @param {!Array.<function(): void>} steps. Array of functions.
+ */
+var runSteps = function(steps) {
+ if (!steps.length) {
+ return;
+ }
+
+ // copy steps so they can't be modifed.
+ var stepsToRun = steps.slice();
+ var currentStep = 0;
+ var runNextStep = function() {
+ stepsToRun[currentStep++]();
+ if (currentStep < stepsToRun.length) {
+ setTimeout(runNextStep, 1);
+ }
+ };
+ runNextStep();
+};
+
+/**
+ * Starts playing a video and waits for it to be consumable.
+ * @param {!HTMLVideoElement} video An HTML5 Video element.
+ * @param {!function(!HTMLVideoElement): void>} callback Function to call when
+ * video is ready.
+ */
+var startPlayingAndWaitForVideo = function(video, callback) {
+ var gotPlaying = false;
+ var gotTimeUpdate = false;
+
+ var maybeCallCallback = function() {
+ if (gotPlaying && gotTimeUpdate && callback) {
+ callback(video);
+ callback = undefined;
+ video.removeEventListener('playing', playingListener, true);
+ video.removeEventListener('timeupdate', timeupdateListener, true);
+ }
+ };
+
+ var playingListener = function() {
+ gotPlaying = true;
+ maybeCallCallback();
+ };
+
+ var timeupdateListener = function() {
+ // Checking to make sure the current time has advanced beyond
+ // the start time seems to be a reliable heuristic that the
+ // video element has data that can be consumed.
+ if (video.currentTime > 0.0) {
+ gotTimeUpdate = true;
+ maybeCallCallback();
+ }
+ };
+
+ video.addEventListener('playing', playingListener, true);
+ video.addEventListener('timeupdate', timeupdateListener, true);
+ video.loop = true;
+ video.play();
+};
+
+var getHost = function(url) {
+ url = url.replace("\\", "/");
+ var pos = url.indexOf("://");
+ if (pos >= 0) {
+ url = url.substr(pos + 3);
+ }
+ var parts = url.split('/');
+ return parts[0];
+}
+
+// This function returns the last 2 words of the domain of a URL
+// This is probably not the correct check but it will do for now.
+var getBaseDomain = function(host) {
+ var parts = host.split(":");
+ var hostname = parts[0];
+ var port = parts[1] || "80";
+ parts = hostname.split(".");
+ if(parts.length < 2)
+ return hostname + ":" + port;
+ var tld = parts[parts.length-1];
+ var domain = parts[parts.length-2];
+ return domain + "." + tld + ":" + port;
+}
+
+var runningOnLocalhost = function() {
+ return window.location.hostname.indexOf("localhost") != -1 ||
+ window.location.hostname.indexOf("127.0.0.1") != -1;
+}
+
+var getLocalCrossOrigin = function() {
+ var domain;
+ if (window.location.host.indexOf("localhost") != -1) {
+ domain = "127.0.0.1";
+ } else {
+ domain = "localhost";
+ }
+
+ var port = window.location.port || "80";
+ return window.location.protocol + "//" + domain + ":" + port
+}
+
+var getRelativePath = function(path) {
+ var relparts = window.location.pathname.split("/");
+ relparts.pop(); // Pop off filename
+ var pathparts = path.split("/");
+
+ var i;
+ for (i = 0; i < pathparts.length; ++i) {
+ switch (pathparts[i]) {
+ case "": break;
+ case ".": break;
+ case "..":
+ relparts.pop();
+ break;
+ default:
+ relparts.push(pathparts[i]);
+ break;
+ }
+ }
+
+ return relparts.join("/");
+}
+
+var setupImageForCrossOriginTest = function(img, imgUrl, localUrl, callback) {
+ window.addEventListener("load", function() {
+ if (typeof(img) == "string")
+ img = document.querySelector(img);
+ if (!img)
+ img = new Image();
+
+ img.addEventListener("load", callback, false);
+ img.addEventListener("error", callback, false);
+
+ if (runningOnLocalhost())
+ img.src = getLocalCrossOrigin() + getRelativePath(localUrl);
+ else
+ img.src = getUrlOptions().imgUrl || imgUrl;
+ }, false);
+}
+
+return {
+ addShaderSource: addShaderSource,
+ addShaderSources: addShaderSources,
+ cancelAnimFrame: cancelAnimFrame,
+ create3DContext: create3DContext,
+ create3DContextWithWrapperThatThrowsOnGLError:
+ create3DContextWithWrapperThatThrowsOnGLError,
+ checkAreaInAndOut: checkAreaInAndOut,
+ checkCanvas: checkCanvas,
+ checkCanvasRect: checkCanvasRect,
+ checkCanvasRectColor: checkCanvasRectColor,
+ checkTextureSize: checkTextureSize,
+ clipToRange: clipToRange,
+ createColoredTexture: createColoredTexture,
+ createProgram: createProgram,
+ clearAndDrawUnitQuad: clearAndDrawUnitQuad,
+ clearAndDrawIndexedQuad: clearAndDrawIndexedQuad,
+ drawUnitQuad: drawUnitQuad,
+ drawIndexedQuad: drawIndexedQuad,
+ drawUByteColorQuad: drawUByteColorQuad,
+ drawFloatColorQuad: drawFloatColorQuad,
+ dumpShadersInfo: dumpShadersInfo,
+ endsWith: endsWith,
+ fillTexture: fillTexture,
+ getBytesPerComponent: getBytesPerComponent,
+ getExtensionPrefixedNames: getExtensionPrefixedNames,
+ getExtensionWithKnownPrefixes: getExtensionWithKnownPrefixes,
+ getFileListAsync: getFileListAsync,
+ getLastError: getLastError,
+ getPrefixedProperty: getPrefixedProperty,
+ getScript: getScript,
+ getSupportedExtensionWithKnownPrefixes: getSupportedExtensionWithKnownPrefixes,
+ getTypedArrayElementsPerPixel: getTypedArrayElementsPerPixel,
+ getUrlArguments: getUrlArguments,
+ getUrlOptions: getUrlOptions,
+ getAttribMap: getAttribMap,
+ getUniformMap: getUniformMap,
+ glEnumToString: glEnumToString,
+ glErrorShouldBe: glErrorShouldBe,
+ glTypeToTypedArrayType: glTypeToTypedArrayType,
+ hasAttributeCaseInsensitive: hasAttributeCaseInsensitive,
+ insertImage: insertImage,
+ loadImageAsync: loadImageAsync,
+ loadImagesAsync: loadImagesAsync,
+ loadProgram: loadProgram,
+ loadProgramFromFile: loadProgramFromFile,
+ loadProgramFromScript: loadProgramFromScript,
+ loadProgramFromScriptExpectError: loadProgramFromScriptExpectError,
+ loadShader: loadShader,
+ loadShaderFromFile: loadShaderFromFile,
+ loadShaderFromScript: loadShaderFromScript,
+ loadStandardProgram: loadStandardProgram,
+ loadStandardVertexShader: loadStandardVertexShader,
+ loadStandardFragmentShader: loadStandardFragmentShader,
+ loadTextFileAsync: loadTextFileAsync,
+ loadTexture: loadTexture,
+ log: log,
+ loggingOff: loggingOff,
+ makeImage: makeImage,
+ makeImageFromCanvas: makeImageFromCanvas,
+ makeVideo: makeVideo,
+ error: error,
+ shallowCopyObject: shallowCopyObject,
+ setupColorQuad: setupColorQuad,
+ setupProgram: setupProgram,
+ setupQuad: setupQuad,
+ setupIndexedQuad: setupIndexedQuad,
+ setupIndexedQuadWithOptions: setupIndexedQuadWithOptions,
+ setupSimpleColorFragmentShader: setupSimpleColorFragmentShader,
+ setupSimpleColorVertexShader: setupSimpleColorVertexShader,
+ setupSimpleColorProgram: setupSimpleColorProgram,
+ setupSimpleTextureFragmentShader: setupSimpleTextureFragmentShader,
+ setupSimpleTextureProgram: setupSimpleTextureProgram,
+ setupSimpleTextureVertexShader: setupSimpleTextureVertexShader,
+ setupSimpleVertexColorFragmentShader: setupSimpleVertexColorFragmentShader,
+ setupSimpleVertexColorProgram: setupSimpleVertexColorProgram,
+ setupSimpleVertexColorVertexShader: setupSimpleVertexColorVertexShader,
+ setupNoTexCoordTextureProgram: setupNoTexCoordTextureProgram,
+ setupNoTexCoordTextureVertexShader: setupNoTexCoordTextureVertexShader,
+ setupTexturedQuad: setupTexturedQuad,
+ setupTexturedQuadWithTexCoords: setupTexturedQuadWithTexCoords,
+ setupUnitQuad: setupUnitQuad,
+ setupUnitQuadWithTexCoords: setupUnitQuadWithTexCoords,
+ setFloatDrawColor: setFloatDrawColor,
+ setUByteDrawColor: setUByteDrawColor,
+ startPlayingAndWaitForVideo: startPlayingAndWaitForVideo,
+ startsWith: startsWith,
+ shouldGenerateGLError: shouldGenerateGLError,
+ readFile: readFile,
+ readFileList: readFileList,
+ replaceParams: replaceParams,
+ requestAnimFrame: requestAnimFrame,
+ runSteps: runSteps,
+ waitForComposite: waitForComposite,
+
+ // fullscreen api
+ setupFullscreen: setupFullscreen,
+
+ getHost: getHost,
+ getBaseDomain: getBaseDomain,
+ runningOnLocalhost: runningOnLocalhost,
+ getLocalCrossOrigin: getLocalCrossOrigin,
+ getRelativePath: getRelativePath,
+ setupImageForCrossOriginTest: setupImageForCrossOriginTest,
+
+ none: false
+};
+
+}());
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/zero-alpha.png b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/zero-alpha.png
new file mode 100644
index 000000000..e55630c11
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/resources/zero-alpha.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/00_test_list.txt
new file mode 100644
index 000000000..7ffc67eb7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/00_test_list.txt
@@ -0,0 +1,8 @@
+gl-enable-enum-test.html
+gl-enum-tests.html
+gl-get-calls.html
+gl-geterror.html
+gl-getstring.html
+gl-object-get-calls.html
+--min-version 1.0.3 state-uneffected-after-compositing.html
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-enable-enum-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-enable-enum-test.html
new file mode 100644
index 000000000..ad42f7bd6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-enable-enum-test.html
@@ -0,0 +1,163 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL gl.ENABLE enums Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+"use strict";
+description("This test ensures WebGL implementations allow OpenGL ES 2.0 features to be turned on but not non OpenGL ES 2.0 features.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking gl.ENABLE enums.");
+
+ var invalidEnums = [
+ 'ALPHA_TEST',
+ 'AUTO_NORMAL',
+ 'CLIP_PLANE0',
+ 'CLIP_PLANE1',
+ 'COLOR_LOGIC_OP',
+ 'COLOR_MATERIAL',
+ 'COLOR_SUM',
+ 'COLOR_TABLE',
+ // 'CONVOLUTION_1D',
+ // 'CONVOLUTION_2D',
+ 'FOG',
+ 'HISTOGRAM',
+ 'INDEX_LOGIC_OP',
+ 'LIGHT0',
+ 'LIGHT1',
+ 'LIGHTING',
+ 'LINE_SMOOTH',
+ 'LINE_STIPPLE',
+ 'MAP1_COLOR_4',
+ 'MAP1_INDEX',
+ 'MAP1_NORMAL',
+ 'MAP1_TEXTURE_COORD_1',
+ 'MAP1_TEXTURE_COORD_2',
+ 'MAP1_TEXTURE_COORD_3',
+ 'MAP1_TEXTURE_COORD_4',
+ 'MAP1_VERTEX_3',
+ 'MAP1_VERTEX_4',
+ 'MAP2_COLOR_4',
+ 'MAP2_INDEX',
+ 'MAP2_NORMAL',
+ 'MAP2_TEXTURE_COORD_1',
+ 'MAP2_TEXTURE_COORD_2',
+ 'MAP2_TEXTURE_COORD_3',
+ 'MAP2_TEXTURE_COORD_4',
+ 'MAP2_VERTEX_3',
+ 'MAP2_VERTEX_4',
+ 'MINMAX',
+ 'MULTISAMPLE',
+ 'NORMALIZE',
+ 'POINT_SMOOTH',
+ 'POINT_SPRITE',
+ 'POLYGON_OFFSET_LINE',
+ 'POLYGON_OFFSET_POINT',
+ 'POLYGON_SMOOTH',
+ 'POLYGON_STIPPLE',
+ 'POST_COLOR_MATRIX_COLOR_TABLE',
+ 'POST_CONVOLUTION_COLOR_TABLE',
+ 'RESCALE_NORMAL',
+ 'SAMPLE_ALPHA_TO_ONE',
+ // 'SEPARABLE_2D',
+ 'TEXTURE_1D',
+ 'TEXTURE_2D',
+ 'TEXTURE_3D',
+ 'TEXTURE_CUBE_MAP',
+ 'TEXTURE_GEN_Q',
+ 'TEXTURE_GEN_R',
+ 'TEXTURE_GEN_S',
+ 'TEXTURE_GEN_T',
+ 'VERTEX_PROGRAM_POINT_SIZE',
+ 'VERTEX_PROGRAM_TWO_SIDE'
+ ];
+
+ for (var ii = 0; ii < invalidEnums.length; ++ii) {
+ var name = invalidEnums[ii];
+ gl.enable(desktopGL[name]);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ "gl.enable must set INVALID_ENUM when passed GL_" + name );
+ }
+
+ var validEnums = [
+ 'BLEND',
+ 'CULL_FACE',
+ 'DEPTH_TEST',
+ 'DITHER',
+ 'POLYGON_OFFSET_FILL',
+ 'SAMPLE_ALPHA_TO_COVERAGE',
+ 'SAMPLE_COVERAGE',
+ 'SCISSOR_TEST',
+ 'STENCIL_TEST'
+ ];
+
+ for (var ii = 0; ii < validEnums.length; ++ii) {
+ var name = validEnums[ii];
+ gl.enable(gl[name]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "gl.enable must succeed when passed gl." + name );
+ shouldBe('gl.isEnabled(gl.' + name + ')', 'true');
+ gl.disable(gl[name]);
+ shouldBe('gl.isEnabled(gl.' + name + ')', 'false');
+ }
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-enum-tests.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-enum-tests.html
new file mode 100644
index 000000000..18facdf1c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-enum-tests.html
@@ -0,0 +1,114 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL gl enums Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../../resources/test-eval.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+"use strict";
+description("This test ensures various WebGL functions fail when passed non OpenGL ES 2.0 enums.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking gl enums.");
+
+ var buffer = new ArrayBuffer(2);
+ var buf = new Uint16Array(buffer);
+ var tex = gl.createTexture();
+ gl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer());
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ var tests = [
+ "gl.bindTexture(desktopGL['TEXTURE_3D'], tex)",
+ "gl.blendEquation(desktopGL['MIN'])",
+ "gl.blendEquation(desktopGL['MAX'])",
+ "gl.blendEquationSeparate(desktopGL['MIN'], gl.FUNC_ADD)",
+ "gl.blendEquationSeparate(desktopGL['MAX'], gl.FUNC_ADD)",
+ "gl.blendEquationSeparate(gl.FUNC_ADD, desktopGL['MIN'])",
+ "gl.blendEquationSeparate(gl.FUNC_ADD, desktopGL['MAX'])",
+ "gl.bufferData(gl.ARRAY_BUFFER, 3, desktopGL['STATIC_READ'])",
+ "gl.disable(desktopGL['CLIP_PLANE0'])",
+ "gl.disable(desktopGL['POINT_SPRITE'])",
+ "gl.getBufferParameter(gl.ARRAY_BUFFER, desktopGL['PIXEL_PACK_BUFFER'])",
+ "gl.hint(desktopGL['PERSPECTIVE_CORRECTION_HINT'], gl.FASTEST)",
+ "gl.isEnabled(desktopGL['CLIP_PLANE0'])",
+ "gl.isEnabled(desktopGL['POINT_SPRITE'])",
+ "gl.pixelStorei(desktopGL['PACK_SWAP_BYTES'], 1)",
+ ];
+ for (var ii = 0; ii < tests.length; ++ii) {
+ TestEval(tests[ii]);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ tests[ii] + " should return INVALID_ENUM.");
+ }
+
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ tests = [
+ "gl.getTexParameter(gl.TEXTURE_2D, desktopGL['GENERATE_MIPMAP'])",
+ "gl.texParameteri(desktopGL['TEXTURE_3D'], gl.TEXTURE_MAG_FILTER, gl.NEAREST)",
+ "gl.texParameteri(gl.TEXTURE_2D, desktopGL['GENERATE_MIPMAP'], 1)"
+ ];
+ for (var ii = 0; ii < tests.length; ++ii) {
+ TestEval(tests[ii]);
+ wtu.glErrorShouldBe(gl, gl.INVALID_ENUM,
+ tests[ii] + " should return INVALID_ENUM.");
+ }
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html
new file mode 100644
index 000000000..2cb967df0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html
@@ -0,0 +1,221 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL gl calls Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+"use strict";
+description("This test ensures basic functionality of the underlying graphics library");
+
+debug("");
+debug("Canvas.getContext");
+
+var minimumRequiredStencilMask = 0;
+var wtu = WebGLTestUtils;
+var context = wtu.create3DContext("canvas");
+if (!context)
+ testFailed("context does not exist");
+else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Context contains getError");
+ if ("getError" in context)
+ testPassed("context contains getError");
+ else
+ testFailed("context does not contains getError");
+
+ debug("");
+ debug("Check default values");
+ shouldBe('context.getParameter(context.ACTIVE_TEXTURE)', 'context.TEXTURE0');
+ shouldBe('(context.getParameter(context.ALIASED_LINE_WIDTH_RANGE)[0] <= 1) && (context.getParameter(context.ALIASED_LINE_WIDTH_RANGE)[0] > 0) && (context.getParameter(context.ALIASED_LINE_WIDTH_RANGE)[1] >= 1)', 'true');
+ shouldBe('(context.getParameter(context.ALIASED_POINT_SIZE_RANGE)[0] <= 1) && (context.getParameter(context.ALIASED_POINT_SIZE_RANGE)[0] > 0) && (context.getParameter(context.ALIASED_POINT_SIZE_RANGE)[1] >= 1)', 'true');
+ shouldBeType('context.getParameter(context.ALIASED_LINE_WIDTH_RANGE)', 'Float32Array');
+ shouldBeType('context.getParameter(context.ALIASED_POINT_SIZE_RANGE)', 'Float32Array');
+ shouldBe('context.getParameter(context.ARRAY_BUFFER_BINDING)', 'null');
+ shouldBe('context.getParameter(context.BLEND)', 'false');
+ shouldBe('context.getParameter(context.BLEND_COLOR)', '[0, 0, 0, 0]');
+ shouldBeType('context.getParameter(context.BLEND_COLOR)', 'Float32Array');
+ shouldBe('context.getParameter(context.BLEND_DST_ALPHA)', '0');
+ shouldBe('context.getParameter(context.BLEND_DST_RGB)', '0');
+ shouldBe('context.getParameter(context.BLEND_EQUATION_ALPHA)', 'context.FUNC_ADD');
+ shouldBe('context.getParameter(context.BLEND_EQUATION_RGB)', 'context.FUNC_ADD');
+ shouldBe('context.getParameter(context.BLEND_SRC_ALPHA)', '1');
+ shouldBe('context.getParameter(context.BLEND_SRC_RGB)', '1');
+ shouldBe('context.getParameter(context.COLOR_CLEAR_VALUE)', '[0, 0, 0, 0]');
+ shouldBeType('context.getParameter(context.COLOR_CLEAR_VALUE)', 'Float32Array');
+ shouldBe('context.getParameter(context.COLOR_WRITEMASK)', '[true, true, true, true]');
+ shouldBeType('context.getParameter(context.COMPRESSED_TEXTURE_FORMATS)', 'Uint32Array');
+ shouldBe('context.getParameter(context.CULL_FACE)', 'false');
+ shouldBe('context.getParameter(context.CULL_FACE_MODE)', 'context.BACK');
+ shouldBe('context.getParameter(context.CURRENT_PROGRAM)', 'null');
+ shouldBe('context.getParameter(context.DEPTH_CLEAR_VALUE)', '1');
+ shouldBe('context.getParameter(context.DEPTH_FUNC)', 'context.LESS');
+ shouldBe('context.getParameter(context.DEPTH_RANGE)', '[0, 1]');
+ shouldBeType('context.getParameter(context.DEPTH_RANGE)', 'Float32Array');
+ shouldBe('context.getParameter(context.DEPTH_TEST)', 'false');
+ shouldBe('context.getParameter(context.DEPTH_WRITEMASK)', 'true');
+ shouldBe('context.getParameter(context.DITHER)', 'true');
+ shouldBe('context.getParameter(context.ELEMENT_ARRAY_BUFFER_BINDING)', 'null');
+ shouldBe('context.getParameter(context.FRONT_FACE)', 'context.CCW');
+ shouldBe('context.getParameter(context.GENERATE_MIPMAP_HINT)', 'context.DONT_CARE');
+ shouldBe('context.getParameter(context.LINE_WIDTH)', '1');
+ shouldBe('context.getParameter(context.PACK_ALIGNMENT)', '4');
+ shouldBe('context.getParameter(context.POLYGON_OFFSET_FACTOR)', '0');
+ shouldBe('context.getParameter(context.POLYGON_OFFSET_FILL)', 'false');
+ shouldBe('context.getParameter(context.POLYGON_OFFSET_UNITS)', '0');
+ shouldBe('context.getParameter(context.RENDERBUFFER_BINDING)', 'null');
+ shouldBe('context.getParameter(context.SAMPLE_COVERAGE_INVERT)', 'false');
+ shouldBe('context.getParameter(context.SAMPLE_COVERAGE_VALUE)', '1');
+ shouldBe('context.getParameter(context.SCISSOR_BOX)[0]', '0');
+ shouldBe('context.getParameter(context.SCISSOR_BOX)[1]', '0');
+ shouldBe('context.getParameter(context.SCISSOR_BOX)[2]', 'context.getParameter(context.VIEWPORT)[2]');
+ shouldBe('context.getParameter(context.SCISSOR_BOX)[3]', 'context.getParameter(context.VIEWPORT)[3]');
+ shouldBeType('context.getParameter(context.SCISSOR_BOX)', Int32Array);
+ shouldBe('context.getParameter(context.SCISSOR_TEST)', 'false');
+ shouldBe('context.getParameter(context.STENCIL_BACK_FAIL)', 'context.KEEP');
+ shouldBe('context.getParameter(context.STENCIL_BACK_FUNC)', 'context.ALWAYS');
+ shouldBe('context.getParameter(context.STENCIL_BACK_PASS_DEPTH_FAIL)', 'context.KEEP');
+ shouldBe('context.getParameter(context.STENCIL_BACK_PASS_DEPTH_PASS)', 'context.KEEP');
+ shouldBe('context.getParameter(context.STENCIL_BACK_REF)', '0');
+
+ // WebGL 1.0.2 - 5.14.3 types / ES 2.0.25 - 6.2 State tables - 6.18 page 152
+ shouldBeType('context.getParameter(context.SUBPIXEL_BITS)', 'Number');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.SUBPIXEL_BITS)', '4');
+
+ shouldBeType('context.getParameter(context.SAMPLE_BUFFERS)', 'Number');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.SAMPLE_BUFFERS)', '0');
+
+ shouldBeType('context.getParameter(context.SAMPLES)', 'Number');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.SAMPLES)', '0');
+
+ shouldBeType('context.getParameter(context.DEPTH_BITS)', 'Number');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.DEPTH_BITS)', '0');
+ shouldBeType('context.getParameter(context.RED_BITS)', 'Number');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.RED_BITS)', '0');
+ shouldBeType('context.getParameter(context.GREEN_BITS)', 'Number');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.GREEN_BITS)', '0');
+ shouldBeType('context.getParameter(context.BLUE_BITS)', 'Number');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.BLUE_BITS)', '0');
+ shouldBeType('context.getParameter(context.ALPHA_BITS)', 'Number');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.ALPHA_BITS)', '0');
+ shouldBeType('context.getParameter(context.STENCIL_BITS)', 'Number');
+
+ var stencilBits = context.getParameter(context.STENCIL_BITS);
+ minimumRequiredStencilMask = (1 << stencilBits) - 1;
+
+ shouldBe('context.getParameter(context.STENCIL_BACK_VALUE_MASK) & minimumRequiredStencilMask', 'minimumRequiredStencilMask');
+ shouldBe('context.getParameter(context.STENCIL_BACK_WRITEMASK) & minimumRequiredStencilMask', 'minimumRequiredStencilMask');
+
+ // If EXT_packed_depth_stencil is supported, STENCIL_BITS > 0; otherwise, STENCIL_BITS == 0.
+ shouldBe('context.getParameter(context.STENCIL_BITS) >= 0', 'true');
+ shouldBe('context.getParameter(context.STENCIL_CLEAR_VALUE)', '0');
+ shouldBe('context.getParameter(context.STENCIL_FAIL)', 'context.KEEP');
+ shouldBe('context.getParameter(context.STENCIL_FUNC)', 'context.ALWAYS');
+ shouldBe('context.getParameter(context.STENCIL_PASS_DEPTH_FAIL)', 'context.KEEP');
+ shouldBe('context.getParameter(context.STENCIL_PASS_DEPTH_PASS)', 'context.KEEP');
+ shouldBe('context.getParameter(context.STENCIL_REF)', '0');
+ shouldBe('context.getParameter(context.STENCIL_TEST)', 'false');
+
+ shouldBe('context.getParameter(context.STENCIL_VALUE_MASK) & minimumRequiredStencilMask', 'minimumRequiredStencilMask');
+ shouldBe('context.getParameter(context.STENCIL_WRITEMASK) & minimumRequiredStencilMask', 'minimumRequiredStencilMask');
+
+ shouldBe('context.getParameter(context.TEXTURE_BINDING_2D)', 'null');
+ shouldBe('context.getParameter(context.TEXTURE_BINDING_CUBE_MAP)', 'null');
+ shouldBe('context.getParameter(context.UNPACK_ALIGNMENT)', '4');
+ shouldBe('context.getParameter(context.UNPACK_FLIP_Y_WEBGL)', 'false');
+ shouldBe('context.getParameter(context.UNPACK_PREMULTIPLY_ALPHA_WEBGL)', 'false');
+ shouldBe('context.getParameter(context.VIEWPORT)', '[0, 0, 2, 2]');
+ shouldBeType('context.getParameter(context.VIEWPORT)', 'Int32Array');
+
+ shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_COMBINED_TEXTURE_IMAGE_UNITS)', '8');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_CUBE_MAP_TEXTURE_SIZE)', '16');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_FRAGMENT_UNIFORM_VECTORS)', '16');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_RENDERBUFFER_SIZE)', '1');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_TEXTURE_IMAGE_UNITS)', '8');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_TEXTURE_SIZE)', '64');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_VARYING_VECTORS)', '8');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_VERTEX_ATTRIBS)', '8');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_VERTEX_TEXTURE_IMAGE_UNITS)', '0');
+ shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_VERTEX_UNIFORM_VECTORS)', '128');
+ // Note: This requirement should be removed from the spec IMO. Many impelementations
+ // will be based on FBOs and FBOs might have a restriction smaller than the current screen size.
+ // especially if there are multiple screens.
+ shouldBeTrue('context.getParameter(context.MAX_VIEWPORT_DIMS)[0] >= window.screen.width');
+ shouldBeTrue('context.getParameter(context.MAX_VIEWPORT_DIMS)[1] >= window.screen.height');
+ shouldBeType('context.getParameter(context.MAX_VIEWPORT_DIMS)', 'Int32Array');
+
+ debug("");
+ debug("check texture values");
+ var maxTextures = context.getParameter(context.MAX_TEXTURE_IMAGE_UNITS);
+ for (var ii = 0; ii < maxTextures; ++ii) {
+ context.activeTexture(context.TEXTURE0 + ii);
+ debug("check texture unit: " + ii);
+ shouldBe('context.getParameter(context.TEXTURE_BINDING_2D)', 'null');
+ shouldBe('context.getParameter(context.TEXTURE_BINDING_CUBE_MAP)', 'null');
+ }
+
+ debug("");
+ debug("check attrib values");
+ var maxAttribs = context.getParameter(context.MAX_VERTEX_ATTRIBS);
+ for (var ii = 0; ii < maxAttribs; ++ii) {
+ debug("check attrib: " + ii);
+ shouldBe('context.getVertexAttrib(ii, context.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)', 'null');
+ shouldBe('context.getVertexAttrib(ii, context.VERTEX_ATTRIB_ARRAY_ENABLED)', 'false');
+ shouldBe('context.getVertexAttrib(ii, context.VERTEX_ATTRIB_ARRAY_SIZE)', '4');
+ shouldBe('context.getVertexAttrib(ii, context.VERTEX_ATTRIB_ARRAY_STRIDE)', '0');
+ shouldBe('context.getVertexAttrib(ii, context.VERTEX_ATTRIB_ARRAY_TYPE)', 'context.FLOAT');
+ shouldBe('context.getVertexAttrib(ii, context.VERTEX_ATTRIB_ARRAY_NORMALIZED)', 'false');
+ shouldBe('context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB)', '[0, 0, 0, 1]');
+ shouldBeType('context.getVertexAttrib(ii, context.CURRENT_VERTEX_ATTRIB)', 'Float32Array');
+ shouldBe('context.getVertexAttribOffset(ii, context.VERTEX_ATTRIB_ARRAY_POINTER)', '0');
+ }
+
+ shouldBe('context.getError()', 'context.NO_ERROR');
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-geterror.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-geterror.html
new file mode 100644
index 000000000..fb44941ca
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-geterror.html
@@ -0,0 +1,100 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL get error conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="1" height="1" style="width: 256px; height: 48px;"></canvas>
+<div id="description"></div><div id="console"></div>
+<script>
+"use strict";
+description("Test getError.");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var tex = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex);
+
+gl.enable(desktopGL.ALPHA_TEST);
+wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "should generate INVALID_ENUM");
+gl.viewport(-1, -1, -1, -1);
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "should generate INVALID_VALUE");
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "should generate INVALID_OPERATION");
+
+// Generate 2 errors of each type for 6 total possible errors.
+// The OpenGL ES 2.0 spec section 2.5 says the implementation is allowed to
+// either return the first error or many errors in an unspecied order.
+gl.viewport(-1, -1, -1, -1);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+gl.enable(desktopGL.ALPHA_TEST);
+gl.viewport(-1, -1, -1, -1);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+// Note: This error is specifically last because we know it will be synthasized
+// by WebGL at least when implemented on top of Desktop OpenGL
+gl.enable(desktopGL.ALPHA_TEST);
+
+var err1 = gl.getError();
+var err2 = gl.getError();
+var err3 = gl.getError();
+var err4 = gl.getError();
+var err5 = gl.getError();
+var err6 = gl.getError();
+
+debug("");
+if (err2 == gl.NO_ERROR) {
+ debug("This WebGL implementation looks like it uses the 'first error' method");
+ debug("There should be 1 error, the first one generated");
+ shouldBeTrue('err1 == gl.INVALID_VALUE && err2 == gl.NO_ERROR && err3 == gl.NO_ERROR');
+} else {
+ debug("This WebGL implementation looks like it uses the many error method");
+ debug("Check is that at least one of the errors is the first error");
+ shouldBeTrue('err1 == gl.INVALID_VALUE || ' +
+ 'err2 == gl.INVALID_VALUE || ' +
+ 'err3 == gl.INVALID_VALUE || ' +
+ 'err4 == gl.INVALID_VALUE || ' +
+ 'err5 == gl.INVALID_VALUE || ' +
+ 'err6 == gl.INVALID_VALUE');
+ shouldBeTrue('gl.getError() == gl.NO_ERROR');
+}
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-getstring.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-getstring.html
new file mode 100644
index 000000000..fa4d51551
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-getstring.html
@@ -0,0 +1,83 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL gl.getParameter Strings Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+"use strict";
+description("This test checks getParameter returns strings in the correct format");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ checkPrefix("WebGL 1.0", "VERSION");
+ checkPrefix("WebGL GLSL ES 1.0", "SHADING_LANGUAGE_VERSION");
+ shouldBeNonNull("gl.getParameter(gl.VENDOR)");
+ shouldBeNonNull("gl.getParameter(gl.RENDERER)");
+ shouldBe("gl.getError()", "gl.NO_ERROR");
+}
+
+function checkPrefix(expected, enum_val) {
+ var s = gl.getParameter(gl[enum_val]);
+ if (s != null &&
+ s.length >= expected.length &&
+ s.substring(0, expected.length) == expected) {
+ testPassed("getParameter(gl." + enum_val + ") correctly started with " + expected);
+ } else {
+ testFailed("getParameter(gl." + enum_val + ") did not start with " + expected);
+ }
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-object-get-calls.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-object-get-calls.html
new file mode 100644
index 000000000..4fedc675b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/gl-object-get-calls.html
@@ -0,0 +1,464 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+description("Test of get calls against GL objects like getBufferParameter, etc.");
+
+function sizeInBytes(type) {
+ switch (type) {
+ case gl.BYTE:
+ case gl.UNSIGNED_BYTE:
+ return 1;
+ case gl.SHORT:
+ case gl.UNSIGNED_SHORT:
+ return 2;
+ case gl.INT:
+ case gl.UNSIGNED_INT:
+ case gl.FLOAT:
+ return 4;
+ default:
+ throw "unknown type";
+ }
+}
+
+var gl = wtu.create3DContext();
+
+debug("test getAttachedShaders");
+var standardVert = wtu.loadStandardVertexShader(gl);
+var standardFrag = wtu.loadStandardFragmentShader(gl);
+var standardProgram = gl.createProgram();
+gl.attachShader(standardProgram, standardVert);
+gl.attachShader(standardProgram, standardFrag);
+gl.linkProgram(standardProgram);
+var shaders = gl.getAttachedShaders(standardProgram);
+shouldBe('shaders.length', '2');
+shouldBeTrue('shaders[0] == standardVert && shaders[1] == standardFrag || shaders[1] == standardVert && shaders[0] == standardFrag');
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeNull('gl.getAttachedShaders(null)');
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE);
+shouldThrow('gl.getAttachedShaders(standardVert)');
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+function testInvalidArgument(funcName, argumentName, validArgumentArray, func) {
+ var validArguments = {};
+ for (var ii = 0; ii < validArgumentArray.length; ++ii) {
+ validArguments[validArgumentArray[ii]] = true;
+ }
+ var success = true;
+ for (var ii = 0; ii < 0x10000; ++ii) {
+ if (!validArguments[ii]) {
+ var result = func(ii);
+ if (result !== null) {
+ success = false;
+ testFailed(funcName + " returned " + result + " instead of null for invalid " + argumentName + " enum: " + wtu.glEnumToString(gl, ii));
+ break;
+ }
+ var err = gl.getError();
+ if (err != gl.INVALID_ENUM) {
+ success = false;
+ testFailed(funcName + " did not generate INVALID_ENUM for invalid " + argumentName + " enum: " + wtu.glEnumToString(gl, ii));
+ break;
+ }
+ }
+ }
+ if (success) {
+ testPassed(funcName + " correctly handled invalid " + argumentName + " enums");
+ }
+}
+
+debug("");
+debug("test getBufferParameter");
+// Test getBufferParameter
+var bufferTypes = [gl.ARRAY_BUFFER, gl.ELEMENT_ARRAY_BUFFER];
+for (var bb = 0; bb < bufferTypes.length; ++bb) {
+ var bufferType = bufferTypes[bb];
+ var buffer = gl.createBuffer();
+ gl.bindBuffer(bufferType, buffer);
+ gl.bufferData(bufferType, 16, gl.DYNAMIC_DRAW);
+ var expression1 = "gl.getBufferParameter(gl." + wtu.glEnumToString(gl, bufferType) + ", gl.BUFFER_SIZE)";
+ var expression2 = "gl.getBufferParameter(gl." + wtu.glEnumToString(gl, bufferType) + ", gl.BUFFER_USAGE)";
+ shouldBe(expression1, '16');
+ shouldBe(expression2, 'gl.DYNAMIC_DRAW');
+ testInvalidArgument("getBufferParameter", "parameter", [gl.BUFFER_SIZE, gl.BUFFER_USAGE], function(bufferType) {
+ return function(parameter) {
+ return gl.getBufferParameter(bufferType, parameter);
+ };
+ }(bufferType));
+}
+testInvalidArgument(
+ "getBufferParameter",
+ "target",
+ bufferTypes,
+ function(target) {
+ return gl.getBufferParameter(target, gl.BUFFER_SIZE);
+ }
+);
+
+
+debug("");
+debug("Test getFramebufferAttachmentParameter");
+var texture = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, texture);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2, 2, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array([
+ 0, 0, 0, 255,
+ 255, 255, 255, 255,
+ 255, 255, 255, 255,
+ 0, 0, 0, 255]));
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+gl.bindTexture(gl.TEXTURE_2D, null);
+var framebuffer = gl.createFramebuffer();
+gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
+gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
+var renderbuffer = gl.createRenderbuffer();
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, 2, 2);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, renderbuffer);
+// FIXME: on some machines (in particular the WebKit commit bots) the
+// framebuffer status is FRAMEBUFFER_UNSUPPORTED; more investigation
+// is needed why this is the case, because the FBO allocated
+// internally by the WebKit implementation has almost identical
+// parameters to this one. See https://bugs.webkit.org/show_bug.cgi?id=31843.
+shouldBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+shouldBe('gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)', 'gl.TEXTURE');
+shouldBe('gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)', 'texture');
+shouldBe('gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL)', '0');
+shouldBe('gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE)', '0');
+
+shouldBe('gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)', 'gl.RENDERBUFFER');
+shouldBe('gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)', 'renderbuffer');
+testInvalidArgument(
+ "getFramebufferAttachmentParameter",
+ "parameter",
+ [ gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
+ gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME,
+ gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL,
+ gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
+ ],
+ function(parameter) {
+ return gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT, parameter);
+ }
+);
+testInvalidArgument(
+ "getFramebufferAttachmentParameter",
+ "target",
+ [ gl.FRAMEBUFFER ],
+ function(target) {
+ return gl.getFramebufferAttachmentParameter(target, gl.COLOR_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE);
+ }
+);
+testInvalidArgument(
+ "getFramebufferAttachmentParameter",
+ "attachment",
+ [ gl.COLOR_ATTACHMENT0,
+ gl.DEPTH_ATTACHMENT,
+ gl.STENCIL_ATTACHMENT,
+ gl.DEPTH_STENCIL_ATTACHMENT
+ ],
+ function(attachment) {
+ return gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, attachment, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE);
+ }
+);
+
+
+debug("");
+debug("Test getProgramParameter");
+shouldBe('gl.getProgramParameter(standardProgram, gl.DELETE_STATUS)', 'false');
+shouldBe('gl.getProgramParameter(standardProgram, gl.LINK_STATUS)', 'true');
+shouldBe('typeof gl.getProgramParameter(standardProgram, gl.VALIDATE_STATUS)', '"boolean"');
+shouldBe('gl.getProgramParameter(standardProgram, gl.ATTACHED_SHADERS)', '2');
+shouldBe('gl.getProgramParameter(standardProgram, gl.ACTIVE_ATTRIBUTES)', '2');
+shouldBe('gl.getProgramParameter(standardProgram, gl.ACTIVE_UNIFORMS)', '1');
+testInvalidArgument(
+ "getProgramParameter",
+ "parameter",
+ [ gl.DELETE_STATUS,
+ gl.LINK_STATUS,
+ gl.VALIDATE_STATUS,
+ gl.ATTACHED_SHADERS,
+ gl.ACTIVE_ATTRIBUTES,
+ gl.ACTIVE_UNIFORMS
+ ],
+ function(parameter) {
+ return gl.getProgramParameter(standardProgram, parameter);
+ }
+);
+
+debug("");
+debug("Test getRenderbufferParameter");
+shouldBe('gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_WIDTH)', '2');
+shouldBe('gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_HEIGHT)', '2');
+// Note: we can't test the actual value of the internal format since
+// the implementation is allowed to change it.
+shouldBeNonZero('gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_INTERNAL_FORMAT)');
+shouldBeNonZero('gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_DEPTH_SIZE)');
+var colorbuffer = gl.createRenderbuffer();
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 2, 2);
+shouldBeNonZero('gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_RED_SIZE)');
+shouldBeNonZero('gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_GREEN_SIZE)');
+shouldBeNonZero('gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_BLUE_SIZE)');
+shouldBeNonZero('gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_ALPHA_SIZE)');
+testInvalidArgument(
+ "getRenderbufferParameter",
+ "parameter",
+ [ gl.RENDERBUFFER_WIDTH,
+ gl.RENDERBUFFER_HEIGHT,
+ gl.RENDERBUFFER_INTERNAL_FORMAT,
+ gl.RENDERBUFFER_RED_SIZE,
+ gl.RENDERBUFFER_GREEN_SIZE,
+ gl.RENDERBUFFER_BLUE_SIZE,
+ gl.RENDERBUFFER_ALPHA_SIZE,
+ gl.RENDERBUFFER_DEPTH_SIZE,
+ gl.RENDERBUFFER_STENCIL_SIZE,
+ ],
+ function(parameter) {
+ return gl.getRenderbufferParameter(gl.RENDERBUFFER, parameter);
+ });
+testInvalidArgument(
+ "getRenderbufferParameter",
+ "target",
+ [ gl.RENDERBUFFER ],
+ function(target) {
+ return gl.getRenderbufferParameter(target, gl.RENDERBUFFER_WIDTH);
+ });
+
+debug("");
+debug("Test getShaderParameter");
+shouldBe('gl.getShaderParameter(standardVert, gl.SHADER_TYPE)', 'gl.VERTEX_SHADER');
+shouldBe('gl.getShaderParameter(standardVert, gl.DELETE_STATUS)', 'false');
+shouldBe('gl.getShaderParameter(standardVert, gl.COMPILE_STATUS)', 'true');
+testInvalidArgument(
+ "getShaderParameter",
+ "parameter",
+ [ gl.DELETE_STATUS,
+ gl.COMPILE_STATUS,
+ gl.SHADER_TYPE
+ ],
+ function(parameter) {
+ return gl.getShaderParameter(standardVert, parameter);
+ }
+);
+
+debug("");
+debug("Test getTexParameter");
+gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
+gl.bindTexture(gl.TEXTURE_2D, texture);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+shouldBe('gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER)', 'gl.NEAREST');
+shouldBe('gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER)', 'gl.NEAREST');
+shouldBe('gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S)', 'gl.CLAMP_TO_EDGE');
+shouldBe('gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T)', 'gl.CLAMP_TO_EDGE');
+testInvalidArgument(
+ "getTexParameter",
+ "parameter",
+ [ gl.TEXTURE_MAG_FILTER,
+ gl.TEXTURE_MIN_FILTER,
+ gl.TEXTURE_WRAP_S,
+ gl.TEXTURE_WRAP_T
+ ],
+ function(parameter) {
+ return gl.getTexParameter(gl.TEXTURE_2D, parameter);
+ }
+);
+testInvalidArgument(
+ "getTexParameter",
+ "target",
+ [ gl.TEXTURE_2D,
+ gl.TEXTURE_CUBE_MAP
+ ],
+ function(target) {
+ return gl.getTexParameter(target, gl.TEXTURE_MAG_FILTER);
+ }
+);
+
+debug("");
+debug("Test getUniform with all variants of data types");
+// Boolean uniform variables
+var boolProgram = wtu.loadProgramFromFile(gl, "../resources/boolUniformShader.vert", "../resources/noopUniformShader.frag");
+shouldBe('gl.getProgramParameter(boolProgram, gl.LINK_STATUS)', 'true');
+var bvalLoc = gl.getUniformLocation(boolProgram, "bval");
+var bval2Loc = gl.getUniformLocation(boolProgram, "bval2");
+var bval3Loc = gl.getUniformLocation(boolProgram, "bval3");
+var bval4Loc = gl.getUniformLocation(boolProgram, "bval4");
+gl.useProgram(boolProgram);
+gl.uniform1i(bvalLoc, 1);
+gl.uniform2i(bval2Loc, 1, 0);
+gl.uniform3i(bval3Loc, 1, 0, 1);
+gl.uniform4i(bval4Loc, 1, 0, 1, 0);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBe('gl.getUniform(boolProgram, bvalLoc)', 'true');
+shouldBe('gl.getUniform(boolProgram, bval2Loc)', '[true, false]');
+shouldBe('gl.getUniform(boolProgram, bval3Loc)', '[true, false, true]');
+shouldBe('gl.getUniform(boolProgram, bval4Loc)', '[true, false, true, false]');
+// Integer uniform variables
+var intProgram = wtu.loadProgramFromFile(gl, "../resources/intUniformShader.vert", "../resources/noopUniformShader.frag");
+shouldBe('gl.getProgramParameter(intProgram, gl.LINK_STATUS)', 'true');
+var ivalLoc = gl.getUniformLocation(intProgram, "ival");
+var ival2Loc = gl.getUniformLocation(intProgram, "ival2");
+var ival3Loc = gl.getUniformLocation(intProgram, "ival3");
+var ival4Loc = gl.getUniformLocation(intProgram, "ival4");
+gl.useProgram(intProgram);
+gl.uniform1i(ivalLoc, 1);
+gl.uniform2i(ival2Loc, 2, 3);
+gl.uniform3i(ival3Loc, 4, 5, 6);
+gl.uniform4i(ival4Loc, 7, 8, 9, 10);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBe('gl.getUniform(intProgram, ivalLoc)', '1');
+shouldBe('gl.getUniform(intProgram, ival2Loc)', '[2, 3]');
+shouldBe('gl.getUniform(intProgram, ival3Loc)', '[4, 5, 6]');
+shouldBe('gl.getUniform(intProgram, ival4Loc)', '[7, 8, 9, 10]');
+// Float uniform variables
+var floatProgram = wtu.loadProgramFromFile(gl, "../resources/floatUniformShader.vert", "../resources/noopUniformShader.frag");
+shouldBe('gl.getProgramParameter(floatProgram, gl.LINK_STATUS)', 'true');
+var fvalLoc = gl.getUniformLocation(floatProgram, "fval");
+var fval2Loc = gl.getUniformLocation(floatProgram, "fval2");
+var fval3Loc = gl.getUniformLocation(floatProgram, "fval3");
+var fval4Loc = gl.getUniformLocation(floatProgram, "fval4");
+gl.useProgram(floatProgram);
+gl.uniform1f(fvalLoc, 11);
+gl.uniform2f(fval2Loc, 12, 13);
+gl.uniform3f(fval3Loc, 14, 15, 16);
+gl.uniform4f(fval4Loc, 17, 18, 19, 20);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBe('gl.getUniform(floatProgram, fvalLoc)', '11');
+shouldBe('gl.getUniform(floatProgram, fval2Loc)', '[12, 13]');
+shouldBe('gl.getUniform(floatProgram, fval3Loc)', '[14, 15, 16]');
+shouldBe('gl.getUniform(floatProgram, fval4Loc)', '[17, 18, 19, 20]');
+// Sampler uniform variables
+var samplerProgram = wtu.loadProgramFromFile(gl, "../resources/noopUniformShader.vert", "../resources/samplerUniformShader.frag");
+shouldBe('gl.getProgramParameter(samplerProgram, gl.LINK_STATUS)', 'true');
+var s2DValLoc = gl.getUniformLocation(samplerProgram, "s2D");
+var sCubeValLoc = gl.getUniformLocation(samplerProgram, "sCube");
+gl.useProgram(samplerProgram);
+gl.uniform1i(s2DValLoc, 0);
+gl.uniform1i(sCubeValLoc, 1);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBe('gl.getUniform(samplerProgram, s2DValLoc)', '0');
+shouldBe('gl.getUniform(samplerProgram, sCubeValLoc)', '1');
+// Matrix uniform variables
+var matProgram = wtu.loadProgramFromFile(gl, "../resources/matUniformShader.vert", "../resources/noopUniformShader.frag");
+shouldBe('gl.getProgramParameter(matProgram, gl.LINK_STATUS)', 'true');
+var mval2Loc = gl.getUniformLocation(matProgram, "mval2");
+var mval3Loc = gl.getUniformLocation(matProgram, "mval3");
+var mval4Loc = gl.getUniformLocation(matProgram, "mval4");
+gl.useProgram(matProgram);
+gl.uniformMatrix2fv(mval2Loc, false, [1, 2, 3, 4]);
+gl.uniformMatrix3fv(mval3Loc, false, [5, 6, 7, 8, 9, 10, 11, 12, 13]);
+gl.uniformMatrix4fv(mval4Loc, false, [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBe('gl.getUniform(matProgram, mval2Loc)', '[1, 2, 3, 4]');
+shouldBe('gl.getUniform(matProgram, mval3Loc)', '[5, 6, 7, 8, 9, 10, 11, 12, 13]');
+shouldBe('gl.getUniform(matProgram, mval4Loc)', '[14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]');
+
+debug("");
+debug("test getVertexAttrib");
+var array = new Float32Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);
+var buffer = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
+gl.bufferData(gl.ARRAY_BUFFER, array, gl.DYNAMIC_DRAW);
+// Vertex attribute 0 is special in that it has no current state, so
+// fetching GL_CURRENT_VERTEX_ATTRIB generates an error. Use attribute
+// 1 for these tests instead.
+gl.enableVertexAttribArray(1);
+gl.vertexAttribPointer(1, 4, gl.FLOAT, false, 0, 0);
+shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)', 'buffer');
+shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_ENABLED)', 'true');
+shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_SIZE)', '4');
+// Stride MUST be the value the user put in.
+shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_STRIDE)', '0');
+shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_TYPE)', 'gl.FLOAT');
+shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_NORMALIZED)', 'false');
+gl.vertexAttribPointer(1, 4, gl.FLOAT, false, 36, 12);
+shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_STRIDE)', '36');
+shouldBe('gl.getVertexAttribOffset(1, gl.VERTEX_ATTRIB_ARRAY_POINTER)', '12');
+gl.disableVertexAttribArray(1);
+shouldBe('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_ENABLED)', 'false');
+gl.vertexAttrib4f(1, 5, 6, 7, 8);
+shouldBe('gl.getVertexAttrib(1, gl.CURRENT_VERTEX_ATTRIB)', '[5, 6, 7, 8]');
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+testInvalidArgument(
+ "getVertexAttrib",
+ "parameter",
+ [ gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING,
+ gl.VERTEX_ATTRIB_ARRAY_ENABLED,
+ gl.VERTEX_ATTRIB_ARRAY_SIZE,
+ gl.VERTEX_ATTRIB_ARRAY_STRIDE,
+ gl.VERTEX_ATTRIB_ARRAY_TYPE,
+ gl.VERTEX_ATTRIB_ARRAY_NORMALIZED,
+ gl.VERTEX_ATTRIB_ARRAY_STRIDE,
+ gl.VERTEX_ATTRIB_ARRAY_ENABLED,
+ gl.CURRENT_VERTEX_ATTRIB
+ ],
+ function(parameter) {
+ return gl.getVertexAttrib(1, parameter);
+ }
+);
+var numVertexAttribs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);
+wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, 'gl.getVertexAttrib(' + numVertexAttribs + ', gl.CURRENT_VERTEX_ATTRIB)');
+
+debug("");
+debug("Test cases where name == 0");
+gl.deleteTexture(texture);
+shouldBe('gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)', 'gl.NONE');
+gl.deleteRenderbuffer(renderbuffer);
+shouldBe('gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)', 'gl.NONE');
+gl.deleteBuffer(buffer);
+shouldBeNull('gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)');
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/state-uneffected-after-compositing.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/state-uneffected-after-compositing.html
new file mode 100644
index 000000000..b60efc2a7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/state/state-uneffected-after-compositing.html
@@ -0,0 +1,109 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL: Check that state is not lost by compositing</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="testbed" width="16" height="16" style="width:50px; height:50px"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description();
+var wtu = WebGLTestUtils;
+
+function runTest()
+{
+ var gl = wtu.create3DContext('testbed', { antialias: false });
+ if (!gl) {
+ testFailed('could not create context');
+ return;
+ }
+
+ var program = wtu.setupTexturedQuad(gl);
+ var tex = gl.createTexture();
+ var fb = gl.createFramebuffer();
+
+ var step1 = function() {
+ wtu.fillTexture(gl, tex, 1, 1, [0, 255, 0, 255]);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "drawing with texture should be green");
+ };
+
+ var step2 = function() {
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "drawing with texture after composite without rebinding should be green");
+
+ // Clear background to red
+ gl.clearColor(1, 0, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ // Bind framebuffer with green texture.
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0, 255, 0, 255], "reading from fbo with attached texture should be green");
+ };
+
+ var step3 = function() {
+ // Should still have fb bound and reading should be green
+ wtu.checkCanvasRect(gl, 0, 0, 1, 1, [0, 255, 0, 255], "reading from fbo after composite without rebinding should be green");
+ };
+
+ var steps = [
+ step1,
+ step2,
+ step3,
+ ];
+
+ var stepIndex = 0;
+ var runNextStep = function() {
+ steps[stepIndex++]();
+ if (stepIndex == steps.length) {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+ finishTest();
+ return;
+ }
+ wtu.waitForComposite(runNextStep);
+ };
+ runNextStep();
+}
+
+runTest();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/00_test_list.txt
new file mode 100644
index 000000000..0bd628195
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/00_test_list.txt
@@ -0,0 +1,60 @@
+compressed-tex-image.html
+copy-tex-image-and-sub-image-2d.html
+--min-version 1.0.2 copy-tex-image-2d-formats.html
+--min-version 1.0.3 default-texture.html
+--min-version 1.0.2 gl-get-tex-parameter.html
+gl-pixelstorei.html
+gl-teximage.html
+origin-clean-conformance.html
+tex-image-and-sub-image-2d-with-array-buffer-view.html
+tex-image-and-sub-image-2d-with-canvas.html
+tex-image-and-sub-image-2d-with-canvas-rgb565.html
+tex-image-and-sub-image-2d-with-canvas-rgba4444.html
+tex-image-and-sub-image-2d-with-canvas-rgba5551.html
+tex-image-and-sub-image-2d-with-image-data.html
+tex-image-and-sub-image-2d-with-image-data-rgb565.html
+tex-image-and-sub-image-2d-with-image-data-rgba4444.html
+tex-image-and-sub-image-2d-with-image-data-rgba5551.html
+tex-image-and-sub-image-2d-with-image.html
+tex-image-and-sub-image-2d-with-image-rgb565.html
+tex-image-and-sub-image-2d-with-image-rgba4444.html
+tex-image-and-sub-image-2d-with-image-rgba5551.html
+--min-version 1.0.3 tex-image-and-sub-image-2d-with-svg-image.html
+tex-image-and-sub-image-2d-with-video.html
+tex-image-and-sub-image-2d-with-video-rgb565.html
+tex-image-and-sub-image-2d-with-video-rgba4444.html
+tex-image-and-sub-image-2d-with-video-rgba5551.html
+tex-image-and-sub-image-2d-with-webgl-canvas.html
+tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html
+tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html
+tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html
+tex-image-and-uniform-binding-bugs.html
+--min-version 1.0.3 tex-image-canvas-corruption.html
+--min-version 1.0.2 tex-image-webgl.html
+tex-image-with-format-and-type.html
+tex-image-with-invalid-data.html
+tex-input-validation.html
+tex-sub-image-2d-bad-args.html
+tex-sub-image-2d.html
+texparameter-test.html
+texture-active-bind-2.html
+texture-active-bind.html
+--min-version 1.0.2 texture-attachment-formats.html
+--min-version 1.0.2 texture-clear.html
+texture-complete.html
+--min-version 1.0.3 texture-copying-feedback-loops.html
+--min-version 1.0.2 texture-hd-dpi.html
+--min-version 1.0.2 texture-formats-test.html
+texture-mips.html
+texture-npot-video.html
+--max-version 1.9.9 texture-npot.html
+texture-size.html
+texture-size-cube-maps.html
+--min-version 1.0.2 texture-size-limit.html
+--min-version 1.0.2 texture-sub-image-cube-maps.html
+texture-transparent-pixels-initialized.html
+--min-version 1.0.2 texture-upload-cube-maps.html
+--min-version 1.0.3 texture-upload-size.html
+--min-version 1.0.2 mipmap-fbo.html
+--min-version 1.0.3 texture-fakeblack.html
+--min-version 1.0.3 texture-draw-with-2d-and-cube.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/compressed-tex-image.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/compressed-tex-image.html
new file mode 100644
index 000000000..d99f54af1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/compressed-tex-image.html
@@ -0,0 +1,84 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL CompressedTexImage and CompressedTexSubImage Tests</title>
+<LINK rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("This test ensures WebGL implementations correctly implement compressedTexImage2D and compressedTexSubImage2D.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+
+var COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
+var COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
+var COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3;
+var ETC1_RGB8_OES = 0x8D64;
+var COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00;
+var COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02;
+
+var formats = null;
+
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+
+ wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0, new Uint8Array(8))");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGBA_S3TC_DXT1_EXT, 4, 4, 0, new Uint8Array(8))");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGBA_S3TC_DXT5_EXT, 4, 4, 0, new Uint8Array(16))");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, ETC1_RGB8_OES, 4, 4, 0, new Uint8Array(8))");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB_PVRTC_4BPPV1_IMG, 8, 8, 0, new Uint8Array(8))");
+ wtu.shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, 8, 8, 0, new Uint8Array(8))");
+
+ wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "formats = gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS)");
+ shouldBeNonNull("formats");
+ shouldBe("formats.length", "0");
+}
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-2d-formats.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-2d-formats.html
new file mode 100644
index 000000000..270652623
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-2d-formats.html
@@ -0,0 +1,196 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<title>Verify copyTexImage2D follows format restictions</title>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="canvas" width="2" height="2"></canvas>
+<canvas id="canvasNoAlpha" width="2" height="2"></canvas>
+<div id="console"></div>
+<script>
+"use strict";
+
+function getChannelsFromFormat(format) {
+ switch (gl[format]) {
+ case gl.ALPHA:
+ return 0x0001;
+ case gl.LUMINANCE:
+ case gl.RGB:
+ return 0x1110;
+ case gl.LUMINANCE_ALPHA:
+ case gl.RGBA:
+ return 0x1111;
+ default:
+ return 0;
+ }
+}
+
+var formats = [
+ 'ALPHA',
+ 'LUMINANCE',
+ 'LUMINANCE_ALPHA',
+ 'RGB',
+ 'RGBA'
+];
+
+var isRenderable = {
+ 'ALPHA': false,
+ 'LUMINANCE': false,
+ 'LUMINANCE_ALPHA': false,
+ 'RGB': true,
+ 'RGBA': true
+};
+
+var gl = null;
+var wtu = WebGLTestUtils;
+
+description();
+
+var canvas = document.getElementById("canvas");
+var canvasNoAlpha = document.getElementById("canvasNoAlpha");
+var gl = wtu.create3DContext(canvas, {alpha:true});
+var glNoAlpha = wtu.create3DContext(canvasNoAlpha, {alpha:false});
+
+debug("test with an RGBA backbuffer");
+var program = wtu.setupTexturedQuad(gl);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "During Initialization");
+testFormats('RGBA');
+
+testBackbufferFormats();
+
+debug("test with an RGB backbuffer");
+var gl = glNoAlpha;
+var program = wtu.setupTexturedQuad(gl);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "During Initialization");
+testFormats('RGB');
+
+function testBackbufferFormats() {
+ var fbo = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+
+ for (var ii = 0; ii < formats.length; ++ii) {
+ var backFormat = formats[ii];
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[backFormat], 2, 2, 0, gl[backFormat], gl.UNSIGNED_BYTE, null);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);
+ var status = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
+
+ debug('');
+ if (status == gl.FRAMEBUFFER_COMPLETE) {
+ if (!isRenderable[backFormat]) {
+ testFailed('Creating framebuffer from ' + backFormat + ' texture succeeded even though it is not a renderable format');
+ } else {
+ debug('test with ' + backFormat + ' fbo');
+ testFormats(backFormat);
+ }
+ } else {
+ debug(backFormat + ' not supported as a renderbuffer attachment');
+ }
+ }
+}
+
+function testFormats(backFormat) {
+ for (var ii = 0; ii < formats.length; ++ii) {
+ testCopyTexImage2D(backFormat, formats[ii]);
+ }
+}
+
+function toChannels(value) {
+ return ((value & 0x1000) ? 'R' : '_') +
+ ((value & 0x0100) ? 'G' : '_') +
+ ((value & 0x0010) ? 'B' : '_') +
+ ((value & 0x0001) ? 'A' : '_');
+}
+
+function testCopyTexImage2D(backFormat, texFormat) {
+ var need = getChannelsFromFormat(texFormat);
+ var have = getChannelsFromFormat(backFormat);
+ var shouldPass = (need & have) == need;
+
+ //debug("need: " + toChannels(need));
+ //debug("have: " + toChannels(have));
+ //debug("both: " + toChannels(have & need));
+
+ // clear backbuffer
+ gl.clearColor(0.25, 1, 0.75, 0.5);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ var texture = gl.createTexture();
+ // Bind the texture to texture unit 0
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl[texFormat], 0, 0, 2, 2, 0);
+ if (!shouldPass) {
+ wtu.glErrorShouldBe(
+ gl, gl.INVALID_OPERATION,
+ "should not be able to copyTexImage2D " + texFormat + " from " + backFormat);
+ return;
+ }
+
+ wtu.glErrorShouldBe(
+ gl, gl.NO_ERROR,
+ "should be able to copyTexImage2D " + texFormat + " from " + backFormat);
+
+ // Draw
+ wtu.clearAndDrawUnitQuad(gl);
+
+ var expectedColors = {
+ 'ALPHA': [0, 0, 0, 127],
+ 'LUMINANCE': [64, 64, 64, 255],
+ 'LUMINANCE_ALPHA': [64, 64, 64, 127],
+ 'RGB': [64, 255, 191, 255],
+ 'RGBA': [64, 255, 191, 127]
+ };
+
+ var color = expectedColors[texFormat];
+
+ wtu.checkCanvas(gl, color, "should be " + color, 16);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+}
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-and-sub-image-2d.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-and-sub-image-2d.html
new file mode 100644
index 000000000..63280be93
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-and-sub-image-2d.html
@@ -0,0 +1,156 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+
+<script>
+"use strict";
+var successfullyParsed = false;
+
+function init()
+{
+ description('Verify copyTexImage2D and copyTexSubImage2D');
+
+ runTest();
+}
+
+var gl = null;
+var wtu = WebGLTestUtils;
+
+function runTestIteration(antialias)
+{
+ var canvas = document.getElementById(
+ antialias ? "antialiasOn" : "antialiasOff");
+ var attribs = antialias ? { antialias: true } : { antialias: false };
+ gl = wtu.create3DContext(canvas, attribs);
+ var program = wtu.setupTexturedQuad(gl);
+ var textureLoc = gl.getUniformLocation(program, "tex");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "During Initialization");
+
+ gl.colorMask(1, 1, 1, 1);
+ gl.disable(gl.BLEND);
+ debug('Testing copyTexImage2D');
+
+ // Red canvas
+ gl.clearColor(1, 0, 0, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ var texture = gl.createTexture();
+ // Bind the texture to texture unit 0
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ // Set up texture
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2, 2, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.uniform1i(textureLoc, 0);
+
+ var colors = [
+ [1, 0, 0, 1],
+ [0, 1, 0, 1],
+ [0, 0, 1, 1],
+ [0.5, 0.5, 0.5, 0.5],
+ ];
+ var count = 0;
+ for (var yy = -2; yy <= 2; ++yy) {
+ for (var xx = -2; xx <= 2; ++xx) {
+ for (var ii = 0; ii < 2; ++ii) {
+ var texColor = colors[count];
+ var clearColor = colors[(count + 1) % colors.length];
+ // clear to some color
+ gl.clearColor(texColor[0], texColor[1], texColor[2], texColor[3]);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ // copy that color to the texture.
+ switch (ii) {
+ case 0:
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, xx, yy, 2, 2, 0);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "using copyTexImage2D: x = " + xx + ", y = " + yy);
+ break;
+ case 1:
+ gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, xx, yy, 2, 2);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "using copyTexSubImage2D: x = " + xx + ", y = " + yy);
+ break;
+ }
+
+ // clear to some other color.
+ gl.clearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ // Draw the triangles
+ wtu.clearAndDrawUnitQuad(gl);
+
+ // check the rendering results
+ for (var iy = 0; iy < 2; ++iy) {
+ for (var ix = 0; ix < 2; ++ix) {
+ var x = xx + ix;
+ var y = yy + iy;
+ var expectedColor = (x < 0 || y < 0 || x >= 2 || y >= 2) ?
+ [0,0,0,0] :
+ [Math.floor(255 * texColor[0]),
+ Math.floor(255 * texColor[1]),
+ Math.floor(255 * texColor[2]),
+ Math.floor(255 * texColor[3])];
+ wtu.checkCanvasRect(gl, ix, iy, 1, 1, expectedColor,
+ "" + ix + ", " + iy + " should render " + expectedColor + " (+/-1)", 1);
+ }
+ }
+ count = (count + 1) % colors.length;
+ }
+ }
+ }
+
+ debug("");
+}
+
+function runTest(antialias)
+{
+ debug("Testing with antialias on");
+ runTestIteration(true);
+ debug("Testing with antialias off");
+ runTestIteration(false);
+
+ finishTest();
+}
+</script>
+</head>
+<body onload="init()">
+<canvas id="antialiasOn" width="2" height="2"></canvas>
+<canvas id="antialiasOff" width="2" height="2"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/default-texture.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/default-texture.html
new file mode 100644
index 000000000..fb83dce24
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/default-texture.html
@@ -0,0 +1,65 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Tests texture access with no texture bound</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="24" height="24"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+var wtu = WebGLTestUtils;
+description();
+
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+// When no texture is bound, it is considered an incomplete texture,
+// therefore, [0, 0, 0, 1] should be returned.
+// See OpenGL ES spec 2.0.25, section F.3.5.
+wtu.checkCanvas(gl, [0, 0, 0, 255]);
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/gl-get-tex-parameter.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/gl-get-tex-parameter.html
new file mode 100644
index 000000000..e9db9e6c2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/gl-get-tex-parameter.html
@@ -0,0 +1,136 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL getTexParameter test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description();
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+// NOTE: We explicitly do this in a funky order
+// to hopefully find subtle bugs.
+
+var targets = [
+ 'TEXTURE_2D',
+ 'TEXTURE_2D',
+ 'TEXTURE_CUBE_MAP',
+ 'TEXTURE_CUBE_MAP'
+];
+// Create textures on different active textures.
+for (var ii = 0; ii < targets.length; ++ii) {
+ var target = targets[ii];
+ var tex = gl.createTexture();
+ gl.activeTexture(gl.TEXTURE0 + ii);
+ gl.bindTexture(gl[target], tex);
+}
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+
+var states = [
+ { state:'TEXTURE_WRAP_S', default: 'REPEAT', value1: 'CLAMP_TO_EDGE', value2: 'REPEAT' },
+ { state:'TEXTURE_WRAP_T', default: 'REPEAT', value1: 'CLAMP_TO_EDGE', value2: 'REPEAT' },
+ { state:'TEXTURE_MAG_FILTER', default: 'LINEAR', value1: 'NEAREST', value2: 'LINEAR' },
+ { state:'TEXTURE_MIN_FILTER', default: 'NEAREST_MIPMAP_LINEAR', value1: 'LINEAR_MIPMAP_LINEAR', value2: 'NEAREST' }
+];
+
+function applyStates(fn) {
+ for (var ss = 0; ss < states.length; ++ss) {
+ var stateInfo = states[ss];
+ for (var ii = 0; ii < targets.length; ++ii) {
+ var target = targets[ii];
+ gl.activeTexture(gl.TEXTURE0 + ii);
+ fn(target, stateInfo);
+ }
+ }
+}
+
+// test the default state.
+applyStates(function(target, stateInfo) {
+ var a = 'gl.getTexParameter(gl["' + target + '"], gl["' + stateInfo.state + '"])';
+ var b = 'gl["' + stateInfo.default + '"]';
+ shouldBe(a, b);
+});
+
+// test new state
+applyStates(function(target, stateInfo) {
+ gl.texParameteri(gl[target], gl[stateInfo.state], gl[stateInfo.value1]);
+});
+
+applyStates(function(target, stateInfo) {
+ var a = 'gl.getTexParameter(gl["' + target + '"], gl["' + stateInfo.state + '"])';
+ var b = 'gl["' + stateInfo.value1 + '"]';
+ shouldBe(a, b);
+});
+
+// test different states on each target.
+function getStateValue(count, stateInfo) {
+ return (count % 2) ? stateInfo.value2 : stateInfo.value1;
+}
+
+applyStates(function() {
+ var count = 0;
+ return function(target, stateInfo) {
+ gl.texParameteri(gl[target], gl[stateInfo.state], gl[getStateValue(count, stateInfo)]);
+ ++count;
+ }
+}());
+
+applyStates(function() {
+ var count = 0;
+ return function(target, stateInfo) {
+ var a = 'gl.getTexParameter(gl["' + target + '"], gl["' + stateInfo.state + '"])';
+ var b = 'gl["' + getStateValue(count, stateInfo) + '"]';
+ shouldBe(a, b);
+ ++count;
+ };
+}());
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/gl-pixelstorei.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/gl-pixelstorei.html
new file mode 100644
index 000000000..103f3d923
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/gl-pixelstorei.html
@@ -0,0 +1,119 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL pixelStorei Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50"></canvas>
+<canvas id="2d00" width="50" height="50"></canvas>
+<canvas id="2d01" width="50" height="50"></canvas>
+<canvas id="2d02" width="50" height="50"></canvas>
+<canvas id="2d03" width="50" height="50"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main() {
+ gl_Position = vPosition;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+void main() {
+ gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+}
+</script>
+
+<script>
+"use strict";
+function init() {
+ description("This test checks that drawImage and readPixels are not effected by gl.Pixelstorei(gl.PACK_ALIGNMENT) and visa versa");
+
+ debug("There should be 5 red triangles on 5 black squares above");
+ debug("");
+
+ var wtu = WebGLTestUtils;
+ var canvas3d = document.getElementById("example");
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.drawArrays(gl.TRIANGLES, 0, 3);
+
+ function checkData(ctx, name) {
+ // Test several locations
+ // First line should be all black
+ wtu.checkCanvasRect(ctx, 0, 0, 50, 1, [0, 0, 0, 0]);
+
+ // Line 25 should be red for at least 6 red pixels starting 22 pixels in
+ wtu.checkCanvasRect(ctx, 22, 25, 6, 1, [255, 0, 0, 255]);
+
+ // Last line should be all black
+ wtu.checkCanvasRect(ctx, 0, 49, 50, 1, [0, 0, 0, 0]);
+ }
+
+ var ctx2d;
+
+ function checkColors() {
+ checkData(gl, "3d context");
+ checkData(ctx2d, "2d context");
+ }
+
+ var table = [1, 2, 4, 8];
+ for (var ii = 0; ii < table.length; ++ii) {
+ gl.pixelStorei(gl.PACK_ALIGNMENT, table[ii]);
+ ctx2d = document.getElementById("2d0" + ii).getContext("2d");
+ ctx2d.globalCompositeOperation = 'copy';
+ ctx2d.drawImage(canvas3d, 0, 0);
+ checkColors();
+ assertMsg(gl.getParameter(gl.PACK_ALIGNMENT) == table[ii],
+ "PACK_ALIGNMENT is " + table[ii]);
+ }
+}
+
+init();
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/gl-teximage.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/gl-teximage.html
new file mode 100644
index 000000000..26e46e7cc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/gl-teximage.html
@@ -0,0 +1,424 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texImage2D conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="256" height="16" style="width: 256px; height: 48px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+enableJSTestPreVerboseLogging();
+description("Test texImage2D conversions.");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+gl.disable(gl.DITHER);
+var program = wtu.setupTexturedQuad(gl);
+var successfullyParsed;
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+
+var imgURLs = [
+ '../resources/1-channel.jpg',
+ '../resources/gray-ramp-256-with-128-alpha.png',
+ '../resources/gray-ramp-256.png',
+ '../resources/gray-ramp-default-gamma.png',
+ '../resources/gray-ramp-gamma0.1.png',
+ '../resources/gray-ramp-gamma1.0.png',
+ '../resources/gray-ramp-gamma2.0.png',
+ '../resources/gray-ramp-gamma4.0.png',
+ '../resources/gray-ramp-gamma9.0.png',
+ '../resources/gray-ramp.png',
+ '../resources/zero-alpha.png',
+ '../resources/3x3.png',
+ '../resources/blue-1x1.jpg',
+ '../resources/red-indexed.png',
+ '../resources/transparent-on-left-indexed.png',
+ '../resources/green-2x2-16bit.png',
+ '../resources/small-square-with-colorspin-profile.jpg',
+ '../resources/small-square-with-colorspin-profile.png',
+ '../resources/small-square-with-cie-rgb-profile.png',
+ '../resources/small-square-with-colormatch-profile.png',
+ '../resources/small-square-with-e-srgb-profile.png',
+ '../resources/small-square-with-smpte-c-profile.png',
+ '../resources/small-square-with-srgb-iec61966-2.1-profile.png'];
+
+
+wtu.loadImagesAsync(imgURLs, runTests);
+
+function runTests(imgs) {
+ var loc = gl.getUniformLocation(program, "tex");
+ gl.uniform1i(loc, 0);
+
+ gl.disable(gl.BLEND);
+ gl.disable(gl.DEPTH_TEST);
+
+ var width = gl.canvas.width;
+ var height = gl.canvas.height;
+
+ function checkPixel(x, y, color) {
+ wtu.checkCanvasRect(gl, x, y, 1, 1, color);
+ }
+
+ function checkPixelRange(x, y, color, allowedRange) {
+ var msg = "pixel " + x + ", " + y + " should be within " +
+ allowedRange + " units of " +
+ color[0] + ", " +
+ color[1] + ", " +
+ color[2] + ", " +
+ color[3];
+ wtu.checkCanvasRect(gl, x, y, 1, 1, color, msg, allowedRange);
+ }
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+
+ var buf = new Uint8Array(width * height * 4);
+
+ debug("");
+ debug("check pixels are NOT pre-multiplied");
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE,
+ imgs['../resources/zero-alpha.png']);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup");
+ wtu.clearAndDrawUnitQuad(gl);
+
+ var left = 0;
+ var middle = Math.floor(width / 2);
+ var right = width - 1;
+ var bottom = 0;
+ var center = Math.floor(height / 2);
+ var top = height - 1;
+ checkPixel(left, top, [ 0, 0, 0, 255]);
+ checkPixel(middle, top, [255, 0, 255, 255]);
+ checkPixel(right, top, [ 0, 0, 255, 255]);
+ checkPixel(left, center, [128, 128, 128, 255]);
+ checkPixel(middle, center, [255, 255, 255, 255]);
+ checkPixel(right, center, [ 0, 255, 255, 255]);
+ checkPixel(left, bottom, [255, 0, 0, 255]);
+ checkPixel(middle, bottom, [255, 255, 0, 255]);
+ checkPixel(right, bottom, [ 0, 255, 0, 255]);
+
+ debug("");
+ debug("check quantization");
+ var quantInfo = [
+ {format: gl.RGBA, type: gl.UNSIGNED_BYTE, counts: [256, 256, 256, 256]},
+ {format: gl.RGBA, type: gl.UNSIGNED_SHORT_4_4_4_4, counts: [ 16, 16, 16, 16]},
+ {format: gl.RGB, type: gl.UNSIGNED_SHORT_5_6_5, counts: [ 32, 64, 32, 1]},
+ {format: gl.RGBA, type: gl.UNSIGNED_SHORT_5_5_5_1, counts: [ 32, 32, 32, 2]}];
+ for (var qq = 0; qq < quantInfo.length; ++qq) {
+ var info = quantInfo[qq];
+ gl.texImage2D(
+ gl.TEXTURE_2D, 0, info.format, info.format, info.type,
+ imgs['../resources/gray-ramp-256.png']);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+ wtu.clearAndDrawUnitQuad(gl);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ var counts = [{ }, { }, { }, { }];
+ var numUniqueValues = [0, 0, 0, 0];
+ // Count the number of unique values in each channel.
+ for (var ii = 0; ii < width * height * 4; ii += 4) {
+ for (var jj = 0; jj < 4; ++jj) {
+ var v = buf[ii + jj];
+ if (!counts[jj][v]) {
+ counts[jj][v] = 1;
+ ++numUniqueValues[jj];
+ } else {
+ ++counts[jj][v];
+ }
+ }
+ }
+ for (var ii = 0; ii < 4; ++ii) {
+ assertMsg(numUniqueValues[ii] == info.counts[ii],
+ "There should be " + info.counts[ii] +
+ " unique values in channel " + ii + ". Found " +
+ numUniqueValues[ii]);
+ }
+ }
+
+ debug("");
+ debug("Check that gamma settings don't effect 8bit pngs");
+ gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE,
+ imgs['../resources/gray-ramp-default-gamma.png']);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+ wtu.clearAndDrawUnitQuad(gl);
+ var ref = new Uint8Array(width * height * 4);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, ref);
+
+ var gammaImages = [
+ '../resources/gray-ramp-gamma0.1.png',
+ '../resources/gray-ramp-gamma1.0.png',
+ '../resources/gray-ramp-gamma2.0.png',
+ '../resources/gray-ramp-gamma4.0.png',
+ '../resources/gray-ramp-gamma9.0.png'];
+ for (var ii = 0; ii < gammaImages.length; ++ii) {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE,
+ imgs[gammaImages[ii]]);
+ wtu.clearAndDrawUnitQuad(gl);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ var same = true;
+ for (var jj = 0; jj < width * height * 4; ++jj) {
+ if (buf[jj] != ref[jj]) {
+ same = false;
+ break;
+ }
+ }
+ assertMsg(same, "pixels should be same regardless of gamma settings.");
+ }
+
+ debug("");
+ debug("check pixels are UN pre-multiplied");
+ for (var ii = 0; ii < 2; ++ii) {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ if (ii == 0) {
+ var canvas2d = document.createElement("canvas");
+ canvas2d.width = 256;
+ canvas2d.height = 1;
+ var ctx = canvas2d.getContext("2d");
+ ctx.drawImage(imgs['../resources/gray-ramp-256-with-128-alpha.png'], 0, 0);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE, canvas2d);
+ } else {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE,
+ imgs['../resources/gray-ramp-256-with-128-alpha.png']);
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+ wtu.clearAndDrawUnitQuad(gl);
+ var buf = new Uint8Array(width * height * 4);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ var lt128Count = [0, 0, 0];
+ var ge128Count = [0, 0, 0];
+ for (var jj = 0; jj < width; ++jj) {
+ var off = jj * 4;
+ for (var cc = 0; cc < 3; ++cc) {
+ if (buf[off + cc] < 128) {
+ ++lt128Count[cc];
+ } else {
+ ++ge128Count[cc];
+ }
+ }
+ }
+ // Not sure the exact count here because gamma does effect drawing into the
+ // canvas but it should be close to 50% so I'll pass 45%
+ for (var jj = 0; jj < 3; ++jj) {
+ assertMsg(ge128Count[jj] > 256 * 0.45,
+ "Half the pixels in channel " + jj +
+ " should be >= 128,128,128. found " +
+ ((ge128Count[jj] / 256) * 100).toFixed() + "%");
+ assertMsg(lt128Count[jj] > 256 * 0.45,
+ "Half the pixels in channel " + jj +
+ " should be < 128,128,128. found " +
+ ((lt128Count[jj] / 256) * 100).toFixed() + "%");
+ }
+ }
+
+ debug("");
+ debug("check canvas pixels are UN pre-multiplied");
+ var canvas2d = document.createElement("canvas");
+ canvas2d.width = 1;
+ canvas2d.height = 1;
+ var ctx = canvas2d.getContext("2d");
+ ctx.fillStyle ="rgba(255,255,255,0.5)";
+ ctx.fillRect(0, 0, 256, 1);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+ checkPixelRange(0, 0, [255, 255, 255, 127], 4);
+
+ debug("");
+ debug("check canvas pixels are pre-multiplied");
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+ checkPixelRange(0, 0, [127, 127, 127, 127], 4);
+
+
+ debug("");
+ debug("check pixels are pre-multiplied");
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
+ // TODO(gman): use different texture that won't pass on failure
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE,
+ imgs['../resources/zero-alpha.png']);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup");
+ wtu.clearAndDrawUnitQuad(gl);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+
+ var same = true;
+ for (var jj = 0; jj < width * height * 4; ++jj) {
+ if (buf[jj] != 0) {
+ same = false;
+ break;
+ }
+ }
+ assertMsg(same, "pixels should all be 0.");
+
+ debug("");
+ debug("check pixels are flipped");
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE,
+ imgs['../resources/3x3.png']);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup");
+ wtu.clearAndDrawUnitQuad(gl);
+
+ checkPixel(left, top, [255, 0, 0, 255]);
+ checkPixel(middle, top, [255, 255, 0, 255]);
+ checkPixel(right, top, [255, 0, 0, 255]);
+ checkPixel(left, center, [255, 0, 255, 255]);
+ checkPixel(middle, center, [255, 0, 0, 255]);
+ checkPixel(right, center, [ 0, 255, 0, 255]);
+ checkPixel(left, bottom, [ 0, 0, 0, 255]);
+ checkPixel(middle, bottom, [ 0, 0, 255, 255]);
+ checkPixel(right, bottom, [255, 0, 0, 255]);
+
+ debug("");
+ debug("check uploading of images with no alpha channel works");
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE,
+ imgs['../resources/blue-1x1.jpg']);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup");
+ wtu.clearAndDrawUnitQuad(gl);
+ checkPixelRange(middle, center, [ 0, 0, 255, 255], 10);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors");
+
+ debug("");
+ debug("check uploading of 16-bit images");
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE,
+ imgs['../resources/green-2x2-16bit.png']);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup");
+ wtu.clearAndDrawUnitQuad(gl);
+ checkPixelRange(middle, center, [ 15, 121, 0, 255], 10);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors");
+
+ debug("");
+ debug("check uploading of images with ICC profiles");
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);
+ gl.pixelStorei(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, gl.NONE);
+
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE,
+ imgs['../resources/small-square-with-colorspin-profile.jpg']);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup");
+ wtu.clearAndDrawUnitQuad(gl);
+ // The image is red. However, if we ignore the color profile, it is blue.
+ checkPixelRange(middle, center, [ 0, 0, 255, 255], 10);
+
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE,
+ imgs['../resources/small-square-with-colorspin-profile.png']);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup");
+ wtu.clearAndDrawUnitQuad(gl);
+ // The image is red. However, if we ignore the color profile, it is blue.
+ checkPixelRange(middle, center, [ 0, 0, 255, 255], 10);
+
+ var iccPNGs = [
+ '../resources/small-square-with-cie-rgb-profile.png',
+ '../resources/small-square-with-colormatch-profile.png',
+ '../resources/small-square-with-e-srgb-profile.png',
+ '../resources/small-square-with-smpte-c-profile.png',
+ '../resources/small-square-with-srgb-iec61966-2.1-profile.png'];
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ for (var ii = 0; ii < iccPNGs.length; ++ii) {
+ var buf2 = new Uint8Array(width * height * 4);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE,
+ imgs[iccPNGs[ii]]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup");
+ wtu.clearAndDrawUnitQuad(gl);
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buf2);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors");
+ var same = true;
+ for (var jj = 0; jj < buf.length; ++jj) {
+ if (buf[jj] != buf2[jj]) {
+ same = false;
+ break;
+ }
+ }
+ assertMsg(same, "uploading PNGs with same data but various ICC profiles should generate the same results");
+ }
+
+ debug("");
+ debug("check uploading of indexed PNG images");
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE,
+ imgs['../resources/red-indexed.png']);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup");
+ wtu.clearAndDrawUnitQuad(gl);
+ // The image should be red.
+ checkPixelRange(middle, center, [ 255, 0, 0, 255 ], 10);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup");
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE,
+ imgs['../resources/transparent-on-left-indexed.png']);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvasRect(gl, 0, 0, 128, 16, [255, 0, 255, 0], "should be transparent purple");
+ wtu.checkCanvasRect(gl, 128, 0,128, 16, [255, 255, 0, 255], "should be yellow");
+
+ debug("");
+ debug("check uploading of 1-channel JPG images");
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE,
+ imgs['../resources/1-channel.jpg']);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup");
+ wtu.clearAndDrawUnitQuad(gl);
+ // The image should be gray.
+ checkPixelRange(middle, center, [ 128, 128, 128, 255 ], 28);
+
+ debug("")
+ debug("check calling texImage2D with NULL clears the texture");
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB,
+ imgs['../resources/red-indexed.png'].width,
+ imgs['../resources/red-indexed.png'].height,
+ 0, gl.RGB, gl.UNSIGNED_BYTE, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup");
+ wtu.clearAndDrawUnitQuad(gl);
+ // The image should be white.
+ checkPixelRange(middle, center, [ 0, 0, 0, 255 ], 10);
+
+ debug("");
+ successfullyParsed = true;
+ shouldBeTrue("successfullyParsed");
+ debug('<br /><span class="pass">TEST COMPLETE</span>');
+ notifyFinishedToHarness();
+}
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/mipmap-fbo.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/mipmap-fbo.html
new file mode 100644
index 000000000..b44f5eee3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/mipmap-fbo.html
@@ -0,0 +1,89 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>Tests if mipmap generation on a texture filled by an FBO works correctly</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="24" height="24"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+function init(){
+ var wtu = WebGLTestUtils;
+ description();
+
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupTexturedQuad(gl);
+
+ // setup render target texture //
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2, 2, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.bindTexture(gl.TEXTURE_2D, null);
+
+ // setup framebuffer //
+ var fbo = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+
+ // fill the framebuffer //
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.clearColor(1, 0, 1, 1);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+
+ // generate mipmap //
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.generateMipmap(gl.TEXTURE_2D);
+
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+ // readback //
+ wtu.checkCanvas(gl, [255, 0, 255, 255]);
+}
+
+init();
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/origin-clean-conformance.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/origin-clean-conformance.html
new file mode 100644
index 000000000..1e33a24d2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/origin-clean-conformance.html
@@ -0,0 +1,151 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Origin Restrictions Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+
+// Checks if function throws an exception.
+function causedException(func) {
+ var hadException = false;
+ try {
+ func();
+ } catch(e) {
+ hadException = true;
+ }
+ return hadException;
+}
+
+var defaultImgUrl = "http://www.opengl.org/img/opengl_logo.jpg";
+var localImgUrl = "../resources/opengl_logo.jpg";
+
+var imgDomain;
+var pageDomain;
+var successfullyParsed;
+
+function imageLoaded() {
+ description("This test ensures WebGL implementations follow proper same-origin restrictions.");
+ var img = this;
+
+ assertMsg(img.width > 0 && img.height > 0, "img was loaded");
+ imgDomain = wtu.getBaseDomain(wtu.getHost(img.src));
+ pageDomain = wtu.getBaseDomain(window.location.host);
+ assertMsg(imgDomain != pageDomain,
+ "img domain (" + imgDomain + ") and page domain (" + pageDomain + ") are not the same.");
+
+ function makeTexImage2D(gl, src) {
+ return function() {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, src);
+ };
+ }
+
+ function makeTexSubImage2D(gl, src) {
+ return function() {
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, src);
+ };
+ }
+
+ function makeReadPixels(gl) {
+ return function() {
+ var buf = new Uint8Array(4);
+ gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ };
+ }
+
+ function makeToDataURL(canvas) {
+ return function() {
+ var data = canvas.toDataURL();
+ }
+ }
+
+ var canvas1 = document.getElementById("canvas1");
+ var gl = wtu.create3DContext(canvas1);
+
+ debug("");
+ debug("check that an attempt to upload an image from another origin throws an exception.");
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 256, 256, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ assertMsg(causedException(makeTexImage2D(gl, img)),
+ "texImage2D with cross-origin image should throw exception.");
+ assertMsg(causedException(makeTexSubImage2D(gl, img)),
+ "texSubImage2D with cross-origin image should throw exception.");
+
+ debug("check that readPixels and toDataURL continue to work against this canvas.");
+ assertMsg(!causedException(makeReadPixels(gl)),
+ "readPixels should never throw exception -- not possible to dirty origin of WebGL canvas.");
+ assertMsg(!causedException(makeToDataURL(canvas1)),
+ "should not throw exception by toDataURL for WebGL canvas, which should stay origin clean.");
+
+ debug("check that an attempt to upload a tainted canvas throws an exception.");
+ var canvas2 = document.getElementById("canvas2");
+ var ctx2d = canvas2.getContext("2d");
+ ctx2d.drawImage(img, 0, 0);
+ assertMsg(causedException(makeToDataURL(canvas2)),
+ "should throw exception by toDataURL for NON origin clean canvas.");
+ assertMsg(causedException(makeTexImage2D(gl, canvas2)),
+ "texImage2D with NON origin clean canvas should throw exception.");
+ assertMsg(causedException(makeTexSubImage2D(gl, canvas2)),
+ "texSubImage2D with NON origin clean canvas should throw exception.");
+
+ debug("check that readPixels and toDataURL continue to work against this canvas.");
+ assertMsg(!causedException(makeReadPixels(gl)),
+ "readPixels should never throw exception -- not possible to dirty origin of WebGL canvas.");
+ assertMsg(!causedException(makeToDataURL(canvas1)),
+ "should not throw exception by toDataURL for WebGL canvas, which should stay origin clean.");
+
+ // TODO: Should check video.
+ // TODO: Should check CORS support.
+
+ debug("");
+ successfullyParsed = true;
+ shouldBeTrue("successfullyParsed");
+ debug('<br /><span class="pass">TEST COMPLETE</span>');
+ notifyFinishedToHarness();
+}
+
+wtu.setupImageForCrossOriginTest("#img", defaultImgUrl, localImgUrl, imageLoaded);
+</script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas1"></canvas>
+<canvas id="canvas2"></canvas>
+<img id="img" style="display:none;">
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-array-buffer-view.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-array-buffer-view.html
new file mode 100644
index 000000000..a21f2de5e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-array-buffer-view.html
@@ -0,0 +1,260 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="16" height="16"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description('Verifies texImage2D and texSubImage2D code paths taking ArrayBufferView');
+
+var wtu = WebGLTestUtils;
+var gl = null;
+var textureLoc = null;
+var successfullyParsed = false;
+
+function roundUpToAlignment(value, alignment) {
+ return Math.floor((value + alignment - 1) / alignment) * alignment;
+}
+
+function generateRGBAData(type, unpackAlignment, sourceData, width, height)
+{
+ var numColors = sourceData.length / 4;
+ var colorOffset = function(y) {
+ return 4 * Math.floor(y * numColors / height);
+ };
+
+ switch (type) {
+ case gl.UNSIGNED_BYTE: {
+ var rowWidth = roundUpToAlignment(width * 4, unpackAlignment);
+ var data = new Uint8Array(height * rowWidth);
+ for (var y = 0; y < height; ++y) {
+ var index = y * rowWidth;
+ var offset = colorOffset(y);
+ for (var element = 0; element < width * 4; ++element) {
+ data[index + element] = sourceData[offset + element % 4];
+ }
+ }
+ return data;
+ }
+ case gl.UNSIGNED_SHORT_4_4_4_4: {
+ var rowWidth = roundUpToAlignment(width * 2, unpackAlignment) / 2;
+ var data = new Uint16Array(height * rowWidth);
+ for (var y = 0; y < height; ++y) {
+ var offset = colorOffset(y);
+ for (var x = 0; x < width; ++x) {
+ var index = y * rowWidth + x;
+ data[index] = (((sourceData[offset + 0] & 0xF0) << 8)
+ | ((sourceData[offset + 1] & 0xF0) << 4)
+ | ((sourceData[offset + 2] & 0xF0) >> 0)
+ | ((sourceData[offset + 3] & 0xF0) >> 4));
+ }
+ }
+ return data;
+ }
+ case gl.UNSIGNED_SHORT_5_5_5_1: {
+ var rowWidth = roundUpToAlignment(width * 2, unpackAlignment) / 2;
+ var data = new Uint16Array(height * rowWidth);
+ for (var y = 0; y < height; ++y) {
+ var offset = colorOffset(y);
+ for (var x = 0; x < width; ++x) {
+ var index = y * rowWidth + x;
+ data[index] = (((sourceData[offset + 0] & 0xF8) << 8)
+ | ((sourceData[offset + 1] & 0xF8) << 3)
+ | ((sourceData[offset + 2] & 0xF8) >> 2)
+ | ((sourceData[offset + 3] & 0x80) >> 7));
+ }
+ }
+ return data;
+ }
+ }
+}
+
+function typeToString(type)
+{
+ switch (type) {
+ case gl.UNSIGNED_BYTE: return 'UNSIGNED_BYTE';
+ case gl.UNSIGNED_SHORT_5_5_5_1: return 'UNSIGNED_SHORT_5_5_5_1';
+ case gl.UNSIGNED_SHORT_4_4_4_4: return 'UNSIGNED_SHORT_4_4_4_4';
+ }
+ return 'Unknown type ' + type;
+}
+
+function runOneIteration(useTexSubImage2D, type, unpackAlignment, flipY, premultiplyAlpha, topColor, bottomColor, extraColor)
+{
+ debug('Testing ' + (useTexSubImage2D ? 'texSubImage2D' : 'texImage2D') +
+ ' with type=' + typeToString(type) +
+ ', unpackAlignment=' + unpackAlignment +
+ ', flipY=' + flipY + ', premultiplyAlpha=' + premultiplyAlpha);
+ gl.colorMask(true, true, true, true);
+ gl.clearColor(0, 0, 0, 1.0);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ // Enable writes to the RGB channels
+ gl.colorMask(true, true, true, false);
+ var texture = gl.createTexture();
+ // Bind the texture to texture unit 0
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ // Set up texture parameters
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ // Set up pixel store parameters
+ gl.pixelStorei(gl.UNPACK_ALIGNMENT, unpackAlignment);
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, premultiplyAlpha);
+ // Generate the data
+ var sourceData = [ 255, 0, 0, 255,
+ 0, 255, 0, 0 ];
+ var texWidth = 5; // this must be mod 4 + 1 to test unpackAlignment
+ var texHeight = 16;
+ var data = generateRGBAData(type, unpackAlignment, sourceData, texWidth, texHeight);
+ if (gl.getError() != gl.NO_ERROR)
+ testFailed("GL error before texture upload");
+ // Upload the image into the texture
+ if (useTexSubImage2D) {
+ // Initialize the texture to black first
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, texWidth, texHeight, 0,
+ gl.RGBA, type, null);
+ if (gl.getError() != gl.NO_ERROR)
+ testFailed("GL error after texImage2D(null)");
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, texWidth, texHeight, gl.RGBA, type, data);
+ if (gl.getError() != gl.NO_ERROR)
+ testFailed("GL error after texSubImage2D");
+ } else {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, texWidth, texHeight, 0, gl.RGBA, type, data);
+ if (gl.getError() != gl.NO_ERROR)
+ testFailed("GL error after texImage2D");
+ }
+
+ // Point the uniform sampler to texture unit 0
+ gl.uniform1i(textureLoc, 0);
+ // Draw the triangles
+ wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
+
+ // Check the top pixel and bottom pixel and make sure they have
+ // the right color.
+ var testWidth = gl.drawingBufferWidth;
+ var testHeight = gl.drawingBufferHeight / 2;
+ wtu.checkCanvasRect(gl, 0, 0, testWidth, testHeight, bottomColor, "bottom pixel should be " + bottomColor);
+ wtu.checkCanvasRect(gl, 0, testHeight, testWidth, testHeight, topColor, "top pixel should be " + topColor);
+
+ // Change part of the texture.
+ var partWidth = 8;
+ var partHeight = 16;
+ // make texture double res of part.
+ var data = generateRGBAData(type, unpackAlignment, sourceData, partWidth * 2, partHeight * 2);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, partWidth * 2, partHeight * 2, 0, gl.RGBA, type, data);
+ // set part.
+ var extraData = [
+ 255, 0, 0, 255,
+ 0, 0, 255, 0
+ ];
+ var data = generateRGBAData(type, unpackAlignment, extraData, partWidth, partHeight);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, partWidth, partHeight, gl.RGBA, type, data);
+ wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
+ var halfWidth = gl.drawingBufferWidth / 2;
+ var halfHeight = gl.drawingBufferHeight / 2;
+ var quarterHeight = gl.drawingBufferHeight / 4;
+ var red = [255, 0, 0, 255];
+ var tcolor0 = flipY ? extraColor : red;
+ var tcolor1 = flipY ? red : extraColor;
+ wtu.checkCanvasRect(gl, 0, 0, halfWidth, quarterHeight, tcolor0, "bottom left bottom pixels should be " + tcolor0);
+ wtu.checkCanvasRect(gl, 0, quarterHeight, halfWidth, quarterHeight, tcolor1, "bottom left top pixels should be " + tcolor1);
+ wtu.checkCanvasRect(gl, halfWidth, 0, halfWidth, halfHeight, bottomColor, "bottom right pixels should be " + bottomColor);
+ wtu.checkCanvasRect(gl, 0, halfHeight, testWidth, halfHeight, topColor, "top pixels should be " + topColor);
+ // set far corner.
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, partWidth, partHeight, partWidth, partHeight, gl.RGBA, type, data);
+ wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
+ wtu.checkCanvasRect(gl, 0, 0, halfWidth, quarterHeight, tcolor0, "bottom left bottom pixels should be " + tcolor0);
+ wtu.checkCanvasRect(gl, 0, quarterHeight, halfWidth, quarterHeight, tcolor1, "bottom left top pixels should be " + tcolor1);
+ wtu.checkCanvasRect(gl, halfWidth, 0, halfWidth, halfHeight, bottomColor, "bottom left pixels should be " + bottomColor);
+ wtu.checkCanvasRect(gl, 0, halfHeight, halfWidth, halfHeight, topColor, "top right pixels should be " + topColor);
+ wtu.checkCanvasRect(gl, halfWidth, halfHeight, halfWidth, quarterHeight, tcolor0, "top right bottom pixels should be " + tcolor0);
+ wtu.checkCanvasRect(gl, halfWidth, halfHeight + quarterHeight, halfWidth, quarterHeight, tcolor1, "top right top pixels should be " + tcolor1);
+}
+
+function runTest()
+{
+ var red = [255, 0, 0, 255];
+ var green = [0, 255, 0, 255];
+ var blue = [0, 0, 255, 255];
+ var redPremultiplyAlpha = [255, 0, 0, 255];
+ var greenPremultiplyAlpha = [0, 0, 0, 255];
+ var bluePremultiplyAlpha = [0, 0, 0, 255];
+
+ var types = [ gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT_5_5_5_1, gl.UNSIGNED_SHORT_4_4_4_4 ];
+ var unpackAlignments = [ 1, 2, 4, 8 ];
+
+ for (var i = 0; i < types.length; ++i) {
+ var type = types[i];
+ for (var j = 0; j < unpackAlignments.length; ++j) {
+ var unpackAlignment = unpackAlignments[j];
+ runOneIteration(false, type, unpackAlignment, true, false,
+ red, green, blue);
+ runOneIteration(false, type, unpackAlignment, false, false,
+ green, red, blue);
+ runOneIteration(false, type, unpackAlignment, true, true,
+ redPremultiplyAlpha, greenPremultiplyAlpha, bluePremultiplyAlpha);
+ runOneIteration(false, type, unpackAlignment, false, true,
+ greenPremultiplyAlpha, redPremultiplyAlpha, bluePremultiplyAlpha);
+ runOneIteration(true, type, unpackAlignment, true, false,
+ red, green, blue);
+ runOneIteration(true, type, unpackAlignment, false, false,
+ green, red, blue);
+ runOneIteration(true, type, unpackAlignment, true, true,
+ redPremultiplyAlpha, greenPremultiplyAlpha, bluePremultiplyAlpha);
+ runOneIteration(true, type, unpackAlignment, false, true,
+ greenPremultiplyAlpha, redPremultiplyAlpha, bluePremultiplyAlpha);
+ }
+ }
+
+}
+
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+textureLoc = gl.getUniformLocation(program, "tex");
+
+runTest();
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html
new file mode 100644
index 000000000..82c4c5eac
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-canvas.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGB", "UNSIGNED_SHORT_5_6_5", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html
new file mode 100644
index 000000000..e6f506032
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-canvas.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_SHORT_4_4_4_4", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html
new file mode 100644
index 000000000..e1f546c2f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-canvas.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_SHORT_5_5_5_1", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html
new file mode 100644
index 000000000..be6e2e0a0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-canvas.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_BYTE", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgb565.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgb565.html
new file mode 100644
index 000000000..240a40728
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgb565.html
@@ -0,0 +1,51 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-image-data.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGB", "UNSIGNED_SHORT_5_6_5", testPrologue)()'>
+<canvas id="texcanvas" width="1" height="2"></canvas>
+<canvas id="example" width="1" height="2"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba4444.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba4444.html
new file mode 100644
index 000000000..11d5f9112
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba4444.html
@@ -0,0 +1,51 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-image-data.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_SHORT_4_4_4_4", testPrologue)()'>
+<canvas id="texcanvas" width="1" height="2"></canvas>
+<canvas id="example" width="1" height="2"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba5551.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba5551.html
new file mode 100644
index 000000000..c154ed682
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba5551.html
@@ -0,0 +1,51 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-image-data.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_SHORT_5_5_5_1", testPrologue)()'>
+<canvas id="texcanvas" width="1" height="2"></canvas>
+<canvas id="example" width="1" height="2"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data.html
new file mode 100644
index 000000000..ca3c77c47
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data.html
@@ -0,0 +1,51 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-image-data.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_BYTE", testPrologue)()'>
+<canvas id="texcanvas" width="1" height="2"></canvas>
+<canvas id="example" width="1" height="2"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgb565.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgb565.html
new file mode 100644
index 000000000..09f13c2c5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgb565.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-image.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGB", "UNSIGNED_SHORT_5_6_5", "..", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba4444.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba4444.html
new file mode 100644
index 000000000..c72824ba1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba4444.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-image.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_SHORT_4_4_4_4", "..", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba5551.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba5551.html
new file mode 100644
index 000000000..d238fe92b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba5551.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-image.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_SHORT_5_5_5_1", "..", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image.html
new file mode 100644
index 000000000..27ebfe851
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-image.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_BYTE", "..", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html
new file mode 100644
index 000000000..21cd65185
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-svg-image.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_BYTE", "..", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html
new file mode 100644
index 000000000..73a7e5cdc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-video.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGB", "UNSIGNED_SHORT_5_6_5", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html
new file mode 100644
index 000000000..e6fdf95de
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-video.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_SHORT_4_4_4_4", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html
new file mode 100644
index 000000000..ded4438aa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-video.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_SHORT_5_5_5_1", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html
new file mode 100644
index 000000000..261c069a6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-video.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_BYTE", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html
new file mode 100644
index 000000000..21e6a872c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-webgl-canvas.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGB", "UNSIGNED_SHORT_5_6_5", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html
new file mode 100644
index 000000000..e8fdb8752
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-webgl-canvas.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_SHORT_4_4_4_4", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html
new file mode 100644
index 000000000..0b60cf8f0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-webgl-canvas.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_SHORT_5_5_5_1", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html
new file mode 100644
index 000000000..1e7138315
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html
@@ -0,0 +1,50 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../resources/tex-image-and-sub-image-2d-with-webgl-canvas.js"></script>
+<script>
+"use strict";
+function testPrologue(gl) {
+ return true;
+}
+</script>
+</head>
+<body onload='generateTest("RGBA", "UNSIGNED_BYTE", testPrologue)()'>
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-uniform-binding-bugs.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-uniform-binding-bugs.html
new file mode 100644
index 000000000..ff1a44710
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-uniform-binding-bugs.html
@@ -0,0 +1,65 @@
+<!--
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+
+description('Tests passing a vec4 to a uniform and a canvas to texImage2D');
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+var floatProgram = wtu.loadProgramFromFile(gl, "../resources/floatUniformShader.vert", "../resources/noopUniformShader.frag");
+shouldBeUndefined("gl.useProgram(floatProgram)");
+var fval4Loc = gl.getUniformLocation(floatProgram, "fval4");
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined("gl.uniform4fv(fval4Loc, new Float32Array([0.1, 0.2, 0.4, 1.0]));");
+
+var tmpcanvas = document.createElement("canvas");
+tmpcanvas.width = 2;
+tmpcanvas.height = 2;
+var texture = gl.createTexture();
+shouldBeUndefined("gl.bindTexture(gl.TEXTURE_2D, texture)");
+shouldBeUndefined("gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, tmpcanvas)");
+
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-canvas-corruption.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-canvas-corruption.html
new file mode 100644
index 000000000..28bce9f39
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-canvas-corruption.html
@@ -0,0 +1,74 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Testing 3D canvas is usable after being used as texImage2D source</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="512" height="512"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+// Regression test for http://crbug.com/368582
+description();
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+var ctx = canvas.getContext("2d");
+
+var gl = wtu.create3DContext();
+var texture = gl.createTexture();
+
+var image = wtu.makeImage('../resources/blue-1x1.jpg', function() {
+ renderToCanvas();
+ renderToCanvas();
+ wtu.checkCanvas(ctx, [0, 0, 255, 255], "All pixels should be blue", 2);
+ finishTest();
+});
+
+function renderToCanvas() {
+ // Clear the 2d canvas then draw the image to it (a blue pixel)
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
+ ctx.drawImage(image, 0, 0, canvas.width, canvas.height);
+
+ // Upload the results to a WebGL texture
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas);
+}
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-webgl.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-webgl.html
new file mode 100644
index 000000000..e24822bd2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-webgl.html
@@ -0,0 +1,101 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texImage2D from WebGL conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="256" height="16" style="width: 256px; height: 48px;"></canvas>
+<canvas id="source" width="256" height="16" style="width: 256px; height: 48px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("Test texImage2D from a webgl canvas.");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+gl.disable(gl.DITHER);
+var program = wtu.setupTexturedQuad(gl);
+var gl1 = wtu.create3DContext("source");
+gl1.disable(gl.DITHER);
+gl1.disable(gl.BLEND);
+gl1.disable(gl.DEPTH_TEST);
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+wtu.glErrorShouldBe(gl1, gl1.NO_ERROR, "Should be no errors from setup.");
+
+gl.disable(gl.BLEND);
+gl.disable(gl.DEPTH_TEST);
+
+gl1.clearColor(1.0, 0.0, 0.0, 1.0);
+gl1.clear(gl1.COLOR_BUFFER_BIT);
+
+var tex = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE, gl1.canvas);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+wtu.clearAndDrawUnitQuad(gl);
+
+wtu.checkCanvas(gl, [255, 0, 0, 255], "Canvas should be red");
+
+gl1.clearColor(0.0, 1.0, 0.0, 1.0);
+gl1.clear(gl1.COLOR_BUFFER_BIT);
+
+var program1 = wtu.setupTexturedQuad(gl1);
+var tex1 = gl1.createTexture();
+gl1.bindTexture(gl.TEXTURE_2D, tex1);
+gl1.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, 1, 1, 0, gl.RGB, gl.UNSIGNED_BYTE, new Uint8Array([0, 0, 255]));
+
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE, gl1.canvas);
+wtu.clearAndDrawUnitQuad(gl);
+
+wtu.checkCanvas(gl, [0, 255, 0, 255], "Canvas should be green");
+
+// Test a scenario from Chrome where a WebGL context would lose its active texture binding when its
+// canvas was used as the texture source for another WebGL context.
+wtu.clearAndDrawUnitQuad(gl1);
+
+wtu.checkCanvas(gl1, [0, 0, 255, 255], "Canvas should be blue");
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-format-and-type.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-format-and-type.html
new file mode 100644
index 000000000..84e690423
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-format-and-type.html
@@ -0,0 +1,745 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/pnglib.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var gl = null;
+var textureLoc = null;
+var successfullyParsed = false;
+
+//----------------------------------------------------------------------
+// Harness
+
+var testCases = [];
+
+var DataMode = {
+ IMAGE: 0,
+ IMAGE_DATA: 1,
+
+ NUM_HTML_MODES: 2,
+
+ RAW_DATA: 2,
+
+ // This must remain the last mode.
+ NUM_MODES: 3
+};
+
+function init()
+{
+ description('Verify texImage2D and texSubImage2D code paths taking both HTML and user-specified data with all format/type combinations');
+
+ var canvas = document.getElementById("example");
+ gl = wtu.create3DContext(canvas);
+ gl.disable(gl.DITHER);
+ var program = wtu.setupTexturedQuad(gl);
+
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
+ gl.disable(gl.BLEND);
+
+ textureLoc = gl.getUniformLocation(program, "tex");
+
+ initializeTests();
+}
+
+function initializeTests()
+{
+ // Verify that uploading to packed pixel formats performs the
+ // required conversion and associated loss of precision.
+ for (var dataMode = 0; dataMode < DataMode.NUM_HTML_MODES; ++dataMode) {
+ for (var useTexSubImage2D = 0; useTexSubImage2D < 2; ++useTexSubImage2D) {
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateOpaqueGrayscaleRamp,
+ premultiplyAlpha: false,
+ format: gl.RGBA,
+ type: gl.UNSIGNED_BYTE,
+ verifier: allChannelsIncreaseByNoMoreThan,
+ threshold: 1,
+ numOccurrences: 1,
+ description: "RGBA/UNSIGNED_BYTE should maintain full precision of data"
+ });
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateOpaqueGrayscaleRamp,
+ premultiplyAlpha: false,
+ format: gl.RGBA,
+ type: gl.UNSIGNED_SHORT_4_4_4_4,
+ verifier: allChannelsIncreaseByAtLeast,
+ threshold: 15,
+ numOccurrences: 10,
+ description: "RGBA/UNSIGNED_SHORT_4_4_4_4 must drop low four bits of precision"
+ });
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateOpaqueGrayscaleRamp,
+ premultiplyAlpha: false,
+ format: gl.RGBA,
+ type: gl.UNSIGNED_SHORT_5_5_5_1,
+ verifier: allChannelsIncreaseByAtLeast,
+ threshold: 7,
+ numOccurrences: 20,
+ description: "RGBA/UNSIGNED_SHORT_5_5_5_1 must drop low three bits of precision"
+ });
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateOpaqueGrayscaleRamp,
+ premultiplyAlpha: false,
+ format: gl.RGB,
+ type: gl.UNSIGNED_BYTE,
+ verifier: allChannelsIncreaseByNoMoreThan,
+ threshold: 1,
+ numOccurrences: 1,
+ description: "RGB/UNSIGNED_BYTE should maintain full precision of data"
+ });
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateOpaqueGrayscaleRamp,
+ premultiplyAlpha: false,
+ format: gl.RGB,
+ type: gl.UNSIGNED_SHORT_5_6_5,
+ verifier: allChannelsIncreaseByAtLeast,
+ threshold: 3,
+ numOccurrences: 20,
+ description: "RGB/UNSIGNED_SHORT_5_6_5 must drop low two or three bits of precision"
+ });
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateTranslucentGrayscaleRamp,
+ premultiplyAlpha: false,
+ format: gl.ALPHA,
+ type: gl.UNSIGNED_BYTE,
+ verifier: alphaChannelIncreasesByNoMoreThan,
+ threshold: 1,
+ numOccurrences: 1,
+ description: "ALPHA/UNSIGNED_BYTE should maintain full precision of data"
+ });
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateOpaqueGrayscaleRamp,
+ premultiplyAlpha: false,
+ format: gl.LUMINANCE,
+ type: gl.UNSIGNED_BYTE,
+ verifier: allChannelsIncreaseByNoMoreThan,
+ threshold: 1,
+ numOccurrences: 1,
+ description: "LUMINANCE/UNSIGNED_BYTE should maintain full precision of data"
+ });
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateOpaqueGrayscaleRamp,
+ premultiplyAlpha: false,
+ format: gl.LUMINANCE_ALPHA,
+ type: gl.UNSIGNED_BYTE,
+ verifier: allChannelsIncreaseByNoMoreThan,
+ threshold: 1,
+ numOccurrences: 1,
+ description: "LUMINANCE_ALPHA/UNSIGNED_BYTE should maintain full precision of data"
+ });
+ }
+ }
+
+ // Verify that setting the UNPACK_PREMULTIPLY_ALPHA_WEBGL pixel
+ // store parameter and sending down a zero alpha causes the color
+ // channels to go to zero.
+ for (var dataMode = 0; dataMode < DataMode.NUM_MODES; ++dataMode) {
+ for (var useTexSubImage2D = 0; useTexSubImage2D < 2; ++useTexSubImage2D) {
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateTransparentGrayscaleRamp,
+ premultiplyAlpha: true,
+ format: gl.RGBA,
+ type: gl.UNSIGNED_BYTE,
+ verifier: colorChannelsAreZero,
+ description: "UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_BYTE"
+ });
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateTransparentGrayscaleRamp,
+ premultiplyAlpha: true,
+ format: gl.RGBA,
+ type: gl.UNSIGNED_SHORT_4_4_4_4,
+ verifier: colorChannelsAreZero,
+ description: "UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_4_4_4_4"
+ });
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateTransparentGrayscaleRamp,
+ premultiplyAlpha: true,
+ format: gl.RGBA,
+ type: gl.UNSIGNED_SHORT_5_5_5_1,
+ verifier: colorChannelsAreZero,
+ description: "UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGBA/UNSIGNED_SHORT_5_5_5_1"
+ });
+ // The following few tests are invalid for the raw data
+ // mode because there is either no alpha channel or no
+ // separate alpha channel.
+ if (dataMode != DataMode.RAW_DATA) {
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateTransparentGrayscaleRamp,
+ premultiplyAlpha: true,
+ format: gl.RGB,
+ type: gl.UNSIGNED_BYTE,
+ verifier: colorChannelsAreZero,
+ description: "UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGB/UNSIGNED_BYTE"
+ });
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateTransparentGrayscaleRamp,
+ premultiplyAlpha: true,
+ format: gl.RGB,
+ type: gl.UNSIGNED_SHORT_5_6_5,
+ verifier: colorChannelsAreZero,
+ description: "UNPACK_PREMULTIPLY_ALPHA_WEBGL with RGB/UNSIGNED_SHORT_5_6_5"
+ });
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateTransparentGrayscaleRamp,
+ premultiplyAlpha: true,
+ format: gl.ALPHA,
+ type: gl.UNSIGNED_BYTE,
+ verifier: colorChannelsAreZero,
+ description: "UNPACK_PREMULTIPLY_ALPHA_WEBGL with ALPHA/UNSIGNED_BYTE"
+ });
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateTransparentGrayscaleRamp,
+ premultiplyAlpha: true,
+ format: gl.LUMINANCE,
+ type: gl.UNSIGNED_BYTE,
+ verifier: colorChannelsAreZero,
+ description: "UNPACK_PREMULTIPLY_ALPHA_WEBGL with LUMINANCE/UNSIGNED_BYTE"
+ });
+ }
+ testCases.push({
+ dataMode: dataMode,
+ useTexSubImage2D: !!useTexSubImage2D,
+ width: 256,
+ height: 1,
+ generator: generateTransparentGrayscaleRamp,
+ premultiplyAlpha: true,
+ format: gl.LUMINANCE_ALPHA,
+ type: gl.UNSIGNED_BYTE,
+ verifier: colorChannelsAreZero,
+ description: "UNPACK_PREMULTIPLY_ALPHA_WEBGL with LUMINANCE_ALPHA/UNSIGNED_BYTE"
+ });
+ }
+ }
+
+ // Produce data for all testcases. Because we load images, some of
+ // these may generate their data asynchronously.
+ generateTestData();
+}
+
+function generateTestData()
+{
+ for (var i = 0; i < testCases.length; i++) {
+ var testCase = testCases[i];
+ var wrapper = null;
+ switch (testCase.dataMode) {
+ case DataMode.IMAGE:
+ wrapper = new ImageWrapper(testCase.width, testCase.height);
+ break;
+ case DataMode.IMAGE_DATA:
+ wrapper = new ImageDataWrapper(testCase.width, testCase.height);
+ break;
+ case DataMode.RAW_DATA:
+ switch (testCase.type) {
+ case gl.UNSIGNED_BYTE:
+ switch (testCase.format) {
+ case gl.RGBA:
+ wrapper = new RGBA8DataWrapper(testCase.width, testCase.height);
+ break;
+ case gl.RGB:
+ wrapper = new RGB8DataWrapper(testCase.width, testCase.height);
+ break;
+ case gl.ALPHA:
+ wrapper = new A8DataWrapper(testCase.width, testCase.height);
+ break;
+ case gl.LUMINANCE:
+ wrapper = new L8DataWrapper(testCase.width, testCase.height);
+ break;
+ case gl.LUMINANCE_ALPHA:
+ wrapper = new LA8DataWrapper(testCase.width, testCase.height);
+ break;
+ }
+ break;
+ case gl.UNSIGNED_SHORT_4_4_4_4:
+ wrapper = new RGBA4444DataWrapper(testCase.width, testCase.height);
+ break;
+ case gl.UNSIGNED_SHORT_5_5_5_1:
+ wrapper = new RGBA5551DataWrapper(testCase.width, testCase.height);
+ break;
+ case gl.UNSIGNED_SHORT_5_6_5:
+ wrapper = new RGB565DataWrapper(testCase.width, testCase.height);
+ break;
+ }
+ }
+ testCase.wrapper = wrapper;
+ testCase.generator(wrapper);
+ testCase.wrapper.generateData();
+ }
+
+ // See whether we need to run the tests, in case all of them
+ // generated their results synchronously.
+ maybeRunTests();
+}
+
+var ranTests = false;
+
+function maybeRunTests()
+{
+ if (!ranTests)
+ for (var i = 0; i < testCases.length; ++i)
+ if (!testCases[i].wrapper || !testCases[i].wrapper.data)
+ return;
+
+ ranTests = true;
+
+ for (var i = 0; i < testCases.length; ++i)
+ runOneTest(testCases[i]);
+
+ finishTest();
+}
+
+function testCaseToString(testCase)
+{
+ var mode;
+ switch (testCase.dataMode) {
+ case DataMode.IMAGE:
+ mode = "Image";
+ break;
+ case DataMode.IMAGE_DATA:
+ mode = "ImageData";
+ break;
+ case DataMode.RAW_DATA:
+ mode = "raw data";
+ break;
+ }
+ return (testCase.useTexSubImage2D ? "texSubImage2D" : "texImage2D") +
+ " with " + mode + " at " + testCase.width + "x" + testCase.height;
+}
+
+function runOneTest(testCase)
+{
+ debug("Testing " + testCaseToString(testCase));
+ var data = testCase.wrapper.data;
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ var texture = gl.createTexture();
+ // Bind the texture to texture unit 0.
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ // Set up texture parameters.
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ // Set up pixel store parameters.
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, testCase.premultiplyAlpha);
+ // Upload the image into the texture.
+ if (testCase.useTexSubImage2D) {
+ // Initialize the texture to black first.
+ gl.texImage2D(gl.TEXTURE_2D, 0, testCase.format, testCase.width, testCase.height, 0,
+ testCase.format, testCase.type, null);
+ }
+ switch (testCase.dataMode) {
+ case DataMode.IMAGE:
+ case DataMode.IMAGE_DATA:
+ if (testCase.useTexSubImage2D)
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, testCase.format, testCase.type, data);
+ else
+ gl.texImage2D(gl.TEXTURE_2D, 0, testCase.format, testCase.format, testCase.type, data);
+ break;
+ case DataMode.RAW_DATA:
+ if (testCase.useTexSubImage2D)
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, testCase.width, testCase.height, testCase.format, testCase.type, data);
+ else
+ gl.texImage2D(gl.TEXTURE_2D, 0, testCase.format, testCase.width, testCase.height, 0, testCase.format, testCase.type, data);
+ break;
+ }
+ // Point the uniform sampler to texture unit 0.
+ gl.uniform1i(textureLoc, 0);
+ // Draw the triangles.
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ // Clean up the texture.
+ gl.deleteTexture(texture);
+
+ // Read back the rendering results.
+ var buf = new Uint8Array(testCase.width * testCase.height * 4);
+ gl.readPixels(0, 0, testCase.width, testCase.height, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ // Run the verification routine.
+ if (testCase.verifier(buf, testCase.threshold, testCase.numOccurrences))
+ testPassed(testCase.description);
+ else
+ testFailed(testCase.description);
+}
+
+//----------------------------------------------------------------------
+// Wrappers for programmatic construction of Image, ImageData and raw texture data
+//
+
+function ImageWrapper(width, height)
+{
+ this.pngBuilder_ = new PNGlib(width, height, 256);
+}
+
+ImageWrapper.prototype.getWidth = function() {
+ return this.pngBuilder_.width;
+};
+
+ImageWrapper.prototype.getHeight = function() {
+ return this.pngBuilder_.height;
+};
+
+ImageWrapper.prototype.setPixel = function(x, y, r, g, b, a) {
+ this.pngBuilder_.buffer[this.pngBuilder_.index(x, y)] = this.pngBuilder_.color(r, g, b, a);
+};
+
+// Generates data into "data" property, possibly asynchronously.
+ImageWrapper.prototype.generateData = function() {
+ var that = this;
+ var url = "data:image/png;base64," + this.pngBuilder_.getBase64();
+ var img = wtu.makeImage(url, function() {
+ that.data = img;
+ maybeRunTests();
+ });
+};
+
+function ImageDataWrapper(width, height)
+{
+ if (!ImageDataWrapper.tempCanvas) {
+ ImageDataWrapper.tempCanvas = document.createElement("canvas");
+ }
+ this.imageData_ = ImageDataWrapper.tempCanvas.getContext("2d").createImageData(width, height);
+}
+
+ImageDataWrapper.tempCanvas = null;
+
+ImageDataWrapper.prototype.getWidth = function() {
+ return this.imageData_.width;
+};
+
+ImageDataWrapper.prototype.getHeight = function() {
+ return this.imageData_.height;
+};
+
+ImageDataWrapper.prototype.setPixel = function(x, y, r, g, b, a) {
+ var index = 4 * (this.imageData_.width * y + x);
+ this.imageData_.data[index] = r;
+ this.imageData_.data[index + 1] = g;
+ this.imageData_.data[index + 2] = b;
+ this.imageData_.data[index + 3] = a;
+};
+
+ImageDataWrapper.prototype.generateData = function() {
+ this.data = this.imageData_;
+ maybeRunTests();
+};
+
+function TextureDataWrapper(width, height)
+{
+ this.width_ = width;
+ this.height_ = height;
+}
+
+TextureDataWrapper.prototype.getWidth = function() {
+ return this.width_;
+};
+
+TextureDataWrapper.prototype.getHeight = function() {
+ return this.height_;
+};
+
+TextureDataWrapper.prototype.generateData = function() {
+ this.data = this.data_;
+ maybeRunTests();
+};
+
+function RGBA8DataWrapper(width, height)
+{
+ TextureDataWrapper.call(this, width, height);
+ this.data_ = new Uint8Array(4 * width * height);
+}
+
+RGBA8DataWrapper.prototype = new TextureDataWrapper;
+
+RGBA8DataWrapper.prototype.setPixel = function(x, y, r, g, b, a) {
+ var index = 4 * (this.width_ * y + x);
+ this.data_[index] = r;
+ this.data_[index + 1] = g;
+ this.data_[index + 2] = b;
+ this.data_[index + 3] = a;
+};
+
+function RGBA5551DataWrapper(width, height)
+{
+ TextureDataWrapper.call(this, width, height);
+ this.data_ = new Uint16Array(width * height);
+}
+
+RGBA5551DataWrapper.prototype = new TextureDataWrapper;
+
+RGBA5551DataWrapper.prototype.setPixel = function(x, y, r, g, b, a) {
+ var value = (((r & 0xF8) << 8)
+ | ((g & 0xF8) << 3)
+ | ((b & 0xF8) >> 2)
+ | (a >> 7));
+ this.data_[this.width_ * y + x] = value;
+};
+
+function RGBA4444DataWrapper(width, height)
+{
+ TextureDataWrapper.call(this, width, height);
+ this.data_ = new Uint16Array(width * height);
+}
+
+RGBA4444DataWrapper.prototype = new TextureDataWrapper;
+
+RGBA4444DataWrapper.prototype.setPixel = function(x, y, r, g, b, a) {
+ var value = (((r & 0xF0) << 8)
+ | ((g & 0xF0) << 4)
+ | (b & 0xF0)
+ | (a >> 4));
+ this.data_[this.width_ * y + x] = value;
+};
+
+function RGB8DataWrapper(width, height)
+{
+ TextureDataWrapper.call(this, width, height);
+ this.data_ = new Uint8Array(3 * width * height);
+}
+
+RGB8DataWrapper.prototype = new TextureDataWrapper;
+
+RGB8DataWrapper.prototype.setPixel = function(x, y, r, g, b, a) {
+ var index = 3 * (this.width_ * y + x);
+ this.data_[index] = r;
+ this.data_[index + 1] = g;
+ this.data_[index + 2] = b;
+};
+
+function RGB565DataWrapper(width, height)
+{
+ TextureDataWrapper.call(this, width, height);
+ this.data_ = new Uint16Array(width * height);
+}
+
+RGB565DataWrapper.prototype = new TextureDataWrapper;
+
+RGB565DataWrapper.prototype.setPixel = function(x, y, r, g, b, a) {
+ var value = (((r & 0xF8) << 8)
+ | ((g & 0xFC) << 3)
+ | ((b & 0xF8) >> 3));
+ this.data_[this.width_ * y + x] = value;
+};
+
+function A8DataWrapper(width, height)
+{
+ TextureDataWrapper.call(this, width, height);
+ this.data_ = new Uint8Array(width * height);
+}
+
+A8DataWrapper.prototype = new TextureDataWrapper;
+
+A8DataWrapper.prototype.setPixel = function(x, y, r, g, b, a) {
+ this.data_[this.width_ * y + x] = a;
+};
+
+function L8DataWrapper(width, height)
+{
+ TextureDataWrapper.call(this, width, height);
+ this.data_ = new Uint8Array(width * height);
+}
+
+L8DataWrapper.prototype = new TextureDataWrapper;
+
+L8DataWrapper.prototype.setPixel = function(x, y, r, g, b, a) {
+ this.data_[this.width_ * y + x] = r;
+};
+
+function LA8DataWrapper(width, height)
+{
+ TextureDataWrapper.call(this, width, height);
+ this.data_ = new Uint8Array(2 * width * height);
+}
+
+LA8DataWrapper.prototype = new TextureDataWrapper;
+
+LA8DataWrapper.prototype.setPixel = function(x, y, r, g, b, a) {
+ var index = 2 * (this.width_ * y + x);
+ this.data_[index] = r;
+ this.data_[index + 1] = a;
+};
+
+//----------------------------------------------------------------------
+// Color ramp generation functions
+//
+
+function generateOpaqueGrayscaleRamp(wrapper)
+{
+ var width = wrapper.getWidth();
+ var height = wrapper.getHeight();
+ for (var x = 0; x < width; ++x) {
+ var value = Math.round(255.0 * x / width);
+ for (var y = 0; y < height; ++y)
+ wrapper.setPixel(x, y, value, value, value, 255);
+ }
+}
+
+function generateTranslucentGrayscaleRamp(wrapper)
+{
+ var width = wrapper.getWidth();
+ var height = wrapper.getHeight();
+ for (var x = 0; x < width; ++x) {
+ var value = Math.round(255.0 * x / width);
+ for (var y = 0; y < height; ++y)
+ wrapper.setPixel(x, y, value, value, value, value);
+ }
+}
+
+function generateTransparentGrayscaleRamp(wrapper)
+{
+ var width = wrapper.getWidth();
+ var height = wrapper.getHeight();
+ for (var x = 0; x < width; ++x) {
+ var value = Math.round(255.0 * x / width);
+ for (var y = 0; y < height; ++y)
+ wrapper.setPixel(x, y, value, value, value, 0);
+ }
+}
+
+//----------------------------------------------------------------------
+// Verification routines
+//
+
+function allChannelsIncreaseByNoMoreThan(array, threshold, numOccurrences) {
+ var numFound = 0;
+ for (var i = 4; i < array.length; i += 4)
+ for (var j = 0; j < 4; j++)
+ if (array[i + j] - array[i + j - 4] > threshold)
+ ++numFound;
+
+ return numFound < numOccurrences;
+}
+
+function alphaChannelIncreasesByNoMoreThan(array, threshold, numOccurrences) {
+ var numFound = 0;
+ for (var i = 7; i < array.length; i += 4)
+ if (array[i] - array[i - 4] > threshold)
+ ++numFound;
+
+ return numFound < numOccurrences;
+}
+
+function allChannelsIncreaseByAtLeast(array, threshold, numOccurrences) {
+ var numFound = 0;
+ for (var i = 4; i < array.length; i += 4)
+ for (var j = 0; j < 4; ++j)
+ if (array[i + j] - array[i + j - 4] > threshold)
+ ++numFound;
+
+ return numFound > numOccurrences;
+}
+
+function colorChannelsAreZero(array, threshold, numOccurrences) {
+ var passed = true;
+ var numFailures = 0;
+
+ for (var i = 4; i < array.length; i += 4)
+ for (var j = 0; j < 3; ++j)
+ if (array[i + j] != 0) {
+ passed = false;
+ if (++numFailures <= 5)
+ debug(" array[" + (i + j) + "] should have been 0, was " + array[i + j]);
+ }
+
+ return passed;
+}
+
+</script>
+</head>
+<body onload="init()">
+<canvas id="example" width="256" height="1"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-invalid-data.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-invalid-data.html
new file mode 100644
index 000000000..a025b3be0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-invalid-data.html
@@ -0,0 +1,147 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+ <title>texImage2D and texSubImage2D tests with invalid data</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script type="text/javascript">
+description("texImage2D and texSubImage2D tests with invalid data");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("canvas");
+var gl = wtu.create3DContext(canvas);
+if (!gl)
+ testFailed("Context created.");
+else
+ testPassed("Context created.");
+
+var tex;
+
+function setup() {
+ tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 64, 64, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+}
+
+function teardown() {
+ gl.deleteTexture(tex);
+}
+
+function test(desc, func, expected) {
+ debug(desc);
+
+ var exc = null;
+ try {
+ func();
+ } catch (x) {
+ exc = x;
+ }
+
+ if (expected == gl.INVALID_OPERATION) {
+ wtu.glErrorShouldBe(gl, expected);
+ } else if (expected == "exception") {
+ if (exc) {
+ testPassed("threw exception");
+ } else {
+ testFailed("did not throw exception");
+ }
+ }
+}
+
+test("Calling texImage2D with no WebGLTexture bound generates INVALID_OPERATION",
+ function () {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 64, 64, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ },
+ gl.INVALID_OPERATION);
+
+test("Calling texSubImage2D with no WebGLTexture bound generates INVALID_OPERATION",
+ function () {
+ var buffer = new Uint8Array(4);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buffer);
+ },
+ gl.INVALID_OPERATION);
+
+setup();
+
+test("Passing a buffer not large enough to texImage2D should generate an INVALID_OPERATION",
+ function () {
+ var tooSmall = new Uint8Array(64);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 64, 64, 0, gl.RGBA, gl.UNSIGNED_BYTE, tooSmall);
+ },
+ gl.INVALID_OPERATION);
+
+test("Passing texImage2D parameter data of Number type should throw an exception",
+ function () {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 64, 64, 0, gl.RGBA, gl.UNSIGNED_BYTE, 42);
+ },
+ "exception");
+
+test("Passing texImage2D parameter data of String type should throw a TypeError",
+ function () {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 64, 64, 0, gl.RGBA, gl.UNSIGNED_BYTE, "not a buffer");
+ },
+ "exception");
+test("Passing a buffer not large enough to texSubImage2D should generate an INVALID_OPERATION",
+ function () {
+ var tooSmall = new Uint8Array(64);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 64, 64, gl.RGBA, gl.UNSIGNED_BYTE, tooSmall);
+ },
+ gl.INVALID_OPERATION);
+
+test("Passing texSubImage2D parameter data of Number type should throw a TypeError",
+ function () {
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 64, 64, gl.RGBA, gl.UNSIGNED_BYTE, 42);
+ },
+ "exception");
+
+test("Passing texSubImage2D parameter data of String type should throw a TypeError",
+ function () {
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 64, 64, gl.RGBA, gl.UNSIGNED_BYTE, "not a buffer");
+ },
+ "exception");
+
+teardown();
+
+debug("");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html
new file mode 100644
index 000000000..4d7a54892
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html
@@ -0,0 +1,385 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var gl = null;
+var tex = null;
+var error = 0;
+
+function enumToString(value) {
+ return wtu.glEnumToString(gl, value);
+}
+
+function testTexImage2D(testCase)
+{
+ var level = 0;
+ var width = 16;
+ var height = 16;
+ var msg = "" +
+ " internalFormat: " + enumToString(testCase.internalFormat) +
+ " target: " + enumToString(testCase.target) +
+ " format: " + enumToString(testCase.format) +
+ " type: " + enumToString(testCase.type) +
+ " border: " + testCase.border;
+
+ gl.texImage2D(testCase.target, level, testCase.internalFormat, width, height, testCase.border, testCase.format, testCase.type, null);
+ error = testCase.expectedError;
+ wtu.glErrorShouldBe(gl, error, msg);
+}
+
+function testTexSubImage2D(testCase)
+{
+ var level = 0;
+ var xoffset = 0;
+ var yoffset = 0;
+ var width = 16;
+ var height = 16;
+ var msg = ""+
+ " format: " + enumToString(testCase.format) +
+ " type: " + enumToString(testCase.type);
+ var array = new Uint8Array(width * height * 4);
+ gl.texSubImage2D(testCase.target, level, xoffset, yoffset, width, height, testCase.format, testCase.type, array);
+ error = testCase.expectedError;
+ wtu.glErrorShouldBe(gl, error, msg);
+}
+
+function testTexParameter(testCase)
+{
+ var msg = "paramName: " + enumToString(testCase.pname);
+ error = testCase.expectedError;
+ gl.texParameteri(testCase.target, testCase.pname, testCase.param);
+ wtu.glErrorShouldBe(gl, error, msg);
+ gl.texParameterf(testCase.target, testCase.pname, testCase.param);
+ wtu.glErrorShouldBe(gl, error, msg);
+}
+
+function testGetTexParameter(testCase)
+{
+ var msg = "paramName: " + enumToString(testCase.pname);
+ error = testCase.expectedError;
+ gl.getTexParameter(testCase.target, testCase.pname);
+ wtu.glErrorShouldBe(gl, error, msg);
+}
+
+function testCopyTexImage2D(testCase)
+{
+ var level = 0;
+ var x = 0;
+ var y = 0;
+ var width = 16;
+ var height = 16;
+
+ var msg = "" +
+ " colorBufferFormat: " + enumToString(testCase.colorBufferFormat) +
+ " internalFormat: " + enumToString(testCase.internalFormat) +
+ " target: " + enumToString(testCase.target) +
+ " border: " + testCase.border;
+
+ gl.renderbufferStorage(gl.RENDERBUFFER, testCase.colorBufferFormat, width, height);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+
+ gl.copyTexImage2D(testCase.target, level, testCase.internalFormat, x, y, width, height, testCase.border);
+ error = testCase.expectedError;
+ wtu.glErrorShouldBe(gl, error, msg);
+}
+
+function testCopyTexSubImage2D(testCase)
+{
+ var level = 0;
+ var x = 0;
+ var y = 0;
+ var width = 16;
+ var height = 16;
+ var xoffset = 0;
+ var yoffset = 0;
+ var border = 0;
+ var type = gl.UNSIGNED_BYTE;
+ var msg = "" +
+ " colorBufferFormat: " + enumToString(testCase.colorBufferFormat) +
+ " internalFormat: " + enumToString(testCase.internalFormat) +
+ " target: " + enumToString(testCase.target);
+
+ gl.renderbufferStorage(gl.RENDERBUFFER, testCase.colorBufferFormat, width, height);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_COMPLETE");
+
+ gl.texImage2D(testCase.target, level, testCase.internalFormat, xoffset + width, yoffset + height, border, testCase.internalFormat, type, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ gl.copyTexSubImage2D(testCase.target, level, xoffset, yoffset, x, y, width, height);
+ error = testCase.expectedError;
+ wtu.glErrorShouldBe(gl, error, msg);
+}
+
+function testCopyFromInternalFBO(testCase)
+{
+ var target = gl.TEXTURE_2D;
+ var level = 0;
+ var x = 0;
+ var y = 0;
+ var width = 16;
+ var height = 16;
+ var xoffset = 0;
+ var yoffset = 0;
+ var border = 0;
+ var type = gl.UNSIGNED_BYTE;
+ var msg = "" +
+ " colorBufferFormat: " + enumToString(testCase.contextAlpha ? gl.RGBA : gl.RGB) +
+ " internalFormat: " + enumToString(testCase.internalFormat);
+
+ if (testCase.contextAlpha)
+ gl = wtu.create3DContext(null, { alpha: true });
+ else
+ gl = wtu.create3DContext(null, { alpha: false });
+ shouldBeNonNull("gl");
+ shouldBeNonNull("tex = gl.createTexture()");
+ gl.bindTexture(target, tex);
+ if (testCase.subImage) {
+ gl.texImage2D(target, level, testCase.internalFormat, xoffset + width, yoffset + height, border, testCase.internalFormat, type, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ gl.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+ } else {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+ gl.copyTexImage2D(target, level, testCase.internalFormat, x, y, width, height, border);
+ }
+ error = testCase.expectedError;
+ wtu.glErrorShouldBe(gl, error, msg);
+}
+
+description("Validate tex functions input parameters");
+
+shouldBeNonNull("gl = wtu.create3DContext()");
+shouldBeNonNull("tex = gl.createTexture()");
+gl.bindTexture(gl.TEXTURE_2D, tex);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+debug("");
+debug("Checking TexImage2D: a set of inputs that are valid in GL but invalid in GLES2");
+
+var testCases =
+ [ {target: 0x8064, // GL_PROXY_TEXTURE_2D
+ internalFormat: gl.RGBA,
+ border: 0,
+ format: gl.RGBA,
+ type: gl.UNSIGNED_BYTE,
+ expectedError: gl.INVALID_ENUM},
+ {target: gl.TEXTURE_2D,
+ internalFormat: 0x1903, // GL_RED
+ border: 0,
+ format: 0x1903, // GL_RED
+ type: gl.UNSIGNED_BYTE,
+ expectedError: [gl.INVALID_ENUM, gl.INVALID_VALUE] },
+ {target: gl.TEXTURE_2D,
+ internalFormat: gl.RGBA,
+ border: 1,
+ format: gl.RGBA,
+ type: gl.UNSIGNED_BYTE,
+ expectedError: gl.INVALID_VALUE},
+ {target: gl.TEXTURE_2D,
+ internalFormat: gl.RGBA,
+ border: 0,
+ format: gl.RGB,
+ type: gl.UNSIGNED_BYTE,
+ expectedError: gl.INVALID_OPERATION},
+ {target: gl.TEXTURE_2D,
+ internalFormat: gl.RGBA,
+ border: 0,
+ format: gl.RGBA,
+ type: gl.BYTE,
+ expectedError: gl.INVALID_ENUM},
+ {target: gl.TEXTURE_2D,
+ internalFormat: gl.RGBA,
+ border: 0,
+ format: gl.RGBA,
+ type: gl.UNSIGNED_BYTE,
+ expectedError: gl.NO_ERROR} ];
+
+for (var ii = 0; ii < testCases.length; ++ii)
+ testTexImage2D(testCases[ii]);
+
+debug("");
+debug("Checking TexSubImage2D: a set of inputs that are valid in GL but invalid in GLES2");
+
+testCases =
+ [ {target: gl.TEXTURE_2D,
+ format: 0x1903, // GL_RED
+ type: gl.UNSIGNED_BYTE,
+ expectedError: gl.INVALID_ENUM},
+ {target: gl.TEXTURE_2D,
+ format: gl.RGBA,
+ type: gl.BYTE,
+ expectedError: gl.INVALID_ENUM},
+ {target: gl.TEXTURE_2D,
+ format: gl.RGBA,
+ type: gl.UNSIGNED_BYTE,
+ expectedError: gl.NO_ERROR} ];
+
+for (var ii = 0; ii < testCases.length; ++ii)
+ testTexSubImage2D(testCases[ii]);
+
+debug("");
+debug("Checking TexParameter: a set of inputs that are valid in GL but invalid in GLES2");
+
+testCases =
+ [ {target: 0x0DE0, // GL_TEXTURE_1D
+ pname: gl.TEXTURE_WRAP_T,
+ param: gl.REPEAT,
+ expectedError: gl.INVALID_ENUM},
+ {target: gl.TEXTURE_2D,
+ pname: 0x813A, // GL_TEXTURE_MIN_LOD
+ param: 0,
+ expectedError: gl.INVALID_ENUM},
+ {target: gl.TEXTURE_2D,
+ pname: gl.TEXTURE_WRAP_T,
+ param: 0x2900, // GL_CLAMP
+ expectedError: gl.INVALID_ENUM},
+ {target: gl.TEXTURE_2D,
+ pname: gl.TEXTURE_WRAP_T,
+ param: gl.REPEAT,
+ expectedError: gl.NO_ERROR} ];
+
+for (var ii = 0; ii < testCases.length; ++ii)
+ testTexParameter(testCases[ii]);
+
+debug("");
+debug("Checking GetTexParameter: a set of inputs that are valid in GL but invalid in GLES2");
+
+testCases =
+ [ {target: 0x0DE0, // GL_TEXTURE_1D
+ pname: gl.TEXTURE_WRAP_T,
+ expectedError: gl.INVALID_ENUM},
+ {target: gl.TEXTURE_2D,
+ pname: 0x813A, // GL_TEXTURE_MIN_LOD
+ expectedError: gl.INVALID_ENUM},
+ {target: gl.TEXTURE_2D,
+ pname: gl.TEXTURE_WRAP_T,
+ expectedError: gl.NO_ERROR} ];
+
+for (var ii = 0; ii < testCases.length; ++ii)
+ testGetTexParameter(testCases[ii]);
+
+debug("");
+debug("Checking CopyTexImage2D: a set of inputs that are valid in GL but invalid in GLES2");
+
+var colorBuffer = null;
+var fbo = null;
+
+shouldBeNonNull("fbo = gl.createFramebuffer()");
+gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+shouldBeNonNull("colorBuffer = gl.createRenderbuffer()");
+gl.bindRenderbuffer(gl.RENDERBUFFER, colorBuffer);
+gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, colorBuffer);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+testCases =
+ [ {target: gl.TEXTURE_2D,
+ colorBufferFormat: gl.RGB565,
+ internalFormat: 0x8054, // GL_RGB16
+ border: 0,
+ expectedError: gl.INVALID_ENUM},
+ {target: gl.TEXTURE_2D,
+ colorBufferFormat: gl.RGB565,
+ internalFormat: gl.RGBA,
+ border: 1,
+ expectedError: gl.INVALID_VALUE},
+ {target: gl.TEXTURE_2D,
+ colorBufferFormat: gl.RGB565,
+ internalFormat: gl.RGBA,
+ border: 0,
+ expectedError: gl.INVALID_OPERATION},
+ {target: gl.TEXTURE_2D,
+ colorBufferFormat: gl.RGB565,
+ internalFormat: gl.RGB,
+ border: 0,
+ expectedError: gl.NO_ERROR} ];
+
+for (var ii = 0; ii < testCases.length; ++ii)
+ testCopyTexImage2D(testCases[ii]);
+
+debug("");
+debug("Checking CopyTexSubImage2D: a set of inputs that are valid in GL but invalid in GLES2");
+
+testCases =
+ [ {target: gl.TEXTURE_2D,
+ colorBufferFormat: gl.RGB5_A1,
+ internalFormat: gl.RGBA,
+ expectedError: gl.NO_ERROR},
+ {target: gl.TEXTURE_2D,
+ colorBufferFormat: gl.RGB565,
+ internalFormat: gl.RGBA,
+ expectedError: gl.INVALID_OPERATION} ];
+
+for (var ii = 0; ii < testCases.length; ++ii)
+ testCopyTexSubImage2D(testCases[ii]);
+
+debug("");
+debug("Checking CopyTex{Sub}Image2D: copy from WebGL internal framebuffer");
+
+testCases =
+ [ {contextAlpha: true,
+ internalFormat: gl.RGBA,
+ subImage: false,
+ expectedError: gl.NO_ERROR},
+ {contextAlpha: false,
+ internalFormat: gl.RGBA,
+ subImage: false,
+ expectedError: gl.INVALID_OPERATION},
+ {contextAlpha: true,
+ internalFormat: gl.RGBA,
+ subImage: true,
+ expectedError: gl.NO_ERROR},
+ {contextAlpha: false,
+ internalFormat: gl.RGBA,
+ subImage: true,
+ expectedError: gl.INVALID_OPERATION} ];
+
+for (var ii = 0; ii < testCases.length; ++ii)
+ testCopyFromInternalFBO(testCases[ii]);
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html
new file mode 100644
index 000000000..df8865d8c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html
@@ -0,0 +1,94 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="testbed" width="16" height="16"></canvas>
+<canvas id="c" width="16" height="16"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description('Tests texSubImage2D with bad arguments');
+
+var wtu = WebGLTestUtils;
+var c = document.getElementById("c");
+
+var gl = wtu.create3DContext("testbed");
+var tex = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Setup should succeed");
+
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 1, gl.RGBA, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "y + height > texture height");
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "x + width > texture width");
+gl.texSubImage2D(gl.TEXTURE_2D, 0, -1, 0, gl.RGBA, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "negative x");
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, -1, gl.RGBA, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "negative y");
+gl.texSubImage2D(gl.TEXTURE_2D, -1, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "negative level");
+gl.texSubImage2D(gl.FLOAT, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "bad target");
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "good args");
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "format not same as original");
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_SHORT_4_4_4_4, c);
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "type not same as original");
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "make texture RGB");
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "format same as original RGB");
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "format not same as original RGB");
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_SHORT_5_6_5, c);
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "type not same as original RGB");
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_SHORT_4_4_4_4, c);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "make texture RGBA 4_4_4_4");
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_SHORT_4_4_4_4, c);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "format same as original RGBA 4_4_4_4");
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "format not same as original RGBA 4_4_4_4");
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, c);
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "type not same as original RGBA 4_4_4_4");
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d.html
new file mode 100644
index 000000000..e5f825d54
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d.html
@@ -0,0 +1,124 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform sampler2D tex;
+varying vec2 texCoord;
+
+void main()
+{
+ float intensity = texture2D(tex, texCoord).a;
+ gl_FragColor = vec4(intensity, intensity, intensity, 1.0);
+}
+</script>
+
+</head>
+<body>
+<canvas id="example" width="256" height="1"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description('Tests texSubImage2D upload path from Uint8Array');
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+var gl = wtu.create3DContext(canvas);
+gl.disable(gl.DITHER);
+var program = wtu.setupProgram(
+ gl,
+ [wtu.setupSimpleTextureVertexShader(gl), "fshader"],
+ ['vPosition', 'texCoord0']);
+wtu.setupUnitQuad(gl);
+var textureWidth = 256;
+var textureHeight = 1;
+
+var textureLoc = gl.getUniformLocation(program, "tex");
+
+var texture = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, texture);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+// Allocate the texture object
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.ALPHA, textureWidth, textureHeight, 0, gl.ALPHA, gl.UNSIGNED_BYTE, null);
+// Prepare the image data
+var array = new Uint8Array(textureWidth);
+for (var i = 0; i < textureWidth; i++)
+ array[i] = i;
+// Fill the texture object with data -- this is actually the code path being tested
+gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, textureWidth, textureHeight, gl.ALPHA, gl.UNSIGNED_BYTE, array);
+
+// Clear and set up
+gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+gl.bindTexture(gl.TEXTURE_2D, texture);
+gl.useProgram(program);
+gl.uniform1i(textureLoc, 0);
+// Draw the texture to the frame buffer
+gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+// Read back the frame buffer
+var buf = new Uint8Array(textureWidth * textureHeight * 4);
+gl.readPixels(0, 0, textureWidth, textureHeight, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+
+// Verify the frame buffer's contents
+var passed = true;
+for (var i = 0; i < textureWidth; i++) {
+ var val = i;
+ if (buf[4 * i + 0] != val ||
+ buf[4 * i + 1] != val ||
+ buf[4 * i + 2] != val) {
+ testFailed("pixel at (" + i + ", 0) was (" +
+ buf[4 * i + 0] + ", " +
+ buf[4 * i + 1] + ", " +
+ buf[4 * i + 2] + "), should be (" +
+ val + ", " + val + ", " + val + ")");
+ passed = false;
+ break;
+ }
+}
+
+if (passed)
+ testPassed("");
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texparameter-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texparameter-test.html
new file mode 100644
index 000000000..c719e6501
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texparameter-test.html
@@ -0,0 +1,207 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>WebGL TexParameter conformance test.</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="24" height="24"></canvas>
+<canvas id="canvas2d" width="2" height="2"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+uniform mat4 world;
+attribute vec3 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord;
+void main()
+{
+ gl_Position = world * vec4(vPosition, 1);
+ texCoord = texCoord0;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform sampler2D tex;
+varying vec2 texCoord;
+void main()
+{
+ gl_FragColor = texture2D(tex, texCoord);
+}
+</script>
+
+<script>
+"use strict";
+function init()
+{
+ description("Tests TexParameter works as expected");
+ debug("");
+
+ var canvas2d = document.getElementById("canvas2d");
+ var ctx2d = canvas2d.getContext("2d");
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition", "texCoord0"]);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(
+ gl.ARRAY_BUFFER,
+ new Float32Array([-1, 1,0, 1,1,0, -1,-1,0,
+ -1,-1,0, 1,1,0, 1,-1,0]),
+ gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(
+ gl.ARRAY_BUFFER,
+ new Float32Array([ -2.5,-2.5, 3.5,-2.5, -2.5,3.5,
+ -2.5,3.5, 3.5,-2.5, 3.5,3.5]),
+ gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(1);
+ gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, 0);
+
+ var colors = [
+ [0,255,128,255],
+ [128,64,255,255],
+ [192,255,64,255],
+ [200,0,255,255]];
+ var texParam = [
+ gl.REPEAT,
+ gl.CLAMP_TO_EDGE,
+ gl.MIRRORED_REPEAT,
+ gl.REPEAT];
+
+ // Make textures setting the texture parameters differently each time..
+ // This verifies both that the render correct AND that texture parameters
+ // are associated with the textures, not with the texture-units.
+ var textures = [];
+ for (var ii = 0; ii < colors.length; ++ii) {
+ var c = colors[ii];
+ ctx2d.fillStyle =
+ "rgba(" + c[0] + "," + c[1] + "," + c[2] + "," + c[3] + ")";
+ ctx2d.fillRect(0, 0, 1, 1);
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, texParam[ii]);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, texParam[ii]);
+ textures[ii] = tex;
+ }
+
+ var textureLoc = gl.getUniformLocation(program, "tex");
+ var worldLoc = gl.getUniformLocation(program, "world");
+
+ gl.clearColor(1,1,1,1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ for (var ii = 0; ii < colors.length; ++ii) {
+ var x = ii % 2;
+ var y = Math.floor(ii / 2);
+ gl.bindTexture(gl.TEXTURE_2D, textures[ii]);
+ gl.uniformMatrix4fv(
+ worldLoc, false,
+ [0.5, 0, 0, 0,
+ 0, 0.5, 0, 0,
+ 0, 0, 1, 0,
+ -0.5 + x, -0.5 + y, 0, 1]);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ }
+
+ var buf = new Uint8Array(24 * 24 * 4);
+ gl.readPixels(0, 0, 24, 24, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+ var passed = true;
+ for (var ii = 0; ii < colors.length; ++ii) {
+ var x = ii % 2;
+ var y = Math.floor(ii / 2);
+ var c = colors[ii];
+ for (var yy = 0; yy < 12; ++yy) {
+ for (var xx = 0; xx < 12; ++xx) {
+ var ec = [0,0,0,0];
+ switch (texParam[ii]) {
+ case gl.REPEAT:
+ if (xx % 2 == 1 && yy % 2 == 0) {
+ ec = c;
+ }
+ break;
+ case gl.CLAMP_TO_EDGE:
+ if (xx < 6 && yy >= 6) {
+ ec = c;
+ }
+ break;
+ case gl.MIRRORED_REPEAT:
+ if (xx % 4 < 2 && yy % 4 >= 2) {
+ ec = c;
+ }
+ break;
+ }
+ var off = ((y * 12 + yy) * 24 + x * 12 + xx) * 4;
+ if (buf[off + 0] != ec[0] ||
+ buf[off + 1] != ec[1] ||
+ buf[off + 2] != ec[2] ||
+ buf[off + 3] != ec[3]) {
+ var msg = 'at (' + (x * 12 + xx) + ', ' + (y * 12 + yy) +
+ ') expected: ' +
+ ec[0] + ', ' + ec[1] + ', ' + ec[2] + ', ' + ec[3] + ' found: ' +
+ buf[off + 0] + ', ' +
+ buf[off + 1] + ', ' +
+ buf[off + 2] + ', ' +
+ buf[off + 3];
+ testFailed(msg);
+ passed = false;
+ }
+ }
+ }
+ }
+ if (passed) {
+ testPassed("rendered as expected");
+ }
+}
+
+init();
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind-2.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind-2.html
new file mode 100644
index 000000000..44452b0ac
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind-2.html
@@ -0,0 +1,233 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>WebGL ActiveTexture BindTexture conformance test #2</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="2" height="2" style="width: 40px; height: 40px;"></canvas>
+<canvas id="canvas2d" width="1" height="1" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+uniform mat4 world;
+attribute vec3 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord;
+void main()
+{
+ gl_Position = world * vec4(vPosition, 1);
+ texCoord = texCoord0;
+}
+</script>
+<script id="fshader2d" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform sampler2D tex2d;
+varying vec2 texCoord;
+void main()
+{
+ gl_FragColor = texture2D(tex2d, texCoord);
+}
+</script>
+<script id="fshaderCube" type="x-shader/x-fragment">
+precision mediump float;
+
+uniform samplerCube texCube;
+void main()
+{
+ gl_FragColor = textureCube(texCube, vec3(0,1,0));
+}
+</script>
+
+<script>
+"use strict";
+function init()
+{
+ description(
+ "Tests that binding both TEXTURE_2D and TEXTURE_CUBE_MAP to the same " +
+ "active texture unit works as long as they are not used " +
+ "simultaneously in the same shader program.");
+
+ var canvas2d = document.getElementById("canvas2d");
+ var ctx2d = canvas2d.getContext("2d");
+ ctx2d.globalCompositeOperation = "copy";
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(
+ gl, ["vshader", "fshader2d"], ["vPosition", "texCoord0"]);
+
+ var program2d = program;
+ var programCube = wtu.setupProgram(
+ gl, ["vshader", "fshaderCube"], ["vPosition", "texCoord0"]);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(
+ gl.ARRAY_BUFFER,
+ new Float32Array([-1, 1,0, 1,1,0, -1,-1,0,
+ -1,-1,0, 1,1,0, 1,-1,0]),
+ gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(0);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ var vertexObject = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+ gl.bufferData(
+ gl.ARRAY_BUFFER,
+ new Float32Array([ 0,0, 1,0, 0,1,
+ 0,1, 1,0, 1,1]),
+ gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(1);
+ gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, 0);
+
+ // Make texture unit 1 active.
+ gl.activeTexture(gl.TEXTURE1);
+
+ // Make a 2d texture
+ var tex2d = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex2d);
+ ctx2d.fillStyle = "rgba(0, 0, 255, 255)";
+ ctx2d.fillRect(0, 0, 1, 1);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d);
+
+ // make a cube texture
+ var texCube = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCube);
+ ctx2d.fillStyle = "rgba(255, 0, 255, 255)";
+ ctx2d.fillRect(0, 0, 1, 1);
+ var targets = [
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z];
+ for (var ii = 0; ii < targets.length; ++ii) {
+ gl.texImage2D(targets[ii], 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d);
+ }
+
+ // Setup program2d and programCube
+ var tex2dLoc = gl.getUniformLocation(program2d, "tex2d");
+ var world2dLoc = gl.getUniformLocation(program2d, "world");
+ var texCubeLoc = gl.getUniformLocation(programCube, "texCube");
+ var worldCubeLoc = gl.getUniformLocation(programCube, "world");
+
+ gl.useProgram(program2d);
+ gl.uniform1i(tex2dLoc, 1);
+ gl.useProgram(programCube);
+ gl.uniform1i(texCubeLoc, 1);
+
+ gl.clearColor(1,0,0,1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ var programs = [program2d, programCube];
+ var worldLocs = [world2dLoc, worldCubeLoc];
+ for (var ii = 0; ii < 4; ++ii) {
+ var x = ii % 2;
+ var y = Math.floor(ii / 2);
+ gl.useProgram(programs[x]);
+ gl.uniformMatrix4fv(
+ worldLocs[x], false,
+ [0.5, 0, 0, 0,
+ 0, 0.5, 0, 0,
+ 0, 0, 1, 0,
+ -0.5 + x, -0.5 + y, 0, 1]);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ }
+
+ var colors = [
+ [0,0,255,255],
+ [255,0,255,255],
+ [0,0,255,255],
+ [255,0,255,255]];
+
+ for (var ii = 0; ii < colors.length; ++ii) {
+ var c = colors[ii];
+ var x = ii % 2;
+ var y = Math.floor(ii / 2);
+ wtu.checkCanvasRect(gl, x, y, 1, 1, c);
+ }
+
+ // Test that binding to one target does not affect the other
+ debug("");
+ debug("Testing texture target binding/unbinding");
+
+ var worldMatrix = [
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1];
+
+ gl.activeTexture(gl.TEXTURE2);
+
+ // Unbinding the TEXTURE_CUBE_MAP target should not affect the TEXTURE_2D target
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ gl.bindTexture(gl.TEXTURE_2D, tex2d);
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCube);
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);
+
+ gl.useProgram(program2d);
+ gl.uniform1i(tex2dLoc, 2);
+ gl.uniformMatrix4fv(world2dLoc, false, worldMatrix);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+ wtu.checkCanvasRect(gl, 0, 0, 2, 2, [0,0,255,255]);
+
+ // Unbinding the TEXTURE_2D target should not affect the TEXTURE_CUBE_MAP target
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCube);
+ gl.bindTexture(gl.TEXTURE_2D, tex2d);
+ gl.bindTexture(gl.TEXTURE_2D, null);
+
+ gl.useProgram(programCube);
+ gl.uniform1i(texCubeLoc, 2);
+ gl.uniformMatrix4fv(worldCubeLoc, false, worldMatrix);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+ wtu.checkCanvasRect(gl, 0, 0, 2, 2, [255,0,255,255]);
+}
+
+init();
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind.html
new file mode 100644
index 000000000..31c1eb79b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind.html
@@ -0,0 +1,143 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL ActiveTexture BindTexture conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="2" height="2" style="width: 40px; height: 40px;"></canvas>
+<canvas id="canvas2d" width="1" height="1" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+uniform mat4 world;
+attribute vec3 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord;
+void main()
+{
+ gl_Position = world * vec4(vPosition, 1);
+ texCoord = texCoord0;
+}
+</script>
+<script>
+"use strict";
+var gl;
+
+function init()
+{
+ description(
+ "Tests that glActiveTexture and glBindTexture work as expected" +
+ "Specifically texture targets are per active texture unit.");
+
+ var canvas2d = document.getElementById("canvas2d");
+ var ctx2d = canvas2d.getContext("2d");
+
+ var wtu = WebGLTestUtils;
+ gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(
+ gl,
+ ["vshader", wtu.setupSimpleTextureFragmentShader(gl)],
+ ['vPosition', 'texCoord0']);
+ wtu.setupUnitQuad(gl);
+ gl.disable(gl.DEPTH_TEST);
+ gl.disable(gl.BLEND);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ var colors = [
+ [0,192,128,255],
+ [128,64,255,255],
+ [192,255,64,255],
+ [200,0,255,255]];
+
+ // Make 4 textures by using 4 active texture units if available.
+ var texunits = Math.min(colors.length, gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS))
+ var textures = [];
+ for (var ii = 0; ii < texunits; ++ii) {
+ var tex = gl.createTexture();
+ gl.activeTexture(gl.TEXTURE0 + ii);
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ textures[ii] = tex;
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ // now use each texture unit to write into the textures,
+ for (var ii = 0; ii < texunits; ++ii) {
+ var c = colors[ii];
+ ctx2d.fillStyle =
+ "rgba(" + c[0] + "," + c[1] + "," + c[2] + "," + c[3] + ")";
+ ctx2d.fillRect(0, 0, 1, 1);
+ gl.activeTexture(gl.TEXTURE0 + ii);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d);
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ var textureLoc = gl.getUniformLocation(program, "tex");
+ var worldLoc = gl.getUniformLocation(program, "world");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ gl.clearColor(1,0,0,1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ for (var ii = 0; ii < texunits; ++ii) {
+ var x = ii % 2;
+ var y = Math.floor(ii / 2);
+ gl.uniform1i(textureLoc, ii);
+ gl.uniformMatrix4fv(
+ worldLoc, false,
+ [0.5, 0, 0, 0,
+ 0, 0.5, 0, 0,
+ 0, 0, 1, 0,
+ -0.5 + x, -0.5 + y, 0, 1]);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ }
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ for (var ii = 0; ii < texunits; ++ii) {
+ var x = ii % 2;
+ var y = Math.floor(ii / 2);
+ wtu.checkCanvasRect(gl, x, y, 1, 1, colors[ii]);
+ }
+}
+
+init();
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html
new file mode 100644
index 000000000..f171839b5
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html
@@ -0,0 +1,200 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Texture Attachment Format Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2" style="width: 100px; height:100px; border: 1px solid black;"> </canvas>
+<script>
+"use strict";
+description();
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking texture formats.");
+
+ var numValidFormats = 0;
+ var clearColor = [0.25, 0.5, 0.75, 0.25];
+
+ var floatToBits = function(value, bits) {
+ var range = (1 << bits) - 1;
+ var result = 0;
+ if (range > 0) {
+ result = Math.floor(Math.floor(value * range) * 255 / range);
+ }
+
+ //debug("v = " + value + ", bits = " + bits + ", range = " + range + ", result = " + result);
+ return result;
+ }
+
+ var testFormat = function(info) {
+ debug("");
+ debug("testing: " + info.format + ", " + info.type);
+
+ var format = gl[info.format];
+ var type = gl[info.type];
+
+ gl.texImage2D(gl.TEXTURE_2D,
+ 0, // level
+ format, // internalFormat
+ 16, // width
+ 16, // height
+ 0, // border
+ format, // format
+ type, // type
+ null); // data
+ var fbStatus = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
+ debug(wtu.glEnumToString(gl, fbStatus));
+ if (fbStatus != gl.FRAMEBUFFER_COMPLETE) {
+ debug("format unsupported");
+ if (info.mustBeFramebufferComplete) {
+ testFailed(info.format + " must be FRAMEBUFFER_COMPLETE");
+ }
+ return;
+ }
+
+ ++numValidFormats;
+
+ var startExpected = [0, 0, 0, info.channels[3] < 0 ? 255 : 0];
+
+ var expected = [];
+ var tolerance = [];
+ for (var ii = 0; ii < 4; ++ii) {
+ var color = 0;
+ var channel = info.channels[ii];
+ if (channel < 0) {
+ color = ii < 3 ? 0 : 255
+ } else {
+ color = floatToBits(clearColor[channel], info.bits[ii]);
+ }
+ expected.push(color);
+ tolerance.push(channel < 0 ? 0 : (1 + (1 << (8 - info.bits[ii]))));
+ }
+
+ wtu.checkCanvas(gl, startExpected, "should be " + startExpected);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ wtu.checkCanvas(gl, expected, "should be " + expected + " with tolerance " + tolerance, tolerance);
+ }
+
+ var validFormats = [
+ { format: 'RGBA',
+ type: 'UNSIGNED_BYTE',
+ channels: [0, 1, 2, 3],
+ bits: [8, 8, 8, 8],
+ mustBeFramebufferComplete: true
+ },
+ { format: 'ALPHA',
+ type: 'UNSIGNED_BYTE',
+ channels: [-1, -1, -1, 3],
+ bits: [0, 0, 0, 8],
+ mustBeFramebufferComplete: false
+ },
+ { format: 'RGB',
+ type: 'UNSIGNED_BYTE',
+ channels: [0, 1, 2, -1],
+ bits: [8, 8, 8, 0],
+ mustBeFramebufferComplete: false
+ },
+ { format: 'RGB',
+ type: 'UNSIGNED_SHORT_5_6_5',
+ channels: [0, 1, 2, -1],
+ bits: [5, 6, 5, 0],
+ mustBeFramebufferComplete: false
+ },
+ { format: 'RGBA',
+ type: 'UNSIGNED_SHORT_5_5_5_1',
+ channels: [0, 1, 2, 3],
+ bits: [5, 5, 5, 1],
+ mustBeFramebufferComplete: false
+ },
+ { format: 'RGBA',
+ type: 'UNSIGNED_SHORT_4_4_4_4',
+ channels: [0, 1, 2, 3],
+ bits: [4, 4, 4, 4],
+ mustBeFramebufferComplete: false
+ },
+ { format: 'LUMINANCE',
+ type: 'UNSIGNED_BYTE',
+ channels: [0, 0, 0, -1],
+ bits: [8, 8, 8, -1],
+ mustBeFramebufferComplete: false
+ },
+ { format: 'LUMINANCE_ALPHA',
+ type: 'UNSIGNED_BYTE',
+ channels: [0, 0, 0, 3],
+ bits: [8, 8, 8, 8],
+ mustBeFramebufferComplete: false
+ }
+ ];
+
+ gl.clearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
+ var fbo = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.framebufferTexture2D(
+ gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);
+
+ for (var ii = 0; ii < validFormats.length; ++ii) {
+ var info = validFormats[ii];
+ testFormat(info);
+ }
+
+ debug("");
+ shouldBeTrue("numValidFormats > 0");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-clear.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-clear.html
new file mode 100644
index 000000000..06282aa91
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-clear.html
@@ -0,0 +1,66 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texture clear conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+
+var tex = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array([0,255,0,255]));
+wtu.clearAndDrawUnitQuad(gl);
+wtu.checkCanvas(
+ gl, [0, 255, 0, 255], "should be green");
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-complete.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-complete.html
new file mode 100644
index 000000000..d9f0767af
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-complete.html
@@ -0,0 +1,87 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL "Texture Complete" texture conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="40" height="40" style="width: 40px; height: 40px;"></canvas>
+<canvas id="canvas2d" width="16" height="16" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+function init()
+{
+ description(
+ "Checks that a texture that is not -texture-complete- does not draw if"+
+ " filtering needs mips");
+
+ var canvas2d = document.getElementById("canvas2d");
+ var ctx2d = canvas2d.getContext("2d");
+ ctx2d.fillStyle = "rgba(0,192,128,1)";
+ ctx2d.fillRect(0, 0, 16, 16);
+
+ var wtu = WebGLTestUtils;
+ var canvas = document.getElementById("example");
+ var gl = wtu.create3DContext(canvas);
+ var program = wtu.setupTexturedQuad(gl);
+
+ gl.disable(gl.DEPTH_TEST);
+ gl.disable(gl.BLEND);
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ // 16x16 texture no mips
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas2d);
+
+ var loc = gl.getUniformLocation(program, "tex");
+ gl.uniform1i(loc, 0);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0,0,0,255],
+ "texture that is not -texture-complete- when " +
+ "TEXTURE_MIN_FILTER not NEAREST or LINEAR should draw with 0,0,0,255");
+}
+
+init();
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-copying-feedback-loops.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-copying-feedback-loops.html
new file mode 100644
index 000000000..5ee7a47d1
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-copying-feedback-loops.html
@@ -0,0 +1,105 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Texture Copying Feedback Loops Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="1" height="1" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Checks that texture copying feedback loops fail correctly.");
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+var texture = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, texture);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2, 2, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+
+var texture2 = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, texture2);
+gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2, 2, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+
+var framebuffer = gl.createFramebuffer();
+gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
+gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
+assertMsg(gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE,
+ "framebuffer should be FRAMEBUFFER_COMPLETE.");
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "after setup");
+
+debug("");
+debug("testing copyTexImage2D");
+gl.bindTexture(gl.TEXTURE_2D, texture);
+gl.copyTexImage2D(gl.TEXTURE_2D, 1, gl.RGBA, 0, 0, 2, 2, 0);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "after copyTexImage2D to same texture but different level");
+gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, 2, 2, 0);
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "after copyTexImage2D to same texture same level, invalid feedback loop");
+gl.bindTexture(gl.TEXTURE_2D, texture2);
+gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, 2, 2, 0);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "after copyTexImage2D to different texture");
+
+debug("");
+debug("testing copyTexSubImage2D");
+gl.bindTexture(gl.TEXTURE_2D, texture);
+gl.copyTexSubImage2D(gl.TEXTURE_2D, 1, 0, 0, 0, 0, 1, 1);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "after copyTexSubImage2D to same texture but different level");
+gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, 1, 1);
+wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "after copyTexSubImage2D to same texture same level, invalid feedback loop");
+gl.bindTexture(gl.TEXTURE_2D, texture2);
+gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, 1, 1);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "after copyTexSubImage2D to different texture");
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-draw-with-2d-and-cube.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-draw-with-2d-and-cube.html
new file mode 100644
index 000000000..0002dce99
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-draw-with-2d-and-cube.html
@@ -0,0 +1,127 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL ActiveTexture BindTexture conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="2" height="2" style="width: 40px; height: 40px;"></canvas>
+<canvas id="canvas2d" width="1" height="1" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec3 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord;
+void main()
+{
+ gl_Position = vec4(vPosition, 1);
+ texCoord = texCoord0;
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec2 texCoord;
+uniform sampler2D tex2D;
+uniform samplerCube texCube;
+void main()
+{
+ gl_FragColor = texture2D(tex2D, texCoord);
+ gl_FragColor += textureCube(texCube, vec3(texCoord, 0));
+}
+</script>
+<script>
+"use strict";
+var gl;
+
+function init()
+{
+ description(
+ "Tests drawing with two textures of different type. " +
+ "This test covers an ANGLE validation bug. See http://crbug.com/390412.");
+
+ var canvas2d = document.getElementById("canvas2d");
+ var ctx2d = canvas2d.getContext("2d");
+
+ var wtu = WebGLTestUtils;
+ gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(
+ gl,
+ ["vshader", "fshader"],
+ ['vPosition', 'texCoord0']);
+ wtu.setupUnitQuad(gl);
+ gl.disable(gl.DEPTH_TEST);
+ gl.disable(gl.BLEND);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ var texture2D = gl.createTexture();
+ gl.activeTexture(gl.TEXTURE0);
+ gl.bindTexture(gl.TEXTURE_2D, texture2D);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ var textureCube = gl.createTexture();
+ gl.activeTexture(gl.TEXTURE1);
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, textureCube);
+ gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.texImage2D(gl.TEXTURE_CUBE_MAP_NEGATIVE_X, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_Y, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.texImage2D(gl.TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_Z, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.texImage2D(gl.TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ var texture2DLoc = gl.getUniformLocation(program, "tex2D");
+ var textureCubeLoc = gl.getUniformLocation(program, "texCube");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+
+ gl.clearColor(1,0,0,1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ gl.uniform1i(texture2DLoc, 0);
+ gl.uniform1i(textureCubeLoc, 1);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+}
+
+init();
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-fakeblack.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-fakeblack.html
new file mode 100644
index 000000000..883886a94
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-fakeblack.html
@@ -0,0 +1,119 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>Tests if fake black textures are corectly implemented on desktops</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="24" height="24"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+
+function createTexture(gl,r,g,b,a) {
+ // setup render target texture //
+
+ var texture = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, 3, 3, 0, gl.RGB, gl.UNSIGNED_BYTE, null);
+ gl.bindTexture(gl.TEXTURE_2D, null);
+
+ // setup framebuffer //
+ var fbo = gl.createFramebuffer();
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+
+ // fill the framebuffer //
+ gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+ gl.clearColor(r, g, b, a);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+ gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+
+ gl.deleteFramebuffer(fbo);
+
+ return texture;
+}
+
+function init(){
+ /*
+ * This test has been written due to a bug found in firefox's code
+ * and fixed in the following patch :
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=879952#c5
+ */
+ var wtu = WebGLTestUtils;
+ description();
+
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupTexturedQuad(gl);
+
+ var texture0 = createTexture(gl,1,0,0,1);
+ var texture1 = createTexture(gl,0,1,0,1);
+
+ gl.bindTexture(gl.TEXTURE_2D, texture0);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.checkCanvas(gl, [255, 0, 0, 255]);
+
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.checkCanvas(gl, [0, 0, 0, 255]);
+
+ gl.bindTexture(gl.TEXTURE_2D, texture1);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.checkCanvas(gl, [0, 255, 0, 255]);
+
+ gl.bindTexture(gl.TEXTURE_2D, texture0);
+ gl.drawArrays(gl.TRIANGLES, 0, 6);
+ wtu.checkCanvas(gl, [0, 0, 0, 255]);
+
+
+}
+
+init();
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-formats-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-formats-test.html
new file mode 100644
index 000000000..80adad6c6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-formats-test.html
@@ -0,0 +1,292 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Texture Format Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas2d" width="2" height="2" style="width: 50px; height: 50px; border: 1px solid black;"></canvas>
+<canvas id="canvas" width="2" height="2" style="width: 100px; height:100px; border: 1px solid black;"> </canvas>
+<script>
+"use strict";
+description("This test ensures WebGL implementations allow the OpenGL ES 2.0 texture formats and do not allow DesktopGL texture formats.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+ debug("Checking texture formats.");
+
+ var createTexture = function(internalFormat, format, opt_border) {
+ var border = (opt_border === undefined) ? 0 : opt_border;
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D,
+ 0, // level
+ internalFormat, // internalFormat
+ 16, // width
+ 16, // height
+ border, // border
+ format, // format
+ gl.UNSIGNED_BYTE, // type
+ null); // data
+ }
+
+ var testValidFormat = function(internalFormat, formatName) {
+ createTexture(internalFormat, internalFormat);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "was able to create texture of " + formatName);
+ }
+
+ var testInvalidFormat = function(internalFormat, formatName) {
+ createTexture(internalFormat, internalFormat);
+ var err = gl.getError();
+ if (err == gl.NO_ERROR) {
+ testFailed("should NOT be able to create texture of type " + formatName);
+ } else if (err == gl.INVALID_OPERATION) {
+ testFailed("should return gl.INVALID_ENUM for type " + formatName);
+ } else if (err == gl.INVALID_ENUM) {
+ testPassed("not able to create invalid format: " + formatName);
+ }
+ }
+
+ var invalidEnums = [
+ '1',
+ '2',
+ '3',
+ '4',
+ 'RGB4',
+ 'RGB5',
+ 'RGB8',
+ 'RGB10',
+ 'RGB12',
+ 'RGB16',
+ 'RGBA2',
+ 'RGBA4',
+ 'RGB5_A1',
+ 'RGBA8',
+ 'RGB10_A2',
+ 'RGBA12',
+ 'RGBA16',
+ 'BGR',
+ 'BGRA',
+ 'ALPHA4_EXT',
+ 'ALPHA8_EXT',
+ 'ALPHA12_EXT',
+ 'ALPHA16_EXT',
+ 'COMPRESSED_ALPHA',
+ 'COMPRESSED_LUMINANCE',
+ 'COMPRESSED_LUMINANCE_ALPHA',
+ 'COMPRESSED_INTENSITY',
+ 'COMPRESSED_RGB',
+ 'COMPRESSED_RGBA',
+ 'DEPTH_COMPONENT16',
+ 'DEPTH_COMPONENT24',
+ 'DEPTH_COMPONENT32',
+ 'LUMINANCE4_EXT',
+ 'LUMINANCE8_EXT',
+ 'LUMINANCE12_EXT',
+ 'LUMINANCE16_EXT',
+ 'LUMINANCE4_ALPHA4_EXT',
+ 'LUMINANCE6_ALPHA2_EXT',
+ 'LUMINANCE8_ALPHA8_EXT',
+ 'LUMINANCE12_ALPHA4_EXT',
+ 'LUMINANCE12_ALPHA12_EXT',
+ 'LUMINANCE16_ALPHA16_EXT',
+ 'INTENSITY_EXT',
+ 'INTENSITY4_EXT',
+ 'INTENSITY8_EXT',
+ 'INTENSITY12_EXT',
+ 'INTENSITY16_EXT',
+ 'RGB4_EXT',
+ 'RGB5_EXT',
+ 'RGB8_EXT',
+ 'RGB10_EXT',
+ 'RGB12_EXT',
+ 'RGB16_EXT',
+ 'RGBA2_EXT',
+ 'RGBA4_EXT',
+ 'RGB5_A1_EXT',
+ 'RGBA8_EXT',
+ 'RGB10_A2_EXT',
+ 'RGBA12_EXT',
+ 'RGBA16_EXT',
+ 'SLUMINANCE_EXT',
+ 'SLUMINANCE8_EXT',
+ 'SLUMINANCE_ALPHA_EXT',
+ 'SLUMINANCE8_ALPHA8_EXT',
+ 'SRGB_EXT',
+ 'SRGB8_EXT',
+ 'SRGB_ALPHA_EXT',
+ 'SRGB8_ALPHA8'
+ ];
+
+ for (var ii = 0; ii < invalidEnums.length; ++ii) {
+ var formatName = invalidEnums[ii]
+ if (desktopGL[formatName] === undefined) {
+ debug("bad format" + formatName)
+ } else {
+ testInvalidFormat(desktopGL[formatName], "GL_" + formatName);
+ }
+ }
+
+ var validEnums = [
+ 'ALPHA',
+ 'RGB',
+ 'RGBA',
+ 'LUMINANCE',
+ 'LUMINANCE_ALPHA'
+ ];
+
+ for (var ii = 0; ii < validEnums.length; ++ii) {
+ var formatName = validEnums[ii]
+ testValidFormat(gl[formatName], "gl." + formatName);
+ }
+
+ debug("");
+ debug("checking non 0 border parameter to gl.TexImage2D");
+ createTexture(gl['RGBA'], gl['RGBA'], 1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE,
+ "non 0 border to gl.TexImage2D should return INVALID_VALUE");
+
+
+ var checkTypes = function() {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+
+ var loc = gl.getUniformLocation(program, "tex");
+ gl.uniform1i(loc, 0);
+
+ var checkType = function(r, g, b, a, type, format, buf) {
+ var typeName = wtu.glEnumToString(gl, type);
+ var formatName = wtu.glEnumToString(gl, format);
+ var desc = "format: " + formatName + ", type: " + typeName;
+ debug("");
+ debug("checking gl.texImage2D with " + desc);
+ gl.texImage2D(gl.TEXTURE_2D,
+ 0, // level
+ format, // internalFormat
+ 2, // width
+ 2, // height
+ 0, // border
+ format, // format
+ type, // type
+ buf); // data
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "gl.texImage2D with " + desc + " should generate NO_ERROR");
+
+ wtu.clearAndDrawUnitQuad(gl, [255, 0, 0, 255]);
+ wtu.checkCanvas(gl, [r,g,b,a],
+ "texture " + desc + " should draw with " +
+ r + ", " + g + ", " + b + ", " + a);
+
+ }
+ checkType(
+ 0, 255, 0, 255, gl.UNSIGNED_BYTE, gl.RGBA,
+ new Uint8Array(
+ [ 0, 255, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255,
+ 0, 255, 0, 255]));
+ checkType(
+ 0, 0, 255, 255, gl.UNSIGNED_SHORT_4_4_4_4, gl.RGBA,
+ new Uint16Array(
+ [ 255, 255,
+ 255, 255,
+ 255, 255,
+ 255, 255]));
+ checkType(
+ 0, 255, 0, 255, gl.UNSIGNED_SHORT_5_6_5, gl.RGB,
+ new Uint16Array(
+ [ 2016, 2016,
+ 2016, 2016,
+ 2016, 2016,
+ 2016, 2016]));
+ checkType(
+ 0, 0, 255, 255, gl.UNSIGNED_SHORT_5_5_5_1, gl.RGBA,
+ new Uint16Array(
+ [ 63, 63,
+ 63, 63,
+ 63, 63,
+ 63, 63]));
+ checkType(
+ 255, 255, 255, 255, gl.UNSIGNED_BYTE, gl.LUMINANCE,
+ new Uint8Array([
+ 255,
+ 255,
+ 255,
+ 255]));
+ checkType(
+ 0, 0, 0, 128, gl.UNSIGNED_BYTE, gl.ALPHA,
+ new Uint8Array([
+ 128,
+ 128,
+ 128,
+ 128]));
+ checkType(
+ 128, 128, 128, 192, gl.UNSIGNED_BYTE, gl.LUMINANCE_ALPHA,
+ new Uint8Array([
+ 128, 192,
+ 128, 192,
+ 128, 192,
+ 128, 192]));
+ }
+ var program = wtu.setupTexturedQuad(gl);
+ gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);
+ checkTypes();
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-hd-dpi.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-hd-dpi.html
new file mode 100644
index 000000000..9fe480bef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-hd-dpi.html
@@ -0,0 +1,141 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL HD-DPI issues texture conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description();
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+function fillInMips(gl, size) {
+ // fill in the mips
+ var level = 1;
+ for (;;) {
+ size /= 2;
+ if (size < 1) {
+ break;
+ }
+ var numBytes = size * size * 4;
+ var pixels = new Uint8Array(numBytes);
+ for (var jj = 0; jj < numBytes; jj += 4) {
+ pixels[jj + 0] = 0;
+ pixels[jj + 1] = 255;
+ pixels[jj + 2] = 0;
+ pixels[jj + 3] = 255;
+ }
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, size, size, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
+ }
+}
+
+function testCanvas(size) {
+ debug("");
+ debug("testing 2D canvas size " + size + ", " + size);
+
+ var canvas = document.createElement("canvas");
+ canvas.width = size;
+ canvas.height = size;
+ var ctx = canvas.getContext("2d");
+ ctx.fillStyle = "rgb(0,255,0)";
+ ctx.fillRect(0, 0, size, size);
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas);
+
+ fillInMips(gl, size);
+
+ // Draw. If this an HD-DPI device and the 2d canvas is double res or larger
+ // the implementation must scale to CSS pixels (ie, canvas.width, canvas.height)(
+ // when doing the copy in texImage2D. If it has not scaled and instead done
+ // a direct copy of the larger texture this test will not have created enough mips
+ // and will therefore not be "texture complete" and will render in black.
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+}
+
+function testWebGL(size) {
+ debug("");
+ debug("testing WebGL canvas size " + size + ", " + size);
+
+ var canvas = document.createElement("canvas");
+ canvas.width = size;
+ canvas.height = size;
+ var gl2 = wtu.create3DContext(canvas);
+ gl2.clearColor(0,1,0,1);
+ gl2.clear(gl.COLOR_BUFFER_BIT);
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas);
+
+ fillInMips(gl, size);
+
+ // Draw. If this an HD-DPI device check for 2 possible bugs.
+ //
+ // 1) the WebGL canvas is double res or larger. That's just a bug period and
+ // is checked for in another test but would also fail here.
+ //
+ // 2) the WebGL canvas is single res but the code the scales a double res
+ // 2d canvas also mistakenly scales a single res WebGL canvas.
+ //
+ // If it has been scaled then we'll have the wrong kind of mips chain here.
+ // Level 0 will be half resolution. Level 1 will be the same resolution
+ // and will therefore not be "texture complete" and will render in black.
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+}
+
+testCanvas(4);
+testCanvas(512);
+testWebGL(4);
+testWebGL(512);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors");
+
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-mips.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-mips.html
new file mode 100644
index 000000000..d435f90e0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-mips.html
@@ -0,0 +1,320 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texture mips conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="2" height="2" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+uniform vec4 uMult;
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord;
+void main()
+{
+ gl_Position = vPosition * uMult;
+ texCoord = texCoord0;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform sampler2D tex;
+varying vec2 texCoord;
+void main()
+{
+ gl_FragColor = texture2D(tex, texCoord);
+}
+</script>
+<script>
+"use strict";
+var canvas;
+var wtu = WebGLTestUtils;
+function init()
+{
+ description("Checks mip issues");
+
+ canvas = document.getElementById("example");
+ shouldBe("canvas.width", "2");
+ shouldBe("canvas.height", "2");
+
+ var gl = wtu.create3DContext(canvas);
+
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ gl.generateMipmap(gl.TEXTURE_2D);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "for generateMipmap with mip 0 is 0x0");
+ gl.texImage2D(
+ gl.TEXTURE_2D, 1, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array(4));
+ gl.generateMipmap(gl.TEXTURE_2D);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "for generateMipmap with mip 0 is 0x0");
+
+ tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, tex);
+ gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "for generateMipmap with mip 0 is 0x0");
+
+ var faces = [
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+ ];
+ for (var ii = 0; ii < faces.length; ++ii) {
+ gl.texImage2D(
+ faces[ii], 0, gl.RGBA, 2, 2, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ new Uint8Array(4 * 2 * 2));
+ gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
+ wtu.glErrorShouldBe(gl, ii == 5 ? gl.NO_ERROR : gl.INVALID_OPERATION, "for generateMipmap with " + (ii + 1) + " faces");
+ }
+
+ wtu.setupUnitQuad(gl, 0, 1);
+ var program = wtu.setupProgram(
+ gl, ['vshader', 'fshader'], ['vPosition', 'texCoord0'], [0, 1]);
+
+ gl.disable(gl.DEPTH_TEST);
+ gl.disable(gl.BLEND);
+
+ var colors = {
+ blue: [0, 0, 255, 255],
+ red: [255, 0, 0, 255],
+ green: [0, 255, 0, 255],
+ cyan: [128, 255, 255, 255],
+ black: [0, 0, 0, 255],
+ blank: [0, 0, 0, 0]
+ };
+
+ var mips = [
+ ];
+
+ var texLoc = gl.getUniformLocation(program, "tex");
+ gl.uniform1i(texLoc, 0);
+ var multLoc = gl.getUniformLocation(program, "uMult");
+
+ // ----------------------------------------------------
+ var clearTex = createTexture();
+ gl.uniform4f(multLoc, 1, 1, 1, 1);
+ gl.bindTexture(gl.TEXTURE_2D, clearTex);
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 16, 16, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+ debug('gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 16, 16, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);');
+ setMipData(0, 16, 'blank');
+ makeDivMipChain();
+ generateMipmap();
+ check('blank', "texture created with null that has all mips");
+
+ // ----------------------------------------------------
+ var tex = createTexture();
+ gl.uniform4f(multLoc, 1, 1, 1, 1);
+
+ gl.bindTexture(gl.TEXTURE_2D, tex);
+ // 16x16 texture no mips
+ fillLevel(tex, 0, 16, 'cyan');
+
+ check('black',
+ "texture that is missing mips when TEXTURE_MIN_FILTER not NEAREST or LINEAR");
+
+ generateMipmap();
+
+ check('cyan', "texture that has all mips");
+
+ // Fill in the bottom 2 mips with a different color.
+ fillLevel(tex, 4, 1, 'green');
+ fillLevel(tex, 3, 2, 'green');
+
+ // Choose the nearest mip
+ texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_NEAREST);
+
+ check('green', "texture that is only using the smallest 2 mips");
+
+ gl.uniform4f(multLoc, 16, 16, 1, 1);
+
+ check('cyan', "texture that is using only the largest 2 mips");
+
+ // Set the top level
+ fillLevel(tex, 0, 1, 'red');
+ check('red',
+ "texture that is only using the top level even though other levels are defined");
+
+ // Set the top 2 levels using generateMipmap
+ fillLevel(tex, 0, 2, 'blue');
+ generateMipmap();
+
+ check('blue',
+ "texture that is only using the top 2 levels even though other levels are defined");
+
+ // Set the top 2 levels back to sizes that end up using levels 2, 3, and 4 again.
+ fillLevel(tex, 0, 16, 'blue');
+ fillLevel(tex, 1, 8, 'blue');
+ check('blue', "texture that is only using the largest 2 mips");
+ gl.uniform4f(multLoc, 1, 1, 1, 1);
+ check('green', "texture that is only using the smallest 2 mips");
+
+ // ----------------------------------------------------
+ var tex = createTexture();
+ gl.uniform4f(multLoc, 1, 1, 1, 1);
+ fillLevel(tex, 0, 8, 'cyan');
+ generateMipmap();
+ check('cyan', "texture that has 3 mips");
+
+ fillLevel(tex, 0, 16, 'blue');
+ texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ check('blue', "texture that is only using top mips");
+
+ fillLevel(tex, 0, 8, 'red');
+ texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_NEAREST);
+ check('cyan', "texture that is only using smallest mips");
+
+ gl.uniform4f(multLoc, 16, 16, 1, 1);
+ check('red', "texture that is using only the largest mip");
+
+ // ----------------------------------------------------
+ var tex = createTexture();
+ gl.uniform4f(multLoc, 1, 1, 1, 1);
+ fillLevel(tex, 2, 1, 'green');
+ fillLevel(tex, 1, 2, 'green');
+ fillLevel(tex, 0, 4, 'green');
+ check('green', "texture that was built smallest mip first");
+
+ // ----------------------------------------------------
+ var tex = createTexture();
+ gl.uniform4f(multLoc, 1, 1, 1, 1);
+ fillLevel(tex, 0, 16, 'red');
+ generateMipmap();
+ check('red', "texture with 1 genmipmaps");
+ fillLevel(tex, 0, 16, 'blue');
+ generateMipmap();
+ fillLevel(tex, 0, 16, 'green');
+ generateMipmap();
+ check('green', "texture with 2 genmipmaps");
+
+ // ----------------------------------------------------
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+
+ function createTexture() {
+ debug("<hr/>gl.createTexture()");
+ mips = [];
+ makeDivMipChain();
+ return gl.createTexture();
+ }
+
+ function texParameteri(target, pname, value) {
+ debug("gl.texParameteri(" +
+ wtu.glEnumToString(gl, target) + ", " +
+ wtu.glEnumToString(gl, pname) + ", " +
+ wtu.glEnumToString(gl, value) + ")")
+ gl.texParameteri(target, pname, value);
+ }
+
+ function generateMipmap() {
+ debug("gl.generateMipmap(gl.TEXTURE_2D)");
+ gl.generateMipmap(gl.TEXTURE_2D);
+ var mip0 = mips[0];
+ var size = mip0.size;
+ var level = 1;
+ for(;;) {
+ size = Math.floor(size / 2);
+ if (!size) {
+ break;
+ }
+ setMipData(level, size, mip0.color);
+ ++level;
+ }
+ makeDivMipChain();
+ }
+
+ function check(color, msg) {
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, colors[color], msg + " should draw with " + color);
+ }
+
+ function fillLevel(tex, level, size, color) {
+ setMipData(level, size, color);
+ debug("gl.texImage2D(gl.TEXTURE_2D, " + level + ", gl.RGBA, " + size + ", " + size +
+ ", 0, gl.RGBA, gl.UNSIGNED_BYTE, " + color + ");");
+ wtu.fillTexture(gl, tex, size, size, colors[color], level);
+ makeDivMipChain();
+ }
+
+ function setMipData(level, size, color) {
+ mips[level] = {
+ size: size,
+ color: color
+ };
+ }
+
+ function makeDivMipChain(color) {
+ var html = [
+ '<div style="height: 68px; margin-top: 5px">',
+ '<div style="float:left;">mips: </div>'];
+ for (var ii = 0; ii < 5; ++ii) {
+ var mip = mips[ii];
+ if (mip) {
+ html.push(makeDivSquare(mip.size, mip.color));
+ } else {
+ html.push(makeDivSquare(16, undefined));
+ }
+ }
+ html.push("</div>");
+ debug(html.join(""));
+ }
+
+ function makeDivSquare(size, color) {
+ size *= 4;
+ var c = color ? colors[color] : [255,255,255];
+ var border = color ? 'solid' : 'dashed';
+ return '<div style="float:left; width: ' + size + 'px; height: ' + size +
+ 'px; background-color: ' + rgb(c) +
+ '; border: 1px ' + border + ' black; margin-right: 3px;"></div>';
+ }
+
+ function rgb(c) {
+ return 'rgb(' + c[0] + ',' + c[1] + ',' + c[2] +')';
+ }
+}
+
+init();
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-npot-video.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-npot-video.html
new file mode 100644
index 000000000..87973b63c
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-npot-video.html
@@ -0,0 +1,163 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var gl = null;
+var textureLoc = null;
+var successfullyParsed = false;
+
+initTestingHarness();
+
+function init()
+{
+ description('Verify npot video');
+
+ var canvas = document.getElementById("example");
+ gl = wtu.create3DContext(canvas);
+ var program = wtu.setupTexturedQuad(gl);
+
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ // Disable any writes to the alpha channel
+ gl.colorMask(1, 1, 1, 0);
+
+ textureLoc = gl.getUniformLocation(program, "tex");
+
+ var video = document.getElementById("vid");
+ wtu.startPlayingAndWaitForVideo(video, runTest);
+}
+
+function runOneIteration(videoElement, useTexSubImage2D, flipY, topColor, bottomColor, badMinFilter, badClamp, genMips)
+{
+ debug('Testing ' + (useTexSubImage2D ? 'texSubImage2D' : 'texImage2D') +
+ ' with flipY=' + flipY);
+ var texture = gl.createTexture();
+ // Bind the texture to texture unit 0
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ // Set up pixel store parameters
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);
+ // Upload the videoElement into the texture
+ debug("size: " + videoElement.videoWidth + "x" + videoElement.videoHeight);
+ if (useTexSubImage2D) {
+ // Initialize the texture to black first
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,
+ videoElement.videoWidth, videoElement.videoHeight, 0,
+ gl.RGBA, gl.UNSIGNED_BYTE, null);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, videoElement);
+ } else {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, videoElement);
+ }
+
+ // Set up texture parameters
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ if (badMinFilter) {
+ debug("bad min filter");
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_NEAREST);
+ } else {
+ debug("good min filter");
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ }
+ if (badClamp) {
+ debug("bad clamp");
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
+ } else {
+ debug("good clamp");
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ }
+ if (genMips) {
+ debug("generate mips");
+ gl.generateMipmap(gl.TEXTURE_2D);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "should be INVALID_OPERATION");
+ }
+
+// var c = document.createElement("canvas");
+// c.width = 16;
+// c.height = 16;
+// c.style.border = "1px solid black";
+// var ctx = c.getContext("2d");
+// ctx.drawImage(videoElement, 0, 0, 16, 16);
+// document.body.appendChild(c);
+
+ // Point the uniform sampler to texture unit 0
+ gl.uniform1i(textureLoc, 0);
+ // Draw the triangles
+ wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
+ // Check a few pixels near the top and bottom and make sure they have
+ // the right color.
+ var tolerance = 5;
+ debug("Checking lower left corner");
+ wtu.checkCanvasRect(gl, 4, 4, 2, 2, bottomColor,
+ "shouldBe " + bottomColor, tolerance);
+ debug("Checking upper left corner");
+ wtu.checkCanvasRect(gl, 4, gl.canvas.height - 8, 2, 2, topColor,
+ "shouldBe " + topColor, tolerance);
+ debug("");
+}
+
+function runTest(videoElement)
+{
+ var red = [255, 0, 0];
+ var green = [0, 255, 0];
+ var black = [0, 0, 0];
+ runOneIteration(videoElement, false, true, black, black, true, true, true);
+ runOneIteration(videoElement, false, true, black, black, true, false, false);
+ runOneIteration(videoElement, false, true, black, black, false, true, false);
+ runOneIteration(videoElement, false, true, black, black, true, true, false);
+ runOneIteration(videoElement, false, true, green, red, false, false, false);
+ runOneIteration(videoElement, false, false, red, green, false, false, false);
+ runOneIteration(videoElement, true, true, green, red, false, false, false);
+ runOneIteration(videoElement, true, false, red, green, false, false, false);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+ finishTest();
+}
+</script>
+</head>
+<body onload="init()">
+<canvas id="example" width="64" height="48"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<video id="vid" style="display:none;">
+ <source src="../resources/npot-video.mp4" type='video/mp4; codecs="avc1.42E01E"' />
+ <source src="../resources/npot-video.webmvp8.webm" type='video/webm; codecs="vp8"' />
+ <source src="../resources/npot-video.theora.ogv" type='video/ogg; codecs="theora"' />
+</video>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-npot.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-npot.html
new file mode 100644
index 000000000..c19d1bbde
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-npot.html
@@ -0,0 +1,329 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Non-Power of 2 texture conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec2 texCoord0;
+varying vec2 texCoord;
+void main()
+{
+ gl_Position = vPosition;
+ texCoord = texCoord0;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform samplerCube tex;
+varying vec2 texCoord;
+void main()
+{
+ gl_FragColor = textureCube(tex, normalize(vec3(texCoord, 1)));
+}
+</script>
+<script>
+"use strict";
+description(document.title);
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupTexturedQuad(gl);
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+
+var tests = [
+ { format: gl.RGBA,
+ type: gl.UNSIGNED_BYTE,
+ color: [192, 0, 128, 64],
+ expected: [192, 0, 128, 64],
+ tolerance: 0,
+ },
+ { format: gl.RGB,
+ type: gl.UNSIGNED_BYTE,
+ color: [192, 0, 128],
+ expected: [192, 0, 128, 255],
+ tolerance: 0,
+ },
+ { format: gl.LUMINANCE,
+ type: gl.UNSIGNED_BYTE,
+ color: [192],
+ expected: [192, 192, 192, 255],
+ tolerance: 0,
+ },
+ { format: gl.ALPHA,
+ type: gl.UNSIGNED_BYTE,
+ color: [64],
+ expected: [0, 0, 0, 64],
+ tolerance: 0,
+ },
+ { format: gl.LUMINANCE_ALPHA,
+ type: gl.UNSIGNED_BYTE,
+ color: [192, 64],
+ expected: [192, 192, 192, 64],
+ tolerance: 0,
+ },
+ // { format: gl.RGBA,
+ // type: gl.UNSIGNED_SHORT_4_4_4_4,
+ // color: [0x48FC],
+ // expected: [0x44, 0x88, 0xFF, 0xCC],
+ // tolerance: 16,
+ // },
+ // { format: gl.RGBA,
+ // type: gl.UNSIGNED_SHORT_5_5_5_1,
+ // color: [0x8309], // 10000 01000 00100 1
+ // expected: [128, 64, 32, 255],
+ // tolerance: 16,
+ // },
+ // { format: gl.RGB,
+ // type: gl.UNSIGNED_SHORT_5_6_5,
+ // color: [0x8404], // 10000 010000 00100
+ // expected: [128, 64, 32],
+ // tolerance: 16,
+ // },
+];
+
+tests.forEach(function(test) {
+ debug("");
+ debug("test " + wtu.glEnumToString(gl, test.format) + "/" + wtu.glEnumToString(gl, test.type));
+ var tex = gl.createTexture();
+
+ // Check that an NPOT texture not on level 0 generates INVALID_VALUE
+ wtu.fillTexture(gl, tex, 5, 3, test.color, 1, test.format, test.type);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE,
+ "gl.texImage2D with NPOT texture with level > 0 should return INVALID_VALUE");
+
+ // Check that an NPOT texture on level 0 succeeds
+ wtu.fillTexture(gl, tex, 5, 3, test.color, 0, test.format, test.type);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "gl.texImage2D with NPOT texture at level 0 should succeed");
+
+ // Check that generateMipmap fails on NPOT
+ gl.generateMipmap(gl.TEXTURE_2D);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "gl.generateMipmap with NPOT texture should return INVALID_OPERATION");
+
+ // Check that nothing is drawn if filtering is not correct for NPOT
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, [0, 0, 0, 255],
+ "NPOT texture with TEXTURE_WRAP set to REPEAT should draw with 0,0,0,255");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST_MIPMAP_LINEAR);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, [0, 0, 0, 255],
+ "NPOT texture with TEXTURE_MIN_FILTER not NEAREST or LINEAR should draw with 0,0,0,255");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, test.expected,
+ "NPOT texture with TEXTURE_MIN_FILTER set to LINEAR should draw.");
+
+ gl.copyTexImage2D(gl.TEXTURE_2D, 1, test.format, 0, 0, 5, 3, 0);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE,
+ "copyTexImage2D with NPOT texture with level > 0 should return INVALID_VALUE.");
+
+ // Check that generateMipmap for an POT texture succeeds
+ wtu.fillTexture(gl, tex, 4, 4, test.color, 0, test.format);
+ gl.generateMipmap(gl.TEXTURE_2D);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "gl.texImage2D and gl.generateMipmap with POT texture at level 0 should succeed");
+
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, test.expected,
+ "POT texture with TEXTURE_MIN_FILTER set to LINEAR_MIPMAP_LINEAR should draw.");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+});
+
+var testCubemap = function(switchTextureUnitBeforeDraw) {
+ debug("");
+ var title = "check using cubemap";
+ if (switchTextureUnitBeforeDraw) {
+ title += " and switch texture unit before draw to check for Chromium bug";
+ }
+ debug(title);
+ var program = wtu.setupProgram(
+ gl, ['vshader', 'fshader'], ['vPosition', 'texCoord0'], [0, 1]);
+ var tex = gl.createTexture();
+
+ // Check that an NPOT texture not on level 0 generates INVALID_VALUE
+ fillCubeTexture(gl, tex, 5, 3, [0, 192, 128, 255], 1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE,
+ "gl.texImage2D with NPOT texture with level > 0 should return INVALID_VALUE");
+
+ // Check that an NPOT texture on level 0 succeeds
+ fillCubeTexture(gl, tex, 5, 5, [0, 192, 128, 255]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "gl.texImage2D with NPOT texture at level 0 should succeed");
+
+ // Check that generateMipmap fails on NPOT
+ gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "gl.generateMipmap with NPOT texture should return INVALID_OPERATION");
+
+ var loc = gl.getUniformLocation(program, "tex");
+ gl.uniform1i(loc, 0);
+
+ // Check that nothing is drawn if filtering is not correct for NPOT
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.REPEAT);
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.REPEAT);
+
+ if (switchTextureUnitBeforeDraw) {
+ debug("Switching active texture unit to gl.TEXTURE1");
+ // Test for http://crbug.com/390514
+ gl.activeTexture(gl.TEXTURE1);
+ }
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, [0, 0, 0, 255],
+ "NPOT cubemap with TEXTURE_WRAP set to REPEAT should draw with 0,0,0,255");
+
+ if (switchTextureUnitBeforeDraw) {
+ var error = gl.getError();
+ if (error === gl.NO_ERROR) {
+ testPassed("getError was expected value: NO_ERROR : Should be no errors from draw.");
+ } else if (error === gl.INVALID_ENUM) {
+ testFailed("getError returned INVALID_ENUM. Possibly Chromium bug where texture unit is set to 0 instead of GL_TEXTURE0.");
+ } else {
+ testFailed("Drawing resulted in error: " + wtu.glEnumToString(gl, error));
+ }
+ gl.activeTexture(gl.TEXTURE0);
+ } else {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from draw.");
+ }
+
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, gl.NEAREST_MIPMAP_LINEAR);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, [0, 0, 0, 255],
+ "NPOT cubemap with TEXTURE_MIN_FILTER not NEAREST or LINEAR should draw with 0,0,0,255");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, [0, 192, 128, 255],
+ "NPOT cubemap with TEXTURE_MIN_FILTER set to LINEAR should draw.");
+
+ // Check that an POT texture on level 0 succeeds
+ fillCubeTexture(gl, tex, 4, 4, [0, 192, 128, 255]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "gl.texImage2D with POT texture at level 0 should succeed");
+
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_S, gl.REPEAT);
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_WRAP_T, gl.REPEAT);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, [0, 0, 0, 255],
+ "POT cubemap with TEXTURE_MIN_FILTER set to LINEAR_MIPMAP_LINEAR but no mips draw with 0,0,0,255");
+
+ // Check that generateMipmap succeeds on POT
+ gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "gl.generateMipmap with POT texture should return succeed");
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, [0, 192, 128, 255],
+ "POT cubemap with TEXTURE_MIN_FILTER set to LINEAR_MIPMAP_LINEAR should draw.");
+};
+
+testCubemap(false);
+testCubemap(true);
+
+var successfullyParsed = true;
+
+function fillCubeTexture(gl, tex, width, height, color, opt_level) {
+ opt_level = opt_level || 0;
+ var canvas = document.createElement('canvas');
+ canvas.width = width;
+ canvas.height = height;
+ var ctx2d = canvas.getContext('2d');
+ ctx2d.fillStyle = "rgba(" + color[0] + "," + color[1] + "," + color[2] + "," + color[3] + ")";
+ ctx2d.fillRect(0, 0, width, height);
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, tex);
+ var targets = [
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z];
+ for (var tt = 0; tt < targets.length; ++tt) {
+ gl.texImage2D(
+ targets[tt], opt_level, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas);
+ }
+};
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-cube-maps.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-cube-maps.html
new file mode 100644
index 000000000..c04d571c4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-cube-maps.html
@@ -0,0 +1,356 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texture size cube map conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="256" height="256" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+uniform mat4 rotation;
+varying vec3 texCoord;
+void main()
+{
+ gl_Position = vPosition;
+ vec4 direction = vec4(vPosition.x * 0.5, vPosition.y * 0.5, 1, 1);
+ texCoord = normalize((rotation * direction).xyz);
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform samplerCube tex;
+varying vec3 texCoord;
+void main()
+{
+ gl_FragColor = textureCube(tex, normalize(texCoord));
+}
+</script>
+<script>
+"use strict";
+var canvas;
+description("Checks issues with size of cube map textures");
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+
+var gl = wtu.create3DContext(canvas);
+wtu.setupUnitQuad(gl, 0, 1);
+var program = wtu.setupProgram(
+ gl,
+ ['vshader', 'fshader'],
+ ['vPosition', 'texCoord0'], [0, 1]);
+var rotLoc = gl.getUniformLocation(program, "rotation");
+
+gl.disable(gl.DEPTH_TEST);
+gl.disable(gl.BLEND);
+
+var maxSize = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);
+debug("max cube map size: " + maxSize);
+maxSize = Math.min(512, maxSize);
+
+// a cube map of 512x512 takes 6meg. I'm assuming it's not
+// unreasonable to expect to be able to allocate a 6meg texture
+
+var colors = [
+ {name: 'red', color: [255, 0, 0, 255]},
+ {name: 'green', color: [ 0, 255, 0, 255]},
+ {name: 'blue', color: [ 0, 0, 255, 255]},
+ {name: 'yellow', color: [255, 255, 0, 255]},
+ {name: 'cyan', color: [ 0, 255, 255, 255]},
+ {name: 'magenta', color: [255, 0, 255, 255]}
+];
+
+var targets = [
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z];
+
+var rotations = [
+ {axis: [0, 1, 0], angle: Math.PI / 2},
+ {axis: [0, 1, 0], angle: -Math.PI / 2},
+ {axis: [1, 0, 0], angle: -Math.PI / 2},
+ {axis: [1, 0, 0], angle: Math.PI / 2},
+ {axis: [0, 1, 0], angle: 0},
+ {axis: [0, 1, 0], angle: Math.PI},
+];
+
+var halfRotations = [
+ {colors: [3, 4], rotations: [{axis: [1, 0, 0], angle: Math.PI / 4}]},
+ {colors: [4, 2], rotations: [{axis: [1, 0, 0], angle: -Math.PI / 4}]},
+ {colors: [5, 3], rotations: [{axis: [1, 0, 0], angle: Math.PI / 4 * 3}]},
+ {colors: [2, 5], rotations: [{axis: [1, 0, 0], angle: -Math.PI / 4 * 3}]},
+ {colors: [3, 0], rotations: [{axis: [0, 1, 0], angle: Math.PI / 2},
+ {axis: [1, 0, 0], angle: Math.PI / 4}]},
+ {colors: [0, 2], rotations: [{axis: [0, 1, 0], angle: Math.PI / 2},
+ {axis: [1, 0, 0], angle: -Math.PI / 4}]},
+];
+
+var count = 0;
+var sizeCount = 0;
+
+test();
+
+function test() {
+ var size = Math.pow(2, sizeCount);
+ if (size > maxSize || !testSize(size)) {
+ finishTest();
+ } else {
+ ++sizeCount;
+ setTimeout(test, 0);
+ }
+}
+
+function testSize(size) {
+ debug("");
+ debug("testing size: " + size);
+ var canvasSize = Math.max(size / 4, 2);
+ canvas.width = canvasSize;
+ canvas.height = canvasSize;
+ gl.viewport(0, 0, canvasSize, canvasSize);
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, tex);
+
+ // Seems like I should be using LINEAR here with some other math
+ // to make sure I get more mip coverage but that's easier said
+ // than done.
+
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+
+ for (var jj = 0; jj < 2; ++jj) {
+ for (var tt = 0; tt < targets.length; ++tt) {
+ var color = colors[(tt + count) % colors.length];
+ fillLevel(targets[tt], 0, size, color.color);
+ }
+ if (jj == 1) {
+ debug("use mipmap");
+ gl.texParameteri(
+ gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER,
+ gl.NEAREST_MIPMAP_NEAREST);
+ gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
+ }
+
+ var err = gl.getError();
+ if (err == gl.OUT_OF_MEMORY) {
+ debug("out of memory");
+ return false;
+ }
+ if (err != gl.NO_ERROR) {
+ testFailed("unexpected gl error: " + wtu.glEnumToString(gl, err));
+ }
+
+
+ for (var rr = 0; rr < rotations.length; ++rr) {
+ var rot = rotations[rr];
+ var color = colors[(rr + count) % colors.length];
+ var rotMat = axisRotation(rot.axis, rot.angle);
+ gl.uniformMatrix4fv(rotLoc, false, rotMat);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, color.color,
+ wtu.glEnumToString(gl, targets[rr]) + " should be " + color.name);
+ }
+
+ for (var rr = 0; rr < halfRotations.length; ++rr) {
+ var h = halfRotations[rr];
+ var rots = h.rotations;
+ var rotMat = axisRotation(rots[0].axis, rots[0].angle);
+ for (var ii = 1; ii < rots.length; ++ii) {
+ var tmpMat = axisRotation(rots[ii].axis, rots[ii].angle);
+ var rotMat = mulMatrix(tmpMat, rotMat);
+ }
+ gl.uniformMatrix4fv(rotLoc, false, rotMat);
+ wtu.clearAndDrawUnitQuad(gl);
+
+ for (var ii = 0; ii < 2; ++ii) {
+ checkRect(
+ 0,
+ canvasSize / 2 * ii,
+ canvasSize,
+ canvasSize / 2,
+ colors[(h.colors[ii] + count) % colors.length]);
+ }
+ }
+ ++count;
+ }
+
+ gl.deleteTexture(tex);
+ return true;
+}
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+
+function checkRect(x, y, width, height, color) {
+ wtu.checkCanvasRect(
+ gl,
+ x,
+ y,
+ width,
+ height,
+ color.color,
+ "" + x + ", " + y + ", " + width + ", " + height +
+ " should be " + color.name);
+}
+
+function fillLevel(target, level, size, color) {
+ var numPixels = size * size;
+ var pixels = new Uint8Array(numPixels * 4);
+ var pixelRow = new Uint8Array(size * 4);
+ for (var jj = 0; jj < size; ++jj) {
+ var off = jj * 4;
+ pixelRow[off + 0] = color[0];
+ pixelRow[off + 1] = color[1];
+ pixelRow[off + 2] = color[2];
+ pixelRow[off + 3] = color[3];
+ }
+ for (var jj = 0; jj < size; ++jj) {
+ var off = jj * size * 4;
+ pixels.set(pixelRow, off);
+ }
+ gl.texImage2D(
+ target, level, gl.RGBA, size, size, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ pixels);
+}
+
+function printMat(mat) {
+ debug("" + mat[0] + ", " + mat[1] + ", " + mat[2] + ", " + mat[3] + ", ");
+ debug("" + mat[4] + ", " + mat[5] + ", " + mat[6] + ", " + mat[7] + ", ");
+ debug("" + mat[8] + ", " + mat[9] + ", " + mat[10] + ", " + mat[11] + ", ");
+ debug("" + mat[12] + ", " + mat[13] + ", " + mat[14] + ", " + mat[15] + ", ");
+}
+
+function axisRotation(axis, angle) {
+ var dst = new Float32Array(16);
+ var x = axis[0];
+ var y = axis[1];
+ var z = axis[2];
+ var n = Math.sqrt(x * x + y * y + z * z);
+ x /= n;
+ y /= n;
+ z /= n;
+ var xx = x * x;
+ var yy = y * y;
+ var zz = z * z;
+ var c = Math.cos(angle);
+ var s = Math.sin(angle);
+ var oneMinusCosine = 1 - c;
+
+ dst[ 0] = xx + (1 - xx) * c;
+ dst[ 1] = x * y * oneMinusCosine + z * s;
+ dst[ 2] = x * z * oneMinusCosine - y * s;
+ dst[ 3] = 0;
+ dst[ 4] = x * y * oneMinusCosine - z * s;
+ dst[ 5] = yy + (1 - yy) * c;
+ dst[ 6] = y * z * oneMinusCosine + x * s;
+ dst[ 7] = 0;
+ dst[ 8] = x * z * oneMinusCosine + y * s;
+ dst[ 9] = y * z * oneMinusCosine - x * s;
+ dst[10] = zz + (1 - zz) * c;
+ dst[11] = 0;
+ dst[12] = 0;
+ dst[13] = 0;
+ dst[14] = 0;
+ dst[15] = 1;
+
+ return dst;
+};
+
+function mulMatrix(a, b) {
+ var dst = new Float32Array(16);
+ var a00 = a[0];
+ var a01 = a[1];
+ var a02 = a[2];
+ var a03 = a[3];
+ var a10 = a[ 4 + 0];
+ var a11 = a[ 4 + 1];
+ var a12 = a[ 4 + 2];
+ var a13 = a[ 4 + 3];
+ var a20 = a[ 8 + 0];
+ var a21 = a[ 8 + 1];
+ var a22 = a[ 8 + 2];
+ var a23 = a[ 8 + 3];
+ var a30 = a[12 + 0];
+ var a31 = a[12 + 1];
+ var a32 = a[12 + 2];
+ var a33 = a[12 + 3];
+ var b00 = b[0];
+ var b01 = b[1];
+ var b02 = b[2];
+ var b03 = b[3];
+ var b10 = b[ 4 + 0];
+ var b11 = b[ 4 + 1];
+ var b12 = b[ 4 + 2];
+ var b13 = b[ 4 + 3];
+ var b20 = b[ 8 + 0];
+ var b21 = b[ 8 + 1];
+ var b22 = b[ 8 + 2];
+ var b23 = b[ 8 + 3];
+ var b30 = b[12 + 0];
+ var b31 = b[12 + 1];
+ var b32 = b[12 + 2];
+ var b33 = b[12 + 3];
+ dst[ 0] = a00 * b00 + a01 * b10 + a02 * b20 + a03 * b30;
+ dst[ 1] = a00 * b01 + a01 * b11 + a02 * b21 + a03 * b31;
+ dst[ 2] = a00 * b02 + a01 * b12 + a02 * b22 + a03 * b32;
+ dst[ 3] = a00 * b03 + a01 * b13 + a02 * b23 + a03 * b33;
+ dst[ 4] = a10 * b00 + a11 * b10 + a12 * b20 + a13 * b30;
+ dst[ 5] = a10 * b01 + a11 * b11 + a12 * b21 + a13 * b31;
+ dst[ 6] = a10 * b02 + a11 * b12 + a12 * b22 + a13 * b32;
+ dst[ 7] = a10 * b03 + a11 * b13 + a12 * b23 + a13 * b33;
+ dst[ 8] = a20 * b00 + a21 * b10 + a22 * b20 + a23 * b30;
+ dst[ 9] = a20 * b01 + a21 * b11 + a22 * b21 + a23 * b31;
+ dst[10] = a20 * b02 + a21 * b12 + a22 * b22 + a23 * b32;
+ dst[11] = a20 * b03 + a21 * b13 + a22 * b23 + a23 * b33;
+ dst[12] = a30 * b00 + a31 * b10 + a32 * b20 + a33 * b30;
+ dst[13] = a30 * b01 + a31 * b11 + a32 * b21 + a33 * b31;
+ dst[14] = a30 * b02 + a31 * b12 + a32 * b22 + a33 * b32;
+ dst[15] = a30 * b03 + a31 * b13 + a32 * b23 + a33 * b33;
+ return dst;
+};
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html
new file mode 100644
index 000000000..176e1ce96
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html
@@ -0,0 +1,175 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texture size limit conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="32" height="32" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description("Checks various size limits of textures")
+var canvas;
+
+function numLevelsFromSize(size) {
+ var levels = 0;
+ while ((size >> levels) > 0) {
+ ++levels;
+ }
+ return levels;
+}
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var tests = [
+ { format: gl.ALPHA, type: gl.UNSIGNED_BYTE, size: 1, dataType: Uint8Array },
+ { format: gl.LUMINANCE, type: gl.UNSIGNED_BYTE, size: 1, dataType: Uint8Array },
+ { format: gl.LUMINANCE_ALPHA, type: gl.UNSIGNED_BYTE, size: 2, dataType: Uint8Array },
+ { format: gl.RGB, type: gl.UNSIGNED_BYTE, size: 3, dataType: Uint8Array },
+ { format: gl.RGB, type: gl.UNSIGNED_SHORT_5_6_5, size: 1, dataType: Uint16Array },
+ { format: gl.RGBA, type: gl.UNSIGNED_BYTE, size: 4, dataType: Uint8Array },
+ { format: gl.RGBA, type: gl.UNSIGNED_SHORT_4_4_4_4, size: 1, dataType: Uint16Array },
+ { format: gl.RGBA, type: gl.UNSIGNED_SHORT_5_5_5_1, size: 1, dataType: Uint16Array }
+];
+
+// Note: We expressly only use 2 textures because first a texture will be defined
+// using all mip levels of 1 format, then for a moment it will have mixed formats which
+// may uncover bugs.
+var targets = [
+ { target: gl.TEXTURE_2D,
+ maxSize: gl.getParameter(gl.MAX_TEXTURE_SIZE),
+ maxLevel: 1000,
+ tex: gl.createTexture(),
+ targets: [gl.TEXTURE_2D]
+ },
+ { target: gl.TEXTURE_CUBE_MAP,
+ maxSize: gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE),
+ maxLevel: 5,
+ tex: gl.createTexture(),
+ targets: [
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+ ]
+ }
+];
+
+gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);
+
+var trg = 0;
+var tt = 0;
+runNextTest();
+
+function runNextTest() {
+ var t = targets[trg];
+
+ if (tt == 0) {
+ var tex = t.tex;
+ gl.bindTexture(t.target, tex);
+
+ debug("");
+ debug("max size for " + wtu.glEnumToString(gl, t.target) + ": " + t.maxSize);
+ var numLevels = numLevelsFromSize(t.maxSize);
+ debug("num levels " + numLevels);
+ }
+
+ var test = tests[tt];
+ testFormatType(t, test);
+ ++tt;
+ if (tt == tests.length) {
+ tt = 0;
+ ++trg;
+ if (trg == targets.length) {
+ finishTest();
+ return;
+ }
+ }
+ wtu.waitForComposite(runNextTest)
+}
+
+function testFormatType(t, test) {
+ debug("");
+ debug("testing: " + wtu.glEnumToString(gl, test.format) + ", " + wtu.glEnumToString(gl, test.type));
+ for (var j = 0; j < t.targets.length; ++j) {
+ var target = t.targets[j];
+ debug("");
+ debug(wtu.glEnumToString(gl, target));
+ var numLevels = numLevelsFromSize(t.maxSize);
+ var numTestLevels = Math.min(numLevels, t.maxLevel);
+
+ // out of bounds tests
+ // level out of bounds
+ gl.texImage2D(target, numLevels, test.format, 1, 1, 0, test.format, test.type, null);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "level out of bounds: should generate INVALID_VALUE: level is: "
+ + numLevels + ", size is 1x1.");
+ // width and height out of bounds
+ gl.texImage2D(target, 0, test.format, t.maxSize + 1, t.maxSize + 1, 0, test.format, test.type, null);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "width or height out of bounds: should generate INVALID_VALUE: level is 0, size is "
+ + (t.maxSize + 1) + "x" + (t.maxSize + 1));
+ // width and height out of bounds for specified level
+ gl.texImage2D(target, (numLevels - 1), test.format, 4, 4, 0, test.format, test.type, null);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "width or height out of bounds for specified level: should generate INVALID_VALUE: level is "
+ + (numLevels - 1) + ", size is 4x4.");
+
+ for (var l = 0; l < numTestLevels; ++l) {
+ // Do bottom levels first;
+ var size = 1 << l;
+ var level = numLevels - l - 1;
+ var otherDimension = t.target == gl.TEXTURE_2D ? 1 : size;
+ var badSize = size * 2;
+ var badOtherDimension = t.target == gl.TEXTURE_2D ? 1 : badSize;
+ var pixels = new test.dataType(badSize * badOtherDimension * test.size);
+ gl.texImage2D(target, level, test.format, size, otherDimension, 0, test.format, test.type, pixels);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no error for level: " + level + " " + size + "x" + otherDimension);
+ gl.texImage2D(target, level, test.format, otherDimension, size, 0, test.format, test.type, pixels);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no error for level: " + level + " " + otherDimension + "x" + size);
+ gl.texImage2D(target, level, test.format, badSize, badOtherDimension, 0, test.format, test.type, pixels);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "should generate INVALID_VALUE for level: " + level + " " + badSize + "x" + badOtherDimension);
+ gl.texImage2D(target, level, test.format, badOtherDimension, badSize, 0, test.format, test.type, pixels);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "should generate INVALID_VALUE for level: " + level + " " + badOtherDimension + "x" + badSize);
+ }
+ }
+}
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-size.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-size.html
new file mode 100644
index 000000000..659be1fba
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-size.html
@@ -0,0 +1,238 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texture size conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="32" height="32" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec3 texCoord0;
+varying vec3 texCoord;
+void main()
+{
+ gl_Position = vPosition;
+ texCoord = texCoord0;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform samplerCube tex;
+varying vec3 texCoord;
+void main()
+{
+ gl_FragColor = textureCube(tex, normalize(texCoord));
+}
+</script>
+<script>
+"use strict";
+description("Checks that various sizes of textures render")
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program2D = wtu.setupTexturedQuad(gl);
+var programCubeMap = wtu.setupProgram(
+ gl, ['vshader', 'fshader'], ['vPosition', 'texCoord0'], [0, 1]);
+gl.disable(gl.DEPTH_TEST);
+gl.disable(gl.BLEND);
+var tex = gl.createTexture();
+var max2DSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
+var maxCubeMapSize = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);
+debug("MAX_TEXTURE_SIZE:" + max2DSize);
+debug("MAX_CUBE_MAP_TEXTURE_SIZE:" + maxCubeMapSize);
+// Assuming 2048x2048xRGBA (22meg with mips) will run on all WebGL platforms
+var max2DSquareSize = Math.min(max2DSize, 2048);
+// I'd prefer this to be 2048 but that's 16meg x 6 faces or 128meg (with mips)
+// 1024 is 33.5 meg (with mips)
+var maxCubeMapSize = Math.min(maxCubeMapSize, 1024);
+
+var colors = [
+ { name: "green", rgba: [0, 0, 255, 255] },
+ { name: "red", rgba: [255, 0, 0, 255] },
+ { name: "blue", rgba: [0, 255, 0, 255] },
+ { name: "yellow", rgba: [255, 255, 0, 255] },
+ { name: "magenta", rgba: [255, 0, 255, 255] },
+ { name: "cyan", rgba: [0, 255, 255, 255] }
+];
+
+var count = 0;
+var power = 0;
+runTest();
+
+function runTest() {
+ function doTest() {
+ var size = Math.pow(2, power);
+ if (size > max2DSize) {
+ return false;
+ }
+ gl.useProgram(program2D);
+ if (!checkTexture(size, 1, false)) return false;
+ if (!checkTexture(1, size, false)) return false;
+ if (size <= max2DSquareSize) {
+ if (!checkTexture(size, size, false)) {
+ return false;
+ }
+ }
+ if (size <= maxCubeMapSize) {
+ gl.useProgram(programCubeMap);
+ if (!checkTexture(size, size, true)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ if (doTest()) {
+ ++power;
+ setTimeout(runTest, 0);
+ } else {
+ finishTest();
+ }
+}
+
+function checkTexture(width, height, cubeMap) {
+ debug("");
+ count = (count + 1) % colors.length;
+ var color = colors[count];
+ var tex = gl.createTexture();
+ var target = cubeMap ? gl.TEXTURE_CUBE_MAP : gl.TEXTURE_2D;
+ var type = cubeMap ? "cube map" : "2D texture";
+ debug("check " + width + ", " + height + " " + type);
+ gl.bindTexture(target, tex);
+ gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.texParameteri(target, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(target, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ fillLevel(0, width, height, color.rgba, cubeMap);
+ var err = gl.getError();
+ if (err == gl.OUT_OF_MEMORY) {
+ debug("out of memory");
+ return false;
+ }
+ if (err != gl.NO_ERROR) {
+ testFailed("unexpected gl error: " + wtu.glEnumToString(gl, err));
+ }
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, color.rgba,
+ type + " of size " + width + "x" + height + " with no mips should draw with " + color.name);
+ count = (count + 1) % colors.length;
+ color = colors[count];
+ fillLevel(0, width, height, color.rgba, cubeMap);
+ gl.generateMipmap(target);
+ var err = gl.getError();
+ if (err == gl.OUT_OF_MEMORY) {
+ debug("out of memory");
+ return false;
+ }
+ if (err != gl.NO_ERROR) {
+ testFailed("unexpected gl error: " + wtu.glEnumToString(gl, err));
+ }
+ gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_NEAREST);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, color.rgba,
+ type + " of size " + width + "x" + height + " with mips should draw with " + color.name);
+
+ count = (count + 1) % colors.length;
+ color = colors[count];
+ fillLevel(0, width, height, color.rgba, cubeMap, true);
+ gl.generateMipmap(target);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, color.rgba,
+ type + " of size " + width + "x" + height + " with mips should draw with " + color.name);
+
+ gl.deleteTexture(tex);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+ return true;
+}
+
+function fillLevel(level, width, height, color, opt_cubemap, opt_subTex) {
+ var numPixels = width * height;
+ var pixels = null;
+ var largeDim = Math.max(width, height);
+ var smallDim = Math.min(width, height);
+
+ var pixelRow = new Uint8Array(largeDim * 4);
+ for (var jj = 0; jj < largeDim; ++jj) {
+ var off = jj * 4;
+ pixelRow[off + 0] = color[0];
+ pixelRow[off + 1] = color[1];
+ pixelRow[off + 2] = color[2];
+ pixelRow[off + 3] = color[3];
+ }
+
+ if (largeDim == numPixels) {
+ pixels = pixelRow;
+ } else {
+ var pixels = new Uint8Array(numPixels * 4);
+ for (var jj = 0; jj < smallDim; ++jj) {
+ var off = jj * largeDim * 4;
+ pixels.set(pixelRow, off);
+ }
+ }
+
+ var targets = opt_cubemap ? [
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z] :
+ [gl.TEXTURE_2D];
+
+ for (var ii = 0; ii < targets.length; ++ii) {
+ // debug(wtu.glEnumToString(gl, targets[ii]));
+ var index = (ii + power) % targets.length;
+ var target = targets[index];
+ if (opt_subTex) {
+ gl.texSubImage2D(
+ target, level, 0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE,
+ pixels);
+ } else {
+ gl.texImage2D(
+ target, level, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ pixels);
+ }
+ }
+}
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html
new file mode 100644
index 000000000..d4d860671
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html
@@ -0,0 +1,338 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texture texSubImage2Ds cube map conformance test.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="256" height="256" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+uniform mat4 rotation;
+varying vec3 texCoord;
+void main()
+{
+ gl_Position = vPosition;
+ vec4 direction = vec4(vPosition.x * 0.5, vPosition.y * 0.5, 1, 1);
+ texCoord = normalize((rotation * direction).xyz);
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+uniform samplerCube tex;
+varying vec3 texCoord;
+void main()
+{
+ gl_FragColor = textureCube(tex, normalize(texCoord));
+}
+</script>
+<script>
+"use strict";
+var canvas;
+description("Checks issues with size of cube map textures");
+debug("");
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+
+var gl = wtu.create3DContext(canvas);
+wtu.setupUnitQuad(gl, 0, 1);
+var program = wtu.setupProgram(
+ gl,
+ ['vshader', 'fshader'],
+ ['vPosition', 'texCoord0'], [0, 1]);
+var rotLoc = gl.getUniformLocation(program, "rotation");
+
+var size = 16;
+
+var colors = [
+ {name: 'red', color: [255, 0, 0, 255]},
+ {name: 'green', color: [ 0, 255, 0, 255]},
+ {name: 'blue', color: [ 0, 0, 255, 255]},
+ {name: 'yellow', color: [255, 255, 0, 255]},
+ {name: 'cyan', color: [ 0, 255, 255, 255]},
+ {name: 'magenta', color: [255, 0, 255, 255]}
+];
+
+var targets = [
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z];
+
+var rotations = [
+ {axis: [0, 1, 0], angle: Math.PI / 2},
+ {axis: [0, 1, 0], angle: -Math.PI / 2},
+ {axis: [1, 0, 0], angle: -Math.PI / 2},
+ {axis: [1, 0, 0], angle: Math.PI / 2},
+ {axis: [0, 1, 0], angle: 0},
+ {axis: [0, 1, 0], angle: Math.PI},
+];
+
+var halfRotations = [
+ {colors: [3, 4], rotations: [{axis: [1, 0, 0], angle: Math.PI / 4}]},
+ {colors: [4, 2], rotations: [{axis: [1, 0, 0], angle: -Math.PI / 4}]},
+ {colors: [5, 3], rotations: [{axis: [1, 0, 0], angle: Math.PI / 4 * 3}]},
+ {colors: [2, 5], rotations: [{axis: [1, 0, 0], angle: -Math.PI / 4 * 3}]},
+ {colors: [3, 0], rotations: [{axis: [0, 1, 0], angle: Math.PI / 2},
+ {axis: [1, 0, 0], angle: Math.PI / 4}]},
+ {colors: [0, 2], rotations: [{axis: [0, 1, 0], angle: Math.PI / 2},
+ {axis: [1, 0, 0], angle: -Math.PI / 4}]},
+];
+
+var count = 0;
+testSize(size);
+
+function testSize(size) {
+ debug("");
+ debug("testing size: " + size);
+ var canvasSize = Math.max(size / 4, 2);
+ canvas.width = canvasSize;
+ canvas.height = canvasSize;
+ gl.viewport(0, 0, canvasSize, canvasSize);
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, tex);
+
+ // Seems like I should be using LINEAR here with some other math
+ // to make sure I get more mip coverage but that's easier said
+ // than done.
+
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+
+ for (var jj = 0; jj < 2; ++jj) {
+ for (var tt = 0; tt < targets.length; ++tt) {
+ var color = colors[(tt + count) % colors.length];
+ fillLevel(targets[tt], 0, size, color.color);
+ }
+ if (jj == 1) {
+ debug("use mipmap");
+ gl.texParameteri(
+ gl.TEXTURE_CUBE_MAP, gl.TEXTURE_MIN_FILTER,
+ gl.NEAREST_MIPMAP_NEAREST);
+ gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
+ }
+
+ var err = gl.getError();
+ if (err == gl.OUT_OF_MEMORY) {
+ debug("out of memory");
+ return false;
+ }
+ if (err != gl.NO_ERROR) {
+ testFailed("unexpected gl error: " + wtu.glEnumToString(gl, err));
+ }
+
+
+ for (var rr = 0; rr < rotations.length; ++rr) {
+ var rot = rotations[rr];
+ var color = colors[(rr + count) % colors.length];
+ var rotMat = axisRotation(rot.axis, rot.angle);
+ gl.uniformMatrix4fv(rotLoc, false, rotMat);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(
+ gl, color.color,
+ wtu.glEnumToString(gl, targets[rr]) + " should be " + color.name);
+ }
+
+ for (var rr = 0; rr < halfRotations.length; ++rr) {
+ var h = halfRotations[rr];
+ var rots = h.rotations;
+ var rotMat = axisRotation(rots[0].axis, rots[0].angle);
+ for (var ii = 1; ii < rots.length; ++ii) {
+ var tmpMat = axisRotation(rots[ii].axis, rots[ii].angle);
+ var rotMat = mulMatrix(tmpMat, rotMat);
+ }
+ gl.uniformMatrix4fv(rotLoc, false, rotMat);
+ wtu.clearAndDrawUnitQuad(gl);
+
+ for (var ii = 0; ii < 2; ++ii) {
+ checkRect(
+ 0,
+ canvasSize / 2 * ii,
+ canvasSize,
+ canvasSize / 2,
+ colors[(h.colors[ii] + count) % colors.length]);
+ }
+ }
+ ++count;
+ }
+
+ gl.deleteTexture(tex);
+ return true;
+}
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors.");
+
+function checkRect(x, y, width, height, color) {
+ wtu.checkCanvasRect(
+ gl,
+ x,
+ y,
+ width,
+ height,
+ color.color,
+ "" + x + ", " + y + ", " + width + ", " + height +
+ " should be " + color.name);
+}
+
+function fillLevel(target, level, size, color) {
+ var numPixels = size * size;
+ var halfPixelRow = new Uint8Array(size * 2);
+ for (var jj = 0; jj < size; ++jj) {
+ var off = jj * 4;
+ halfPixelRow[off + 0] = color[0];
+ halfPixelRow[off + 1] = color[1];
+ halfPixelRow[off + 2] = color[2];
+ halfPixelRow[off + 3] = color[3];
+ }
+ gl.texImage2D(
+ target, level, gl.RGBA, size, size, 0, gl.RGBA, gl.UNSIGNED_BYTE,
+ null);
+ for (var jj = 0; jj < size; ++jj) {
+ gl.texSubImage2D(
+ target, level, 0, jj, size / 2, 1, gl.RGBA, gl.UNSIGNED_BYTE, halfPixelRow);
+ gl.texSubImage2D(
+ target, level, size / 2, jj, size / 2, 1, gl.RGBA, gl.UNSIGNED_BYTE, halfPixelRow);
+ }
+}
+
+function printMat(mat) {
+ debug("" + mat[0] + ", " + mat[1] + ", " + mat[2] + ", " + mat[3] + ", ");
+ debug("" + mat[4] + ", " + mat[5] + ", " + mat[6] + ", " + mat[7] + ", ");
+ debug("" + mat[8] + ", " + mat[9] + ", " + mat[10] + ", " + mat[11] + ", ");
+ debug("" + mat[12] + ", " + mat[13] + ", " + mat[14] + ", " + mat[15] + ", ");
+}
+
+function axisRotation(axis, angle) {
+ var dst = new Float32Array(16);
+ var x = axis[0];
+ var y = axis[1];
+ var z = axis[2];
+ var n = Math.sqrt(x * x + y * y + z * z);
+ x /= n;
+ y /= n;
+ z /= n;
+ var xx = x * x;
+ var yy = y * y;
+ var zz = z * z;
+ var c = Math.cos(angle);
+ var s = Math.sin(angle);
+ var oneMinusCosine = 1 - c;
+
+ dst[ 0] = xx + (1 - xx) * c;
+ dst[ 1] = x * y * oneMinusCosine + z * s;
+ dst[ 2] = x * z * oneMinusCosine - y * s;
+ dst[ 3] = 0;
+ dst[ 4] = x * y * oneMinusCosine - z * s;
+ dst[ 5] = yy + (1 - yy) * c;
+ dst[ 6] = y * z * oneMinusCosine + x * s;
+ dst[ 7] = 0;
+ dst[ 8] = x * z * oneMinusCosine + y * s;
+ dst[ 9] = y * z * oneMinusCosine - x * s;
+ dst[10] = zz + (1 - zz) * c;
+ dst[11] = 0;
+ dst[12] = 0;
+ dst[13] = 0;
+ dst[14] = 0;
+ dst[15] = 1;
+
+ return dst;
+};
+
+function mulMatrix(a, b) {
+ var dst = new Float32Array(16);
+ var a00 = a[0];
+ var a01 = a[1];
+ var a02 = a[2];
+ var a03 = a[3];
+ var a10 = a[ 4 + 0];
+ var a11 = a[ 4 + 1];
+ var a12 = a[ 4 + 2];
+ var a13 = a[ 4 + 3];
+ var a20 = a[ 8 + 0];
+ var a21 = a[ 8 + 1];
+ var a22 = a[ 8 + 2];
+ var a23 = a[ 8 + 3];
+ var a30 = a[12 + 0];
+ var a31 = a[12 + 1];
+ var a32 = a[12 + 2];
+ var a33 = a[12 + 3];
+ var b00 = b[0];
+ var b01 = b[1];
+ var b02 = b[2];
+ var b03 = b[3];
+ var b10 = b[ 4 + 0];
+ var b11 = b[ 4 + 1];
+ var b12 = b[ 4 + 2];
+ var b13 = b[ 4 + 3];
+ var b20 = b[ 8 + 0];
+ var b21 = b[ 8 + 1];
+ var b22 = b[ 8 + 2];
+ var b23 = b[ 8 + 3];
+ var b30 = b[12 + 0];
+ var b31 = b[12 + 1];
+ var b32 = b[12 + 2];
+ var b33 = b[12 + 3];
+ dst[ 0] = a00 * b00 + a01 * b10 + a02 * b20 + a03 * b30;
+ dst[ 1] = a00 * b01 + a01 * b11 + a02 * b21 + a03 * b31;
+ dst[ 2] = a00 * b02 + a01 * b12 + a02 * b22 + a03 * b32;
+ dst[ 3] = a00 * b03 + a01 * b13 + a02 * b23 + a03 * b33;
+ dst[ 4] = a10 * b00 + a11 * b10 + a12 * b20 + a13 * b30;
+ dst[ 5] = a10 * b01 + a11 * b11 + a12 * b21 + a13 * b31;
+ dst[ 6] = a10 * b02 + a11 * b12 + a12 * b22 + a13 * b32;
+ dst[ 7] = a10 * b03 + a11 * b13 + a12 * b23 + a13 * b33;
+ dst[ 8] = a20 * b00 + a21 * b10 + a22 * b20 + a23 * b30;
+ dst[ 9] = a20 * b01 + a21 * b11 + a22 * b21 + a23 * b31;
+ dst[10] = a20 * b02 + a21 * b12 + a22 * b22 + a23 * b32;
+ dst[11] = a20 * b03 + a21 * b13 + a22 * b23 + a23 * b33;
+ dst[12] = a30 * b00 + a31 * b10 + a32 * b20 + a33 * b30;
+ dst[13] = a30 * b01 + a31 * b11 + a32 * b21 + a33 * b31;
+ dst[14] = a30 * b02 + a31 * b12 + a32 * b22 + a33 * b32;
+ dst[15] = a30 * b03 + a31 * b13 + a32 * b23 + a33 * b33;
+ return dst;
+};
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html
new file mode 100644
index 000000000..f64b95be3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html
@@ -0,0 +1,108 @@
+<!--
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script>
+"use strict";
+var wtu = WebGLTestUtils;
+var gl = null;
+var texture;
+var textureLoc = null;
+var successfullyParsed = false;
+
+function init()
+{
+ description('Tests there is no garbage in transparent regions of images uploaded as textures');
+
+ wtu = WebGLTestUtils;
+ gl = wtu.create3DContext("example");
+ var program = wtu.setupTexturedQuad(gl);
+ gl.clearColor(0.5,0.5,0.5,1);
+ gl.clearDepth(1);
+
+ textureLoc = gl.getUniformLocation(program, "tex");
+
+ // The input texture has 8 characters; take the leftmost one
+ var coeff = 1.0 / 8.0;
+ var texCoords = new Float32Array([
+ coeff, 1.0,
+ 0.0, 1.0,
+ 0.0, 0.0,
+ coeff, 1.0,
+ 0.0, 0.0,
+ coeff, 0.0]);
+
+ var vbo = gl.createBuffer();
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ gl.bufferData(gl.ARRAY_BUFFER, texCoords, gl.STATIC_DRAW);
+ gl.enableVertexAttribArray(1);
+ gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, 0);
+
+ texture = wtu.loadTexture(gl, "../resources/bug-32888-texture.png", runTest);
+}
+
+// These two declarations need to be global for "shouldBe" to see them
+var buf = null;
+var idx = 0;
+
+function runTest()
+{
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.enable(gl.BLEND);
+ gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
+ // Bind the texture to texture unit 0
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ // Point the uniform sampler to texture unit 0
+ gl.uniform1i(textureLoc, 0);
+ // Draw the triangles
+ wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
+
+ // Spot check a couple of 2x2 regions in the upper and lower left
+ // corners; they should be the rgb values in the texture.
+ var color = [0, 0, 0];
+ debug("Checking lower left corner");
+ wtu.checkCanvasRect(gl, 1, gl.canvas.height - 3, 2, 2, color,
+ "shouldBe " + color);
+ debug("Checking upper left corner");
+ wtu.checkCanvasRect(gl, 1, 1, 2, 2, color,
+ "shouldBe " + color);
+
+ finishTest();
+}
+</script>
+</head>
+<body onload="init()">
+<canvas id="example" width="32" height="32"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html
new file mode 100644
index 000000000..831e318dd
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html
@@ -0,0 +1,75 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="2" height="2"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+description('Tests texImage2D and texSubImage2D upload path for TEXTURE_CUBE_MAP');
+
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+var gl = wtu.create3DContext(canvas);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+
+function testOneTarget(target, width, height) {
+ var tex = gl.createTexture();
+ gl.bindTexture(gl.TEXTURE_CUBE_MAP, tex);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from bindTexture(TEXTURE_CUBE_MAP).");
+
+ gl.texImage2D(target, 0, gl.RGB, width, height, 0, gl.RGB, gl.UNSIGNED_BYTE, null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from texImage2D.");
+
+ var buf = new Uint8Array(width * height * 3);
+ gl.texSubImage2D(target, 0, 0, 0, width, height, gl.RGB, gl.UNSIGNED_BYTE, buf);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from texSubImage2D.");
+}
+
+testOneTarget(gl.TEXTURE_CUBE_MAP_POSITIVE_X, 16, 16);
+testOneTarget(gl.TEXTURE_CUBE_MAP_POSITIVE_Y, 16, 16);
+testOneTarget(gl.TEXTURE_CUBE_MAP_POSITIVE_Z, 16, 16);
+testOneTarget(gl.TEXTURE_CUBE_MAP_NEGATIVE_X, 16, 16);
+testOneTarget(gl.TEXTURE_CUBE_MAP_NEGATIVE_Y, 16, 16);
+testOneTarget(gl.TEXTURE_CUBE_MAP_NEGATIVE_Z, 16, 16);
+
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-size.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-size.html
new file mode 100644
index 000000000..78ff5ef4f
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-size.html
@@ -0,0 +1,172 @@
+<!--
+
+/*
+** Copyright (c) 2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL texture upload size conformance test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="canvas"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+enableJSTestPreVerboseLogging();
+description("Checks that the size of a texture uploaded from an element is set correctly.");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+
+var tex = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex);
+
+var testUpload = function(upload, expectedWidth, expectedHeight) {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, upload);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "when calling texImage2D");
+ wtu.checkTextureSize(gl, expectedWidth, expectedHeight);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, upload);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "when calling texSubImage2D with the same texture upload");
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, upload);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "when calling texSubImage2D with the same texture upload with offset 1, 1");
+};
+
+var testImage = function(test, img) {
+ var width = img.width;
+ var height = img.height;
+ testUpload(img, width, height);
+
+ debug("Testing changing the width and height attributes of the image");
+ img.width *= 2;
+ img.height *= 2;
+ if (test.isSVG) {
+ testUpload(img, img.width, img.height);
+ } else {
+ testUpload(img, width, height);
+ }
+};
+
+var testVideo = function(test, video) {
+ // Assuming that the video is not anamorphic, nor has clean aperture data
+ // that would make the frame size in pixels different.
+ var width = video.videoWidth;
+ var height = video.videoHeight;
+ testUpload(video, width, height);
+
+ debug("Testing changing the width and height attributes of the video");
+ video.width *= 2;
+ video.height *= 2;
+ testUpload(video, width, height);
+};
+
+var createCanvas2DContext = function(width, height) {
+ var canvas = document.createElement("canvas");
+ canvas.width = width;
+ canvas.height = height;
+ var ctx = canvas.getContext("2d");
+ ctx.fillRect(0, 0, width, height);
+ return ctx;
+};
+
+var testImageData = function(test) {
+ var ctx = createCanvas2DContext(test.width, test.height);
+ var imageData = ctx.getImageData(0, 0, test.width, test.height);
+ testUpload(imageData, test.width, test.height);
+};
+
+var testCanvas = function(test) {
+ var ctx = createCanvas2DContext(test.width, test.height);
+ testUpload(ctx.canvas, test.width, test.height);
+
+ debug("Testing changing the dimensions of the same canvas");
+ ctx.canvas.width = test.width + 1;
+ ctx.canvas.height = test.height + 1;
+ testUpload(ctx.canvas, ctx.canvas.width, ctx.canvas.height);
+};
+
+var tests = [
+ {type: "ImageData", width: 123, height: 456},
+ {type: "canvas", width: 123, height: 456},
+ {type: "img", isSVG: false, src: "../resources/red-green.png"},
+ {type: "img", isSVG: true, src: "../resources/red-green.svg"},
+ {type: "video", src: "../resources/red-green.mp4", videoType: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'},
+ {type: "video", src: "../resources/red-green.webmvp8.webm", videoType: 'video/webm; codecs="vp8, vorbis"'},
+ {type: "video", src: "../resources/red-green.theora.ogv", videoType: 'video/ogg; codecs="theora, vorbis"'},
+];
+
+var testIndex = 0;
+
+var runNextTest = function() {
+ if (testIndex < tests.length) {
+ debug("");
+ var test = tests[testIndex];
+ ++testIndex;
+ if (test.type == "img") {
+ debug("HTMLImageElement" + (test.isSVG ? " (SVG)" : ""));
+ var img = wtu.makeImage(test.src, function() {
+ testImage(test, img);
+ setTimeout(runNextTest, 0);
+ });
+ } else if (test.type == "video") {
+ debug("HTMLVideoElement (" + test.videoType + ")");
+ var video = wtu.makeVideo(test.src);
+ if(!video.canPlayType(test.videoType).replace(/no/, '')) {
+ debug(test.videoType + " unsupported");
+ setTimeout(runNextTest, 0);
+ return;
+ }
+ wtu.startPlayingAndWaitForVideo(video, function() {
+ testVideo(test, video);
+ setTimeout(runNextTest, 0);
+ });
+ } else if (test.type == "ImageData") {
+ debug("ImageData");
+ testImageData(test);
+ setTimeout(runNextTest, 0);
+ } else if (test.type == "canvas") {
+ debug("HTMLCanvasElement");
+ testCanvas(test);
+ setTimeout(runNextTest, 0);
+ }
+ } else {
+ finishTest();
+ }
+};
+
+runNextTest();
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/00_test_list.txt
new file mode 100644
index 000000000..732aad646
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/00_test_list.txt
@@ -0,0 +1,7 @@
+array-buffer-crash.html
+array-buffer-view-crash.html
+array-unit-tests.html
+data-view-crash.html
+data-view-test.html
+--min-version 1.0.2 typed-arrays-in-workers.html
+--min-version 1.0.3 array-large-array-tests.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-crash.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-crash.html
new file mode 100644
index 000000000..c0540c9d3
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-crash.html
@@ -0,0 +1,63 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+
+description('Test ArrayBuffer.byteLength');
+
+// The following used to cause a crash in Chrome.
+
+// Note that because the argument to ArrayBuffer's constructor is not
+// optional, an implementation might throw an exception on the expression
+// below rather than implicitly passing undefined. Either way is acceptable
+// from the point of view of this test, but implementations must not crash.
+try {
+ new ArrayBuffer().byteLength;
+} catch (e) {
+}
+
+testPassed("new ArrayBuffer().byteLength did not crash");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-view-crash.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-view-crash.html
new file mode 100644
index 000000000..0bcaaf4ef
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-view-crash.html
@@ -0,0 +1,62 @@
+<!--
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+
+description('Verify that constructing a typed array view with no arguments and fetching its length does not crash');
+
+
+// The following used to cause a crash in both Safari and Chrome.
+
+// Note that because the argument to ArrayBuffer's constructor is not
+// optional, an implementation might throw an exception on the expression
+// below rather than implicitly passing undefined. Either way is acceptable
+// from the point of view of this test, but implementations must not crash.
+try {
+ new Uint32Array().length;
+} catch (e) {
+}
+
+testPassed("new Uint32Array().length did not crash");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-large-array-tests.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-large-array-tests.html
new file mode 100644
index 000000000..b4aa3db5b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-large-array-tests.html
@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="resources/typed-array-test-cases.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+
+description("Verifies allocation of large array buffers");
+
+var currentlyRunning = '';
+var allPassed = true;
+function running(str) {
+ currentlyRunning = str;
+}
+
+function output(str) {
+ debug(str);
+}
+
+function pass() {
+ testPassed(currentlyRunning);
+}
+
+function fail(str) {
+ allPassed = false;
+ var exc;
+ if (str)
+ exc = currentlyRunning + ': ' + str;
+ else
+ exc = currentlyRunning;
+ testFailed(exc);
+}
+
+function assertEq(prefix, expected, val) {
+ if (expected != val) {
+ var str = prefix + ': expected ' + expected + ', got ' + val;
+ throw str;
+ }
+}
+
+function assert(prefix, expected) {
+ if (!expected) {
+ var str = prefix + ': expected value / true';
+ throw str;
+ }
+}
+
+function printSummary() {
+ if (allPassed) {
+ debug("Test passed.");
+ } else {
+ debug("TEST FAILED");
+ }
+}
+
+
+function testConstructionOfHugeArray(type, name, sz) {
+ if (sz == 1)
+ return;
+ try {
+ // Construction of huge arrays must fail because byteLength is
+ // an unsigned long
+ array = new type(3000000000);
+ testFailed("Construction of huge " + name + " should throw exception");
+ } catch (e) {
+ testPassed("Construction of huge " + name + " threw exception");
+ }
+}
+
+function runTests() {
+ allPassed = true;
+
+ for (var i = 0; i < testCases.length; i++) {
+ var testCase = testCases[i];
+ running(testCase.name);
+ if (!(testCase.name in window)) {
+ fail("does not exist");
+ continue;
+ }
+ var type = window[testCase.name];
+ var name = testCase.name;
+ testConstructionOfHugeArray(type, name, testCase.elementSizeInBytes);
+ }
+}
+
+runTests();
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-unit-tests.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-unit-tests.html
new file mode 100644
index 000000000..f2f3a093e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/array-unit-tests.html
@@ -0,0 +1,1118 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/test-eval.js"></script>
+<script src="resources/typed-array-test-cases.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+
+description("Verifies the functionality of the new array-like objects in the TypedArray spec");
+
+var currentlyRunning = '';
+var allPassed = true;
+function running(str) {
+ currentlyRunning = str;
+}
+
+function output(str) {
+ debug(str);
+}
+
+function pass() {
+ testPassed(currentlyRunning);
+}
+
+function fail(str) {
+ allPassed = false;
+ var exc;
+ if (str)
+ exc = currentlyRunning + ': ' + str;
+ else
+ exc = currentlyRunning;
+ testFailed(exc);
+}
+
+function assertEq(prefix, expected, val) {
+ if (expected != val) {
+ var str = prefix + ': expected ' + expected + ', got ' + val;
+ throw str;
+ }
+}
+
+function assert(prefix, expected) {
+ if (!expected) {
+ var str = prefix + ': expected value / true';
+ throw str;
+ }
+}
+
+function printSummary() {
+ if (allPassed) {
+ debug("Test passed.");
+ } else {
+ debug("TEST FAILED");
+ }
+}
+
+var buffer;
+var byteLength;
+var subBuffer;
+var subArray;
+function testSlice() {
+ function test(subBuf, starts, size) {
+ byteLength = size;
+ subBuffer = TestEval(subBuf);
+ subArray = new Int8Array(subBuffer);
+ assertEq(subBuf, subBuffer.byteLength, byteLength);
+ for (var i = 0; i < size; ++i)
+ assertEq('Element ' + i, starts + i, subArray[i]);
+ }
+
+ try {
+ running('testSlice');
+ buffer = new ArrayBuffer(32);
+ var array = new Int8Array(buffer);
+ for (var i = 0; i < 32; ++i)
+ array[i] = i;
+
+ test("buffer.slice(0)", 0, 32);
+ test("buffer.slice(16)", 16, 16);
+ test("buffer.slice(24)", 24, 8);
+ test("buffer.slice(32)", 32, 0);
+ test("buffer.slice(40)", 32, 0);
+ test("buffer.slice(80)", 32, 0);
+
+ test("buffer.slice(-8)", 24, 8);
+ test("buffer.slice(-16)", 16, 16);
+ test("buffer.slice(-24)", 8, 24);
+ test("buffer.slice(-32)", 0, 32);
+ test("buffer.slice(-40)", 0, 32);
+ test("buffer.slice(-80)", 0, 32);
+
+ test("buffer.slice(0, 32)", 0, 32);
+ test("buffer.slice(0, 16)", 0, 16);
+ test("buffer.slice(8, 24)", 8, 16);
+ test("buffer.slice(16, 32)", 16, 16);
+ test("buffer.slice(24, 16)", 24, 0);
+
+ test("buffer.slice(16, -8)", 16, 8);
+ test("buffer.slice(-20, 30)", 12, 18);
+
+ test("buffer.slice(-8, -20)", 24, 0);
+ test("buffer.slice(-20, -8)", 12, 12);
+ test("buffer.slice(-40, 16)", 0, 16);
+ test("buffer.slice(-40, 40)", 0, 32);
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function testArrayBufferIsViewMethod() {
+ debug('test ArrayBuffer.isView() with various values');
+
+ try {
+ if (!ArrayBuffer.isView) {
+ testFailed('ArrayBuffer.isView() method does not exist');
+ } else {
+ testPassed('ArrayBuffer.isView() method exists');
+
+ shouldBe('ArrayBuffer.isView(new Int8Array(1))', 'true');
+ shouldBe('ArrayBuffer.isView(new Uint8Array(1))', 'true');
+ shouldBe('ArrayBuffer.isView(new Uint8ClampedArray(1))', 'true');
+ shouldBe('ArrayBuffer.isView(new Int16Array(1))', 'true');
+ shouldBe('ArrayBuffer.isView(new Uint16Array(1))', 'true');
+ shouldBe('ArrayBuffer.isView(new Int32Array(1))', 'true');
+ shouldBe('ArrayBuffer.isView(new Uint32Array(1))', 'true');
+ shouldBe('ArrayBuffer.isView(new Float32Array(1))', 'true');
+ shouldBe('ArrayBuffer.isView(new Float64Array(1))', 'true');
+ shouldBe('ArrayBuffer.isView(new DataView(new ArrayBuffer(8)))', 'true');
+
+ shouldBe('ArrayBuffer.isView(undefined)', 'false');
+ shouldBe('ArrayBuffer.isView(null)', 'false');
+ shouldBe('ArrayBuffer.isView(true)', 'false');
+ shouldBe('ArrayBuffer.isView(false)', 'false');
+ shouldBe('ArrayBuffer.isView(0)', 'false');
+ shouldBe('ArrayBuffer.isView(1)', 'false');
+ shouldBe('ArrayBuffer.isView(1.0)', 'false');
+ shouldBe('ArrayBuffer.isView("hello")', 'false');
+ shouldBe('ArrayBuffer.isView({})', 'false');
+ shouldBe('ArrayBuffer.isView(function() {})', 'false');
+ shouldBe('ArrayBuffer.isView(new Array(1))', 'false');
+ }
+ } catch (e) {
+ testFailed('Exception thrown while testing ArrayBuffer.isView method: ' + e);
+ }
+}
+
+function testInheritanceHierarchy() {
+ debug('test inheritance hierarchy of typed array views');
+
+ try {
+ var foo = ArrayBufferView;
+ testFailed('ArrayBufferView has [NoInterfaceObject] extended attribute and should not be defined');
+ } catch (e) {
+ testPassed('ArrayBufferView has [NoInterfaceObject] extended attribute and was (correctly) not defined');
+ }
+
+ // Uint8ClampedArray inherited from Uint8Array in earlier versions
+ // of the typed array specification. Since this is no longer the
+ // case, assert the new behavior.
+ shouldBe('new Uint8ClampedArray(1) instanceof Uint8Array', 'false');
+
+ if (Object.getPrototypeOf(Int8Array.prototype) == Object.prototype) {
+ // ES5 behavior.
+ shouldBe('Object.getPrototypeOf(Int8Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Uint8Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Uint8ClampedArray.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Int16Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Uint16Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Int32Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Uint32Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Float32Array.prototype)', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Float64Array.prototype)', 'Object.prototype');
+ } else {
+ // As of ES6, the prototypes for typed array constructors point to an intrinsic object whose internal
+ // prototype is Object.prototype. Relevant spec section is 22.2.5.2: TypedArray.prototype.
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Int8Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Uint8Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Uint8ClampedArray.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Int16Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Uint16Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Int32Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Uint32Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Float32Array.prototype))', 'Object.prototype');
+ shouldBe('Object.getPrototypeOf(Object.getPrototypeOf(Float64Array.prototype))', 'Object.prototype');
+ }
+}
+
+//
+// Tests for unsigned array variants
+//
+
+function testSetAndGet10To1(type, name) {
+ running('test ' + name + ' SetAndGet10To1');
+ try {
+ var array = new type(10);
+ for (var i = 0; i < 10; i++) {
+ array[i] = 10 - i;
+ }
+ for (var i = 0; i < 10; i++) {
+ assertEq('Element ' + i, 10 - i, array[i]);
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function testConstructWithArrayOfUnsignedValues(type, name) {
+ running('test ' + name + ' ConstructWithArrayOfUnsignedValues');
+ try {
+ var array = new type([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]);
+ assertEq('Array length', 10, array.length);
+ for (var i = 0; i < 10; i++) {
+ assertEq('Element ' + i, 10 - i, array[i]);
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function testConstructWithTypedArrayOfUnsignedValues(type, name) {
+ running('test ' + name + ' ConstructWithTypedArrayOfUnsignedValues');
+ try {
+ var tmp = new type([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]);
+ var array = new type(tmp);
+ assertEq('Array length', 10, array.length);
+ for (var i = 0; i < 10; i++) {
+ assertEq('Element ' + i, 10 - i, array[i]);
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+//
+// Tests for signed array variants
+//
+
+function testSetAndGetPos10ToNeg10(type, name) {
+ running('test ' + name + ' SetAndGetPos10ToNeg10');
+ try {
+ var array = new type(21);
+ for (var i = 0; i < 21; i++) {
+ array[i] = 10 - i;
+ }
+ for (var i = 0; i < 21; i++) {
+ assertEq('Element ' + i, 10 - i, array[i]);
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function testConstructWithArrayOfSignedValues(type, name) {
+ running('test ' + name + ' ConstructWithArrayOfSignedValues');
+ try {
+ var array = new type([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]);
+ assertEq('Array length', 21, array.length);
+ for (var i = 0; i < 21; i++) {
+ assertEq('Element ' + i, 10 - i, array[i]);
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function testConstructWithTypedArrayOfSignedValues(type, name) {
+ running('test ' + name + ' ConstructWithTypedArrayOfSignedValues');
+ try {
+ var tmp = new type([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]);
+ var array = new type(tmp);
+ assertEq('Array length', 21, array.length);
+ for (var i = 0; i < 21; i++) {
+ assertEq('Element ' + i, 10 - i, array[i]);
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+//
+// Test cases for integral types.
+// Some JavaScript engines need separate copies of this code in order
+// to exercise all of their optimized code paths.
+//
+
+function testIntegralArrayTruncationBehavior(type, name, unsigned) {
+ running('test integral array truncation behavior for ' + name);
+
+ var sourceData;
+ var expectedResults;
+
+ if (unsigned) {
+ sourceData = [0.6, 10.6, 0.2, 10.2, 10.5, 11.5];
+ if (type === Uint8ClampedArray) {
+ expectedResults = [1, 11, 0, 10, 10, 12];
+ } else {
+ expectedResults = [0, 10, 0, 10, 10, 11];
+ }
+ } else {
+ sourceData = [0.6, 10.6, -0.6, -10.6];
+ expectedResults = [0, 10, 0, -10];
+ }
+
+ var numIterations = 10;
+ var array = new type(numIterations);
+
+ // The code block in each of the case statements below is identical, but some
+ // JavaScript engines need separate copies in order to exercise all of
+ // their optimized code paths.
+
+ try {
+ switch (type) {
+ case Int8Array:
+ for (var ii = 0; ii < sourceData.length; ++ii) {
+ for (var jj = 0; jj < numIterations; ++jj) {
+ array[jj] = sourceData[ii];
+ assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
+ }
+ }
+ break;
+ case Int16Array:
+ for (var ii = 0; ii < sourceData.length; ++ii) {
+ for (var jj = 0; jj < numIterations; ++jj) {
+ array[jj] = sourceData[ii];
+ assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
+ }
+ }
+ break;
+ case Int32Array:
+ for (var ii = 0; ii < sourceData.length; ++ii) {
+ for (var jj = 0; jj < numIterations; ++jj) {
+ array[jj] = sourceData[ii];
+ assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
+ }
+ }
+ break;
+ case Uint8Array:
+ for (var ii = 0; ii < sourceData.length; ++ii) {
+ for (var jj = 0; jj < numIterations; ++jj) {
+ array[jj] = sourceData[ii];
+ assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
+ }
+ }
+ break;
+ case Uint8ClampedArray:
+ for (var ii = 0; ii < sourceData.length; ++ii) {
+ for (var jj = 0; jj < numIterations; ++jj) {
+ array[jj] = sourceData[ii];
+ assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
+ }
+ }
+ break;
+ case Uint16Array:
+ for (var ii = 0; ii < sourceData.length; ++ii) {
+ for (var jj = 0; jj < numIterations; ++jj) {
+ array[jj] = sourceData[ii];
+ assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
+ }
+ }
+ break;
+ case Uint32Array:
+ for (var ii = 0; ii < sourceData.length; ++ii) {
+ for (var jj = 0; jj < numIterations; ++jj) {
+ array[jj] = sourceData[ii];
+ assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
+ }
+ }
+ break;
+ default:
+ fail("Unhandled type");
+ break;
+ }
+
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+
+//
+// Test cases for both signed and unsigned types
+//
+
+function testGetWithOutOfRangeIndices(type, name) {
+ debug('Testing ' + name + ' GetWithOutOfRangeIndices');
+ // See below for declaration of this global variable
+ array = new type([2, 3]);
+ shouldBeUndefined("array[2]");
+ shouldBeUndefined("array[-1]");
+ shouldBeUndefined("array[0x20000000]");
+}
+
+function testOffsetsAndSizes(type, name, elementSizeInBytes) {
+ running('test ' + name + ' OffsetsAndSizes');
+ try {
+ var len = 10;
+ assertEq('type.BYTES_PER_ELEMENT', elementSizeInBytes, type.BYTES_PER_ELEMENT);
+ var array = new type(len);
+ assert('array.buffer', array.buffer);
+ assertEq('array.byteOffset', 0, array.byteOffset);
+ assertEq('array.length', len, array.length);
+ assertEq('array.byteLength', len * elementSizeInBytes, array.byteLength);
+ array = new type(array.buffer, elementSizeInBytes, len - 1);
+ assert('array.buffer', array.buffer);
+ assertEq('array.byteOffset', elementSizeInBytes, array.byteOffset);
+ assertEq('array.length', len - 1, array.length);
+ assertEq('array.byteLength', (len - 1) * elementSizeInBytes, array.byteLength);
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function testSetFromTypedArray(type, name) {
+ running('test ' + name + ' SetFromTypedArray');
+ try {
+ var array = new type(10);
+ var array2 = new type(5);
+ for (var i = 0; i < 10; i++) {
+ assertEq('Element ' + i, 0, array[i]);
+ }
+ for (var i = 0; i < array2.length; i++) {
+ array2[i] = i;
+ }
+ array.set(array2);
+ for (var i = 0; i < array2.length; i++) {
+ assertEq('Element ' + i, i, array[i]);
+ }
+ array.set(array2, 5);
+ for (var i = 0; i < array2.length; i++) {
+ assertEq('Element ' + i, i, array[5 + i]);
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function negativeTestSetFromTypedArray(type, name) {
+ running('negativeTest ' + name + ' SetFromTypedArray');
+ try {
+ var array = new type(5);
+ var array2 = new type(6);
+ for (var i = 0; i < 5; i++) {
+ assertEq('Element ' + i, 0, array[i]);
+ }
+ for (var i = 0; i < array2.length; i++) {
+ array2[i] = i;
+ }
+ try {
+ array.set(array2);
+ fail('Expected exception from array.set(array2)');
+ return;
+ } catch (e) {
+ }
+ try {
+ array2.set(array, 2);
+ fail('Expected exception from array2.set(array, 2)');
+ return;
+ } catch (e) {
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function testSetFromArray(type, name) {
+ running('test ' + name + ' SetFromArray');
+ try {
+ var array = new type(10);
+ var array2 = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1];
+ for (var i = 0; i < 10; i++) {
+ assertEq('Element ' + i, 0, array[i]);
+ }
+ array.set(array2, 0);
+ for (var i = 0; i < array2.length; i++) {
+ assertEq('Element ' + i, 10 - i, array[i]);
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function negativeTestSetFromArray(type, name) {
+ running('negativeTest ' + name + ' SetFromArray');
+ try {
+ var array = new type([2, 3]);
+ try {
+ array.set([4, 5], 1);
+ fail();
+ return;
+ } catch (e) {
+ }
+ try {
+ array.set([4, 5, 6]);
+ fail();
+ return;
+ } catch (e) {
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+var subarray;
+function testSubarray(type, name) {
+ running('test ' + name + ' Subarray');
+ try {
+ var array = new type([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
+ var subarray = array.subarray(0, 5);
+ assertEq('subarray.length', 5, subarray.length);
+ for (var i = 0; i < 5; i++) {
+ assertEq('Element ' + i, i, subarray[i]);
+ }
+ subarray = array.subarray(4, 10);
+ assertEq('subarray.length', 6, subarray.length);
+ for (var i = 0; i < 6; i++) {
+ assertEq('Element ' + i, 4 + i, subarray[i]);
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function testSubarrayOffsetAndLengthClamping(type, name) {
+ running('test ' + name + ' Subarray offset and length clamping');
+ try {
+ var array = new type([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
+ var subarray1 = array.subarray(0, 5);
+ var subarray2 = subarray1.subarray(-2, 10);
+ assertEq('subarray2.length', 2, subarray2.length);
+ assertEq('Element ' + 0, 3, subarray2[0]);
+ assertEq('Element ' + 1, 4, subarray2[1]);
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function negativeTestSubarray(type, name) {
+ running('negativeTest ' + name + ' Subarray');
+ try {
+ var array = new type([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
+ subarray = array.subarray(5, 11);
+ if (subarray.length != 5) {
+ fail();
+ return;
+ }
+ subarray = array.subarray(10, 10);
+ if (subarray.length != 0) {
+ fail();
+ return;
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function testSetBoundaryConditions(type, name, testValues, expectedValues) {
+ running('test ' + name + ' SetBoundaryConditions');
+ try {
+ var array = new type(1);
+ assertEq('Array length', 1, array.length);
+ for (var ii = 0; ii < testValues.length; ++ii) {
+ for (var jj = 0; jj < 10; ++jj) {
+ array[0] = testValues[ii];
+ assertEq('Element 0', expectedValues[ii], array[0]);
+ }
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function testConstructionBoundaryConditions(type, name, testValues, expectedValues) {
+ running('test ' + name + ' ConstructionBoundaryConditions');
+ try {
+ var array = new type(testValues);
+ assertEq('Array length', testValues.length, array.length);
+ for (var ii = 0; ii < testValues.length; ++ii) {
+ assertEq('Element ' + ii, expectedValues[ii], array[ii]);
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+function testConstructionWithNullBuffer(type, name) {
+ var array;
+ try {
+ array = new type(null);
+ testFailed("Construction of " + name + " with null buffer should throw exception");
+ } catch (e) {
+ testPassed("Construction of " + name + " with null buffer threw exception");
+ }
+ try {
+ array = new type(null, 0, 0);
+ testFailed("Construction of " + name + " with (null buffer, 0) should throw exception");
+ } catch (e) {
+ testPassed("Construction of " + name + " with (null buffer, 0) threw exception");
+ }
+ try {
+ array = new type(null, 0, 0);
+ testFailed("Construction of " + name + " with (null buffer, 0, 0) should throw exception");
+ } catch (e) {
+ testPassed("Construction of " + name + " with (null buffer, 0, 0) threw exception");
+ }
+}
+
+function testConstructionWithExceptionThrowingObject(type, name) {
+ var o = {};
+ Object.defineProperty(o, "length", { get: function() { throw "bail;" }});
+ try {
+ var array = new type(o);
+ } catch (e) {
+ }
+ testPassed("Construction of " + name + " with exception-throwing array-like object didn't crash unexpectedly");
+}
+
+function shouldThrowIndexSizeErr(func, text) {
+ var errorText = text + " should throw an exception";
+ try {
+ func();
+ testFailed(errorText);
+ } catch (e) {
+ testPassed(text + " threw an exception");
+ }
+}
+
+function shouldThrowTypeError(func, text) {
+ var ok = false;
+ try {
+ func();
+ } catch (e) {
+ if (e instanceof TypeError) {
+ ok = true;
+ }
+ }
+ if (ok) {
+ testPassed(text + " threw TypeError");
+ } else {
+ testFailed(text + " should throw TypeError");
+ }
+}
+
+function testConstructionWithOutOfRangeValues(type, name) {
+ shouldThrowIndexSizeErr(function() {
+ var buffer = new ArrayBuffer(4);
+ var array = new type(buffer, 4, 0x3FFFFFFF);
+ }, "Construction of " + name + " with out-of-range number of elements");
+ shouldThrowIndexSizeErr(function() {
+ var buffer = new ArrayBuffer(4);
+ var array = new type(buffer, 8);
+ }, "Construction of " + name + " with out-of-range offset");
+}
+
+function testConstructionWithNegativeOutOfRangeValues(type, name) {
+ try {
+ var buffer = new ArrayBuffer(-1);
+ testFailed("Construction of ArrayBuffer with negative size should throw exception");
+ } catch (e) {
+ testPassed("Construction of ArrayBuffer with negative size threw exception");
+ }
+ try {
+ var array = new type(-1);
+ testFailed("Construction of " + name + " with negative size should throw exception");
+ } catch (e) {
+ testPassed("Construction of " + name + " with negative size threw exception");
+ }
+ shouldThrowIndexSizeErr(function() {
+ var buffer = new ArrayBuffer(4);
+ var array = new type(buffer, 4, -2147483648);
+ }, "Construction of " + name + " with negative out-of-range values");
+}
+
+function testConstructionWithUnalignedOffset(type, name, elementSizeInBytes) {
+ if (elementSizeInBytes > 1) {
+ shouldThrowIndexSizeErr(function() {
+ var buffer = new ArrayBuffer(32);
+ var array = new type(buffer, 1, elementSizeInBytes);
+ }, "Construction of " + name + " with unaligned offset");
+ }
+}
+
+function testConstructionWithUnalignedLength(type, name, elementSizeInBytes) {
+ if (elementSizeInBytes > 1) {
+ shouldThrowIndexSizeErr(function() {
+ var buffer = new ArrayBuffer(elementSizeInBytes + 1);
+ var array = new type(buffer, 0);
+ }, "Construction of " + name + " with unaligned length");
+ }
+}
+
+function testConstructionWithBothArrayBufferAndLength(type, name, elementSizeInBytes) {
+ var bufByteLength = 1000 * elementSizeInBytes;
+ var buf = new ArrayBuffer(bufByteLength);
+ var array1 = new type(buf);
+ var array2 = new type(bufByteLength / elementSizeInBytes);
+ if (array1.length == array2.length) {
+ testPassed("Array lengths matched with explicit and implicit creation of ArrayBuffer");
+ } else {
+ testFailed("Array lengths DID NOT MATCH with explicit and implicit creation of ArrayBuffer");
+ }
+}
+
+function testConstructionWithSubPortionOfArrayBuffer(type, name, elementSizeInBytes) {
+ if (elementSizeInBytes > 1) {
+ // Test construction with a valid sub-portion of an array buffer
+ // (whose size is not an integral multiple of the element size).
+ var size = 4 * elementSizeInBytes + (elementSizeInBytes / 2);
+ var buf = new ArrayBuffer(size);
+ try {
+ var array = new type(buf, 0, 2);
+ testPassed("new " + name + "(new ArrayBuffer(" + size + "), 0, 2) succeeded");
+ } catch (e) {
+ testFailed("new " + name + "(new ArrayBuffer(" + size + "), 0, 2) failed: " + e);
+ }
+ }
+}
+
+// These need to be global for shouldBe to see them
+var array;
+var typeSize;
+
+function testSubarrayWithOutOfRangeValues(type, name, sz) {
+ debug("Testing subarray of " + name);
+ try {
+ var buffer = new ArrayBuffer(32);
+ array = new type(buffer);
+ typeSize = sz;
+ shouldBe("array.length", "32 / typeSize");
+ try {
+ shouldBe("array.subarray(4, 0x3FFFFFFF).length", "(32 / typeSize) - 4");
+ shouldBe("array.subarray(4, -2147483648).length", "0");
+ // Test subarray() against overflows.
+ array = array.subarray(2);
+ if (sz > 1) {
+ // Full byte offset is +1 larger than the maximum unsigned long int.
+ // Make sure subarray() still handles it correctly. Otherwise overflow would happen and
+ // offset would be 0, and array.length array.length would incorrectly be 1.
+ var start = 4294967296 / sz - 2;
+ array = array.subarray(start, start + 1);
+ shouldBe("array.length", "0");
+ }
+ } catch (e) {
+ testFailed("Subarray of " + name + " threw exception");
+ }
+ } catch (e) {
+ testFailed("Exception: " + e);
+ }
+}
+
+function testSubarrayWithDefaultValues(type, name, sz) {
+ debug("Testing subarray with default inputs of " + name);
+ try {
+ var buffer = new ArrayBuffer(32);
+ array = new type(buffer);
+ typeSize = sz;
+ shouldBe("array.length", "32 / typeSize");
+ try {
+ shouldBe("array.subarray(0).length", "(32 / typeSize)");
+ shouldBe("array.subarray(2).length", "(32 / typeSize) - 2");
+ shouldBe("array.subarray(-2).length", "2");
+ shouldBe("array.subarray(-2147483648).length", "(32 / typeSize)");
+ } catch (e) {
+ testFailed("Subarray of " + name + " threw exception");
+ }
+ } catch (e) {
+ testFailed("Exception: " + e);
+ }
+}
+
+function setWithInvalidOffset(type, name, length,
+ sourceType, sourceName, sourceLength,
+ offset, offsetDescription) {
+ var webglArray = new type(length);
+ var sourceArray = new sourceType(sourceLength);
+ for (var i = 0; i < sourceLength; i++)
+ sourceArray[i] = 42 + i;
+ try {
+ webglArray.set(sourceArray, offset);
+ testFailed("Setting " + name + " from " + sourceName + " with " +
+ offsetDescription + " offset was not caught");
+ } catch (e) {
+ testPassed("Setting " + name + " from " + sourceName + " with " +
+ offsetDescription + " offset was caught");
+ }
+}
+
+function setWithValidOffset(type, name, length,
+ sourceType, sourceName, sourceLength,
+ offset, offsetDescription) {
+ running("Setting " + name + " from " + sourceName + " with " +
+ offsetDescription + " offset");
+ var webglArray = new type(length);
+ var sourceArray = new sourceType(sourceLength);
+ for (var i = 0; i < sourceLength; i++)
+ sourceArray[i] = 42 + i;
+ try {
+ webglArray.set(sourceArray, offset);
+ offset = Math.floor(offset);
+ for (var i = 0; i < sourceLength; i++) {
+ assertEq("Element " + i + offset, sourceArray[i], webglArray[i + offset]);
+ }
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+
+function testSettingFromArrayWithOutOfRangeOffset(type, name) {
+ setWithInvalidOffset(type, name, 32, Array, "array", 16,
+ 0x7FFFFFF8, "out-of-range");
+}
+
+function testSettingFromTypedArrayWithOutOfRangeOffset(type, name) {
+ setWithInvalidOffset(type, name, 32, type, name, 16,
+ 0x7FFFFFF8, "out-of-range");
+}
+
+function testSettingFromArrayWithNegativeOffset(type, name) {
+ setWithInvalidOffset(type, name, 32, Array, "array", 16,
+ -1, "negative");
+}
+
+function testSettingFromTypedArrayWithNegativeOffset(type, name) {
+ setWithInvalidOffset(type, name, 32, type, name, 16,
+ -1, "negative");
+}
+
+function testSettingFromArrayWithMinusZeroOffset(type, name) {
+ setWithValidOffset(type, name, 32, Array, "array", 16,
+ -0, "-0");
+}
+
+function testSettingFromTypedArrayWithMinusZeroOffset(type, name) {
+ setWithValidOffset(type, name, 32, type, name, 16,
+ -0, "-0");
+}
+
+function testSettingFromArrayWithBoundaryOffset(type, name) {
+ setWithValidOffset(type, name, 32, Array, "array", 16,
+ 16, "boundary");
+}
+
+function testSettingFromTypedArrayWithBoundaryOffset(type, name) {
+ setWithValidOffset(type, name, 32, type, name, 16,
+ 16, "boundary");
+}
+
+function testSettingFromArrayWithNonIntegerOffset(type, name) {
+ setWithValidOffset(type, name, 32, Array, "array", 16,
+ 16.999, "non-integer");
+}
+
+function testSettingFromTypedArrayWithNonIntegerOffset(type, name) {
+ setWithValidOffset(type, name, 32, type, name, 16,
+ 16.999, "non-integer");
+}
+
+function testSettingFromFakeArrayWithOutOfRangeLength(type, name) {
+ var webglArray = new type(32);
+ var array = {};
+ array.length = 0x80000000;
+ try {
+ webglArray.set(array, 8);
+ testFailed("Setting " + name + " from fake array with invalid length was not caught");
+ } catch (e) {
+ testPassed("Setting " + name + " from fake array with invalid length was caught");
+ }
+}
+
+
+function negativeTestGetAndSetMethods(type, name) {
+ array = new type([2, 3]);
+ shouldBeUndefined("array.get");
+ var exceptionThrown = false;
+ // We deliberately check for an exception here rather than using
+ // shouldThrow here because the precise contents of the syntax
+ // error are not specified.
+ try {
+ webGLArray.set(0, 1);
+ } catch (e) {
+ exceptionThrown = true;
+ }
+ var output = "array.set(0, 1) ";
+ if (exceptionThrown) {
+ testPassed(output + "threw exception.");
+ } else {
+ testFailed(output + "did not throw exception.");
+ }
+}
+
+function testNaNConversion(type, name) {
+ running('test storing NaN in ' + name);
+
+ var array = new type([1, 1]);
+ var results = [];
+
+ // The code block in each of the case statements below is identical, but some
+ // JavaScript engines need separate copies in order to exercise all of
+ // their optimized code paths.
+ try {
+ switch (type) {
+ case Float32Array:
+ for (var i = 0; i < array.length; ++i) {
+ array[i] = NaN;
+ results[i] = array[i];
+ }
+ break;
+ case Float64Array:
+ for (var i = 0; i < array.length; ++i) {
+ array[i] = NaN;
+ results[i] = array[i];
+ }
+ break;
+ case Int8Array:
+ for (var i = 0; i < array.length; ++i) {
+ array[i] = NaN;
+ results[i] = array[i];
+ }
+ break;
+ case Int16Array:
+ for (var i = 0; i < array.length; ++i) {
+ array[i] = NaN;
+ results[i] = array[i];
+ }
+ break;
+ case Int32Array:
+ for (var i = 0; i < array.length; ++i) {
+ array[i] = NaN;
+ results[i] = array[i];
+ }
+ break;
+ case Uint8Array:
+ for (var i = 0; i < array.length; ++i) {
+ array[i] = NaN;
+ results[i] = array[i];
+ }
+ break;
+ case Uint8ClampedArray:
+ for (var i = 0; i < array.length; ++i) {
+ array[i] = NaN;
+ results[i] = array[i];
+ }
+ break;
+ case Uint16Array:
+ for (var i = 0; i < array.length; ++i) {
+ array[i] = NaN;
+ results[i] = array[i];
+ }
+ break;
+ case Uint32Array:
+ for (var i = 0; i < array.length; ++i) {
+ array[i] = NaN;
+ results[i] = array[i];
+ }
+ break;
+ default:
+ fail("Unhandled type");
+ break;
+ }
+
+ // Some types preserve NaN values; all other types convert NaN to zero.
+ if (type === Float32Array || type === Float64Array) {
+ assert('initial NaN preserved', isNaN(new type([NaN])[0]));
+ for (var i = 0; i < array.length; ++i)
+ assert('NaN preserved via setter', isNaN(results[i]));
+ } else {
+ assertEq('initial NaN converted to zero', 0, new type([NaN])[0]);
+ for (var i = 0; i < array.length; ++i)
+ assertEq('NaN converted to zero by setter', 0, results[i]);
+ }
+
+ pass();
+ } catch (e) {
+ fail(e);
+ }
+}
+
+//
+// Test driver
+//
+
+function runTests() {
+ allPassed = true;
+
+ testSlice();
+ testArrayBufferIsViewMethod();
+ testInheritanceHierarchy();
+
+ for (var i = 0; i < testCases.length; i++) {
+ var testCase = testCases[i];
+ running(testCase.name);
+ if (!(testCase.name in window)) {
+ fail("does not exist");
+ continue;
+ }
+ var type = window[testCase.name];
+ var name = testCase.name;
+ if (testCase.unsigned) {
+ testSetAndGet10To1(type, name);
+ testConstructWithArrayOfUnsignedValues(type, name);
+ testConstructWithTypedArrayOfUnsignedValues(type, name);
+ } else {
+ testSetAndGetPos10ToNeg10(type, name);
+ testConstructWithArrayOfSignedValues(type, name);
+ testConstructWithTypedArrayOfSignedValues(type, name);
+ }
+ if (testCase.integral) {
+ testIntegralArrayTruncationBehavior(type, name, testCase.unsigned);
+ }
+ testGetWithOutOfRangeIndices(type, name);
+ testOffsetsAndSizes(type, name, testCase.elementSizeInBytes);
+ testSetFromTypedArray(type, name);
+ negativeTestSetFromTypedArray(type, name);
+ testSetFromArray(type, name);
+ negativeTestSetFromArray(type, name);
+ testSubarray(type, name);
+ testSubarrayOffsetAndLengthClamping(type, name);
+ negativeTestSubarray(type, name);
+ testSetBoundaryConditions(type,
+ name,
+ testCase.testValues,
+ testCase.expectedValues);
+ testConstructionBoundaryConditions(type,
+ name,
+ testCase.testValues,
+ testCase.expectedValues);
+ testConstructionWithNullBuffer(type, name);
+ testConstructionWithExceptionThrowingObject(type, name);
+ testConstructionWithOutOfRangeValues(type, name);
+ testConstructionWithNegativeOutOfRangeValues(type, name);
+ testConstructionWithUnalignedOffset(type, name, testCase.elementSizeInBytes);
+ testConstructionWithUnalignedLength(type, name, testCase.elementSizeInBytes);
+ testConstructionWithBothArrayBufferAndLength(type, name, testCase.elementSizeInBytes);
+ testConstructionWithSubPortionOfArrayBuffer(type, name, testCase.elementSizeInBytes);
+ testSubarrayWithOutOfRangeValues(type, name, testCase.elementSizeInBytes);
+ testSubarrayWithDefaultValues(type, name, testCase.elementSizeInBytes);
+ testSettingFromArrayWithOutOfRangeOffset(type, name);
+ testSettingFromTypedArrayWithOutOfRangeOffset(type, name);
+ testSettingFromArrayWithNegativeOffset(type, name);
+ testSettingFromTypedArrayWithNegativeOffset(type, name);
+ testSettingFromArrayWithMinusZeroOffset(type, name);
+ testSettingFromTypedArrayWithMinusZeroOffset(type, name);
+ testSettingFromArrayWithBoundaryOffset(type, name);
+ testSettingFromTypedArrayWithBoundaryOffset(type, name);
+ testSettingFromArrayWithNonIntegerOffset(type, name);
+ testSettingFromTypedArrayWithNonIntegerOffset(type, name);
+ testSettingFromFakeArrayWithOutOfRangeLength(type, name);
+ negativeTestGetAndSetMethods(type, name);
+ testNaNConversion(type, name);
+ }
+
+ printSummary();
+}
+
+runTests();
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-crash.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-crash.html
new file mode 100644
index 000000000..a1c518ee7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-crash.html
@@ -0,0 +1,56 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Test that DataView does not crash with bad offset or length.");
+
+var array = new Uint8Array([164, 112, 157, 63]);
+var view;
+shouldThrow("view = new DataView(array.buffer, -4500000000)");
+shouldThrow("view = new DataView(array.buffer, -4500000000, 4500000000)");
+var value = view ? view.getFloat32(0, true) : 0;
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html
new file mode 100644
index 000000000..5deeb60d2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html
@@ -0,0 +1,379 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/test-eval.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Test DataView.");
+
+var intArray1 = [0, 1, 2, 3, 100, 101, 102, 103, 128, 129, 130, 131, 252, 253, 254, 255];
+var intArray2 = [31, 32, 33, 0, 1, 2, 3, 100, 101, 102, 103, 128, 129, 130, 131, 252, 253, 254, 255];
+var emptyArray = [204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204];
+
+var arrayBuffer = null;
+var view = null;
+var viewStart = 0;
+var viewLength = 0;
+
+function getElementSize(func)
+{
+ switch (func) {
+ case "Int8":
+ case "Uint8":
+ return 1;
+ case "Int16":
+ case "Uint16":
+ return 2;
+ case "Int32":
+ case "Uint32":
+ case "Float32":
+ return 4;
+ case "Float64":
+ return 8;
+ default:
+ debug("Should not reached");
+ }
+}
+
+function checkGet(func, index, expected, littleEndian)
+{
+ var expr = "view.get" + func + "(" + index;
+ if (littleEndian != undefined) {
+ expr += ", ";
+ expr += littleEndian ? "true" : "false";
+ }
+ expr += ")";
+ if (index >= 0 && index + getElementSize(func) - 1 < view.byteLength)
+ shouldBe(expr, expected);
+ else
+ shouldThrow(expr);
+}
+
+function checkSet(func, index, value, littleEndian)
+{
+ var expr = "view.set" + func + "(" + index + ", " + value;
+ if (littleEndian != undefined) {
+ expr += ", ";
+ expr += littleEndian ? "true" : "false";
+ }
+ expr += ")";
+ if (index >= 0 && index + getElementSize(func) - 1 < view.byteLength) {
+ shouldBeUndefined(expr);
+ checkGet(func, index, value, littleEndian);
+ } else
+ shouldThrow(expr);
+}
+
+function test(isTestingGet, func, index, value, littleEndian)
+{
+ if (isTestingGet)
+ checkGet(func, index, value, littleEndian);
+ else
+ checkSet(func, index, value, littleEndian);
+}
+
+function createDataView(array, frontPaddingNum, littleEndian, start, length)
+{
+ if (!littleEndian)
+ array.reverse();
+ var paddingArray = new Array(frontPaddingNum);
+ arrayBuffer = (new Uint8Array(paddingArray.concat(array))).buffer;
+ viewStart = (start != undefined) ? start : 0;
+ viewLength = (length != undefined) ? length : arrayBuffer.byteLength - viewStart;
+ view = new DataView(arrayBuffer, viewStart, viewLength);
+ if (!littleEndian)
+ array.reverse(); // restore the array.
+}
+
+function runIntegerTestCases(isTestingGet, array, start, length)
+{
+ createDataView(array, 0, true, start, length);
+
+ test(isTestingGet, "Int8", 0, "0");
+ test(isTestingGet, "Int8", 8, "-128");
+ test(isTestingGet, "Int8", 15, "-1");
+
+ test(isTestingGet, "Uint8", 0, "0");
+ test(isTestingGet, "Uint8", 8, "128");
+ test(isTestingGet, "Uint8", 15, "255");
+
+ // Little endian.
+ test(isTestingGet, "Int16", 0, "256", true);
+ test(isTestingGet, "Int16", 5, "26213", true);
+ test(isTestingGet, "Int16", 9, "-32127", true);
+ test(isTestingGet, "Int16", 14, "-2", true);
+
+ // Big endian.
+ test(isTestingGet, "Int16", 0, "1");
+ test(isTestingGet, "Int16", 5, "25958");
+ test(isTestingGet, "Int16", 9, "-32382");
+ test(isTestingGet, "Int16", 14, "-257");
+
+ // Little endian.
+ test(isTestingGet, "Uint16", 0, "256", true);
+ test(isTestingGet, "Uint16", 5, "26213", true);
+ test(isTestingGet, "Uint16", 9, "33409", true);
+ test(isTestingGet, "Uint16", 14, "65534", true);
+
+ // Big endian.
+ test(isTestingGet, "Uint16", 0, "1");
+ test(isTestingGet, "Uint16", 5, "25958");
+ test(isTestingGet, "Uint16", 9, "33154");
+ test(isTestingGet, "Uint16", 14, "65279");
+
+ // Little endian.
+ test(isTestingGet, "Int32", 0, "50462976", true);
+ test(isTestingGet, "Int32", 3, "1717920771", true);
+ test(isTestingGet, "Int32", 6, "-2122291354", true);
+ test(isTestingGet, "Int32", 9, "-58490239", true);
+ test(isTestingGet, "Int32", 12, "-66052", true);
+
+ // Big endian.
+ test(isTestingGet, "Int32", 0, "66051");
+ test(isTestingGet, "Int32", 3, "56911206");
+ test(isTestingGet, "Int32", 6, "1718059137");
+ test(isTestingGet, "Int32", 9, "-2122152964");
+ test(isTestingGet, "Int32", 12, "-50462977");
+
+ // Little endian.
+ test(isTestingGet, "Uint32", 0, "50462976", true);
+ test(isTestingGet, "Uint32", 3, "1717920771", true);
+ test(isTestingGet, "Uint32", 6, "2172675942", true);
+ test(isTestingGet, "Uint32", 9, "4236477057", true);
+ test(isTestingGet, "Uint32", 12, "4294901244", true);
+
+ // Big endian.
+ test(isTestingGet, "Uint32", 0, "66051");
+ test(isTestingGet, "Uint32", 3, "56911206");
+ test(isTestingGet, "Uint32", 6, "1718059137");
+ test(isTestingGet, "Uint32", 9, "2172814332");
+ test(isTestingGet, "Uint32", 12, "4244504319");
+}
+
+function testFloat(isTestingGet, func, array, start, expected)
+{
+ // Little endian.
+ createDataView(array, 0, true, start);
+ test(isTestingGet, func, 0, expected, true);
+ createDataView(array, 3, true, start);
+ test(isTestingGet, func, 3, expected, true);
+ createDataView(array, 7, true, start);
+ test(isTestingGet, func, 7, expected, true);
+ createDataView(array, 10, true, start);
+ test(isTestingGet, func, 10, expected, true);
+
+ // Big endian.
+ createDataView(array, 0, false);
+ test(isTestingGet, func, 0, expected, false);
+ createDataView(array, 3, false);
+ test(isTestingGet, func, 3, expected, false);
+ createDataView(array, 7, false);
+ test(isTestingGet, func, 7, expected, false);
+ createDataView(array, 10, false);
+ test(isTestingGet, func, 10, expected, false);
+}
+
+function runFloatTestCases(isTestingGet, start)
+{
+ testFloat(isTestingGet, "Float32", isTestingGet ? [0, 0, 32, 65] : emptyArray, start, "10");
+ testFloat(isTestingGet, "Float32", isTestingGet ? [164, 112, 157, 63] : emptyArray, start, "1.2300000190734863");
+ testFloat(isTestingGet, "Float32", isTestingGet ? [95, 53, 50, 199] : emptyArray, start, "-45621.37109375");
+ testFloat(isTestingGet, "Float32", isTestingGet ? [255, 255, 255, 127] : emptyArray, start, "NaN");
+ testFloat(isTestingGet, "Float32", isTestingGet ? [255, 255, 255, 255] : emptyArray, start, "-NaN");
+
+ testFloat(isTestingGet, "Float64", isTestingGet ? [0, 0, 0, 0, 0, 0, 36, 64] : emptyArray, start, "10");
+ testFloat(isTestingGet, "Float64", isTestingGet ? [174, 71, 225, 122, 20, 174, 243, 63] : emptyArray, start, "1.23");
+ testFloat(isTestingGet, "Float64", isTestingGet ? [181, 55, 248, 30, 242, 179, 87, 193] : emptyArray, start, "-6213576.4839");
+ testFloat(isTestingGet, "Float64", isTestingGet ? [255, 255, 255, 255, 255, 255, 255, 127] : emptyArray, start, "NaN");
+ testFloat(isTestingGet, "Float64", isTestingGet ? [255, 255, 255, 255, 255, 255, 255, 255] : emptyArray, start, "-NaN");
+}
+
+function runNegativeIndexTests(isTestingGet)
+{
+ createDataView(intArray1, 0, true, 0, 16);
+
+ test(isTestingGet, "Int8", -1, "0");
+ test(isTestingGet, "Int8", -2, "0");
+
+ test(isTestingGet, "Uint8", -1, "0");
+ test(isTestingGet, "Uint8", -2, "0");
+
+ test(isTestingGet, "Int16", -1, "0");
+ test(isTestingGet, "Int16", -2, "0");
+ test(isTestingGet, "Int16", -3, "0");
+
+ test(isTestingGet, "Uint16", -1, "0");
+ test(isTestingGet, "Uint16", -2, "0");
+ test(isTestingGet, "Uint16", -3, "0");
+
+ test(isTestingGet, "Int32", -1, "0");
+ test(isTestingGet, "Int32", -3, "0");
+ test(isTestingGet, "Int32", -5, "0");
+
+ test(isTestingGet, "Uint32", -1, "0");
+ test(isTestingGet, "Uint32", -3, "0");
+ test(isTestingGet, "Uint32", -5, "0");
+
+ createDataView([0, 0, 0, 0, 0, 0, 36, 64], 0, true, 0, 8);
+
+ test(isTestingGet, "Float32", -1, "0");
+ test(isTestingGet, "Float32", -3, "0");
+ test(isTestingGet, "Float32", -5, "0");
+
+ test(isTestingGet, "Float64", -1, "0");
+ test(isTestingGet, "Float64", -5, "0");
+ test(isTestingGet, "Float64", -9, "0");
+}
+
+function runConstructorTests()
+{
+ arrayBuffer = (new Uint8Array([1, 2])).buffer;
+
+ debug("");
+ debug("Test for constructor taking 1 argument");
+ shouldBeDefined("view = new DataView(arrayBuffer)");
+ shouldBe("view.byteOffset", "0");
+ shouldBe("view.byteLength", "2");
+
+ debug("");
+ debug("Test for constructor taking 2 arguments");
+ shouldBeDefined("view = new DataView(arrayBuffer, 1)");
+ shouldBe("view.byteOffset", "1");
+ shouldBe("view.byteLength", "1");
+
+ debug("");
+ debug("Test for constructor taking 3 arguments");
+ shouldBeDefined("view = new DataView(arrayBuffer, 0, 1)");
+ shouldBe("view.byteOffset", "0");
+ shouldBe("view.byteLength", "1");
+
+ debug("");
+ debug("Test for constructor throwing exception");
+ shouldThrow("view = new DataView(arrayBuffer, 0, 3)");
+ shouldThrow("view = new DataView(arrayBuffer, 1, 2)");
+ shouldThrow("view = new DataView(arrayBuffer, 2, 1)");
+}
+
+function runGetTests()
+{
+ debug("");
+ debug("Test for get methods that work");
+ runIntegerTestCases(true, intArray1, 0, 16);
+ runFloatTestCases(true, 0);
+
+ debug("");
+ debug("Test for get methods that might read beyond range");
+ runIntegerTestCases(true, intArray2, 3, 2);
+ runFloatTestCases(true, 3);
+
+ debug("");
+ debug("Test for get methods that read from negative index");
+ runNegativeIndexTests(true);
+
+ debug("");
+ debug("Test for wrong arguments passed to get methods");
+ view = new DataView((new Uint8Array([1, 2])).buffer);
+ shouldThrow("view.getInt8()");
+ shouldThrow("view.getUint8()");
+ shouldThrow("view.getInt16()");
+ shouldThrow("view.getUint16()");
+ shouldThrow("view.getInt32()");
+ shouldThrow("view.getUint32()");
+ shouldThrow("view.getFloat32()");
+ shouldThrow("view.getFloat64()");
+}
+
+function runSetTests()
+{
+ debug("");
+ debug("Test for set methods that work");
+ runIntegerTestCases(false, emptyArray, 0, 16);
+ runFloatTestCases(false);
+
+ debug("");
+ debug("Test for set methods that might write beyond the range");
+ runIntegerTestCases(false, emptyArray, 3, 2);
+ runFloatTestCases(false, 7);
+
+ debug("");
+ debug("Test for set methods that write to negative index");
+ runNegativeIndexTests(false);
+
+ debug("");
+ debug("Test for wrong arguments passed to set methods");
+ view = new DataView((new Uint8Array([1, 2])).buffer);
+ shouldThrow("view.setInt8()");
+ shouldThrow("view.setUint8()");
+ shouldThrow("view.setInt16()");
+ shouldThrow("view.setUint16()");
+ shouldThrow("view.setInt32()");
+ shouldThrow("view.setUint32()");
+ shouldThrow("view.setFloat32()");
+ shouldThrow("view.setFloat64()");
+ shouldThrow("view.setInt8(1)");
+ shouldThrow("view.setUint8(1)");
+ shouldThrow("view.setInt16(1)");
+ shouldThrow("view.setUint16(1)");
+ shouldThrow("view.setInt32(1)");
+ shouldThrow("view.setUint32(1)");
+ shouldThrow("view.setFloat32(1)");
+ shouldThrow("view.setFloat64(1)");
+}
+
+function runIndexingTests()
+{
+ debug("");
+ debug("Test for indexing that should not work");
+ view = new DataView((new Uint8Array([1, 2])).buffer);
+ shouldBeUndefined("view[0]");
+ shouldBeDefined("view[0] = 3");
+ shouldBe("view.getUint8(0)", "1");
+}
+
+runConstructorTests();
+runGetTests();
+runSetTests();
+runIndexingTests();
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/resources/typed-array-test-cases.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/resources/typed-array-test-cases.js
new file mode 100644
index 000000000..462eaae1b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/resources/typed-array-test-cases.js
@@ -0,0 +1,90 @@
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// The "name" attribute is a concession to browsers which don't
+// implement the "name" property on function objects.
+var testCases =
+ [ {name: "Float32Array",
+ unsigned: false,
+ integral: false,
+ elementSizeInBytes: 4,
+ testValues: [ -500.5, 500.5 ],
+ expectedValues: [ -500.5, 500.5 ]
+ },
+ {name: "Float64Array",
+ unsigned: false,
+ integral: false,
+ elementSizeInBytes: 8,
+ testValues: [ -500.5, 500.5 ],
+ expectedValues: [ -500.5, 500.5 ]
+ },
+ {name: "Int8Array",
+ unsigned: false,
+ integral: true,
+ elementSizeInBytes: 1,
+ testValues: [ -128, 127, -129, 128 ],
+ expectedValues: [ -128, 127, 127, -128 ]
+ },
+ {name: "Int16Array",
+ unsigned: false,
+ integral: true,
+ elementSizeInBytes: 2,
+ testValues: [ -32768, 32767, -32769, 32768 ],
+ expectedValues: [ -32768, 32767, 32767, -32768 ]
+ },
+ {name: "Int32Array",
+ unsigned: false,
+ integral: true,
+ elementSizeInBytes: 4,
+ testValues: [ -2147483648, 2147483647, -2147483649, 2147483648 ],
+ expectedValues: [ -2147483648, 2147483647, 2147483647, -2147483648 ]
+ },
+ {name: "Uint8Array",
+ unsigned: true,
+ integral: true,
+ elementSizeInBytes: 1,
+ testValues: [ 0, 255, -1, 256 ],
+ expectedValues: [ 0, 255, 255, 0 ]
+ },
+ {name: "Uint8ClampedArray",
+ unsigned: true,
+ integral: true,
+ elementSizeInBytes: 1,
+ testValues: [ 0, 255, -1, 256 ],
+ expectedValues: [ 0, 255, 0, 255 ]
+ },
+ {name: "Uint16Array",
+ unsigned: true,
+ integral: true,
+ elementSizeInBytes: 2,
+ testValues: [ 0, 65535, -1, 65536 ],
+ expectedValues: [ 0, 65535, 65535, 0 ]
+ },
+ {name: "Uint32Array",
+ unsigned: true,
+ integral: true,
+ elementSizeInBytes: 4,
+ testValues: [ 0, 4294967295, -1, 4294967296 ],
+ expectedValues: [ 0, 4294967295, 4294967295, 0 ]
+ }
+ ];
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/resources/typed-array-worker.js b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/resources/typed-array-worker.js
new file mode 100644
index 000000000..c68ee07c2
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/resources/typed-array-worker.js
@@ -0,0 +1,89 @@
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+function constructTypedArray(type, data) {
+ if (type == 'Int8Array') {
+ return new Int8Array(data);
+ } else if (type == 'Uint8Array') {
+ return new Uint8Array(data);
+ } else if (type == 'Uint8ClampedArray') {
+ return new Uint8ClampedArray(data);
+ } else if (type == 'Int16Array') {
+ return new Int16Array(data);
+ } else if (type == 'Uint16Array') {
+ return new Uint16Array(data);
+ } else if (type == 'Int32Array') {
+ return new Int32Array(data);
+ } else if (type == 'Uint32Array') {
+ return new Uint32Array(data);
+ } else if (type == 'Float32Array') {
+ return new Float32Array(data);
+ } else if (type == 'Float64Array') {
+ return new Float64Array(data);
+ }
+}
+
+function constructDataView(subType, elementSizeInBytes, data) {
+ var setter = "set" + subType;
+ var byteOffset = 0;
+ var buffer = new ArrayBuffer(elementSizeInBytes * data.length);
+ var dataView = new DataView(buffer);
+ for (var ii = 0; ii < data.length; ++ii) {
+ dataView[setter](byteOffset, data[ii]);
+ byteOffset += elementSizeInBytes;
+ }
+ return dataView;
+}
+
+onmessage = function(event) {
+ var message = event.data;
+ if (message.command == 'copy' ||
+ message.command == 'transfer' ||
+ message.command == 'copyBuffer' ||
+ message.command == 'transferBuffer') {
+ var view;
+ if (message.type != 'DataView') {
+ view = constructTypedArray(message.type, message.data);
+ } else {
+ view = constructDataView(message.subType, message.elementSizeInBytes, message.data);
+ }
+ var valueToSend;
+ if (message.command == 'copy' ||
+ message.command == 'transfer') {
+ valueToSend = view;
+ } else {
+ valueToSend = view.buffer;
+ }
+ var transferablesToSend = undefined;
+ if (message.command == 'transfer' ||
+ message.command == 'transferBuffer') {
+ transferablesToSend = [ view.buffer ];
+ }
+ postMessage(valueToSend, transferablesToSend);
+ } else if (message.command == 'pong') {
+ postMessage(message.data, message.transferables);
+ } else if (message.command == 'ignore') {
+ } else {
+ postMessage('error: unknown message');
+ }
+};
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/typed-arrays-in-workers.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/typed-arrays-in-workers.html
new file mode 100644
index 000000000..f9d05f565
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/typedarrays/typed-arrays-in-workers.html
@@ -0,0 +1,280 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/test-eval.js"></script>
+<script src="resources/typed-array-test-cases.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+
+var testQueue = [];
+var transferSupported = true;
+
+function nextTest() {
+ if (testQueue[0].subTests.length > 0) {
+ testQueue[0].subTests.shift();
+ }
+
+ while (testQueue.length > 0 && testQueue[0].subTests.length == 0) {
+ testQueue.shift();
+ }
+
+ if (testQueue.length == 0) {
+ finishTest();
+ return;
+ }
+
+ testQueue[0].subTests[0].runner();
+}
+
+function handleMessage(event) {
+ if (testQueue.length == 0)
+ return;
+
+ if (testQueue[0].subTests.length == 0)
+ return;
+
+ testQueue[0].subTests[0].checker(event);
+ nextTest();
+}
+
+function setupTest(testCase, runner, checker) {
+ testCase.subTests.push({ runner: runner.bind(null, testCase), checker: checker.bind(null, testCase) });
+}
+
+function arrayToString(arr) {
+ var result = "[ ";
+ for (var ii = 0; ii < arr.length; ++ii) {
+ if (ii > 0)
+ result += ", ";
+ result += arr[ii];
+ }
+ return result + " ]";
+}
+
+function constructTypedArray(type, data) {
+ if (type == 'Int8Array') {
+ return new Int8Array(data);
+ } else if (type == 'Uint8Array') {
+ return new Uint8Array(data);
+ } else if (type == 'Uint8ClampedArray') {
+ return new Uint8ClampedArray(data);
+ } else if (type == 'Int16Array') {
+ return new Int16Array(data);
+ } else if (type == 'Uint16Array') {
+ return new Uint16Array(data);
+ } else if (type == 'Int32Array') {
+ return new Int32Array(data);
+ } else if (type == 'Uint32Array') {
+ return new Uint32Array(data);
+ } else if (type == 'Float32Array') {
+ return new Float32Array(data);
+ } else if (type == 'Float64Array') {
+ return new Float64Array(data);
+ }
+}
+
+// Test runner / checker pairs
+function runTestWithData(command, testCase) {
+ worker.postMessage({command: command, type: testCase.name, subType: testCase.subType, elementSizeInBytes: testCase.elementSizeInBytes, data: testCase.testValues});
+}
+
+function checkArraysEqual(testKind, testCase, event) {
+ var array = event.data;
+ var testName = testKind + " " + testCase.name + " from worker to main thread";
+ if (areArraysEqual(array, testCase.expectedValues)) {
+ testPassed(testName);
+ } else {
+ testFailed(testName + ": expected " + arrayToString(testCase.expectedValues) + ", received " + arrayToString(array));
+ }
+}
+
+function checkBufferContentsEqual(testKind, testCase, event) {
+ var array = constructTypedArray(testCase.name, event.data);
+ var testName = testKind + " containing " + testCase.name + " values from worker to main thread";
+ if (areArraysEqual(array, testCase.expectedValues)) {
+ testPassed(testName);
+ } else {
+ testFailed(testName + ": expected " + arrayToString(testCase.expectedValues) + ", received " + arrayToString(array));
+ }
+}
+
+function checkDataViewContents(testKind, testCase, event) {
+ var dataView = event.data;
+ var testName = testKind + " " + testCase.name + " containing " + testCase.subType + " from worker to main thread";
+ var byteOffset = 0;
+ var allPassed = true;
+ for (var ii = 0; ii < testCase.expectedValues.length; ++ii) {
+ var expected = testCase.expectedValues[ii];
+ var received = dataView['get' + testCase.subType](byteOffset);
+ if (received != expected) {
+ allPassed = false;
+ testFailed(testName + ": at byte offset " + byteOffset + ": expected " + expected + ", received " + received);
+ }
+ byteOffset += testCase.elementSizeInBytes;
+ }
+ if (allPassed) {
+ testPassed(testName);
+ }
+}
+
+// Missing test: copy or transfer ArrayBuffer, wrap in DataView on this end, verify contents.
+
+function noop() {
+}
+
+function checkArraysEqualAndPingPong(testKind, transfer, testCase, event) {
+ checkArraysEqual(testKind, testCase, event);
+ var transferables = [];
+ if (transfer) {
+ transferables.push(event.data.buffer);
+ }
+ try {
+ worker.postMessage({ command: 'pong', data: event.data, transferables: transferables }, transferables);
+ } catch (e) {
+ testFailed("unexpected exception: " + e);
+ }
+}
+
+function checkBufferContentsEqualAndPingPong(testKind, transfer, testCase, event) {
+ checkBufferContentsEqual(testKind, testCase, event);
+ var transferables = [];
+ if (transfer) {
+ transferables.push(event.data);
+ }
+ try {
+ worker.postMessage({ command: 'pong', data: event.data, transferables: transferables }, transferables);
+ } catch (e) {
+ testFailed("unexpected exception: " + e);
+ }
+}
+
+function checkDataViewContentsAndPingPong(testKind, transfer, testCase, event) {
+ checkDataViewContents(testKind, testCase, event);
+ var transferables = [];
+ if (transfer) {
+ transferables.push(event.data.buffer);
+ }
+ try {
+ worker.postMessage({ command: 'pong', data: event.data, transferables: transferables }, transferables);
+ } catch (e) {
+ testFailed("unexpected exception: " + e);
+ }
+}
+
+description("Tests copying and transferring typed arrays and ArrayBuffers to and from workers");
+
+// See whether workers are supported at all
+if (window.Worker) {
+ // Start up the worker
+ var worker = new Worker('resources/typed-array-worker.js');
+ worker.onmessage = handleMessage;
+
+ // See whether transferables are supported
+ var buffer = new ArrayBuffer(16);
+ try {
+ worker.postMessage({ command: 'ignore', data: buffer }, [buffer]);
+ if (buffer.byteLength > 0)
+ transferSupported = false;
+ } catch (e) {
+ transferSupported = false;
+ }
+
+ // Iterate down the tests, queueing them up
+ for (var ii = 0; ii < testCases.length; ++ii) {
+ var testCase = testCases[ii];
+ testCase.subTests = [];
+ setupTest(testCase, runTestWithData.bind(null, 'copy'), checkArraysEqual.bind(null, 'copy'));
+ setupTest(testCase, runTestWithData.bind(null, 'copyBuffer'), checkBufferContentsEqual.bind(null, 'copy ArrayBuffer'));
+ setupTest(testCase, runTestWithData.bind(null, 'transfer'), checkArraysEqual.bind(null, 'transfer'));
+ setupTest(testCase, runTestWithData.bind(null, 'transferBuffer'), checkBufferContentsEqual.bind(null, 'transfer ArrayBuffer'));
+
+ // These two must run back-to-back
+ setupTest(testCase, runTestWithData.bind(null, 'copy'), checkArraysEqualAndPingPong.bind(null, 'copy', false));
+ setupTest(testCase, noop, checkArraysEqual.bind(null, 'ping-pong with copy'));
+
+ // These two must run back-to-back
+ setupTest(testCase, runTestWithData.bind(null, 'copyBuffer'), checkBufferContentsEqualAndPingPong.bind(null, 'copy ArrayBuffer', false));
+ setupTest(testCase, noop, checkBufferContentsEqual.bind(null, 'ping-pong with copy'));
+
+ // These two must run back-to-back
+ setupTest(testCase, runTestWithData.bind(null, 'transfer'), checkArraysEqualAndPingPong.bind(null, 'transfer', true));
+ setupTest(testCase, noop, checkArraysEqual.bind(null, 'ping-pong with transfer'));
+
+ // These two must run back-to-back
+ setupTest(testCase, runTestWithData.bind(null, 'transferBuffer'), checkBufferContentsEqualAndPingPong.bind(null, 'transfer ArrayBuffer', false));
+ setupTest(testCase, noop, checkBufferContentsEqual.bind(null, 'ping-pong with transfer'));
+
+ testQueue.push(testCase);
+
+ // Add just a couple of DataView tests; the behavior of that view type is thoroughly tested elsewhere
+ if (testCase.name == "Float32Array" || testCase.name == "Int32Array") {
+ var subTypeName = (testCase.name == "Float32Array" ? "Float32" : "Int32");
+ var dataViewTestCase = { name: "DataView",
+ subType: subTypeName,
+ elementSizeInBytes: testCase.elementSizeInBytes,
+ testValues: testCase.testValues,
+ expectedValues: testCase.expectedValues,
+ subTests: [] };
+ setupTest(dataViewTestCase, runTestWithData.bind(null, 'copy'), checkDataViewContents.bind(null, 'copy'));
+ setupTest(dataViewTestCase, runTestWithData.bind(null, 'transfer'), checkDataViewContents.bind(null, 'transfer'));
+
+ // These two must run back-to-back
+ setupTest(dataViewTestCase, runTestWithData.bind(null, 'copy'), checkDataViewContentsAndPingPong.bind(null, 'copy', false));
+ setupTest(dataViewTestCase, noop, checkDataViewContents.bind(null, 'ping-pong with copy'));
+
+ // These two must run back-to-back
+ setupTest(dataViewTestCase, runTestWithData.bind(null, 'transfer'), checkDataViewContentsAndPingPong.bind(null, 'transfer', false));
+ setupTest(dataViewTestCase, noop, checkDataViewContents.bind(null, 'ping-pong with transfer'));
+
+ testQueue.push(dataViewTestCase);
+ }
+ }
+
+ // Kick things off
+ testQueue[0].subTests[0].runner();
+} else {
+ debug("Workers not supported -- skipping test");
+ finishTest();
+}
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/00_test_list.txt b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/00_test_list.txt
new file mode 100644
index 000000000..008515acb
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/00_test_list.txt
@@ -0,0 +1,12 @@
+gl-uniform-arrays.html
+# This test is no longer valid with the new packing restrictions
+#--min-version 1.0.02 gl-uniform-unused-array-elements-get-truncated.html
+gl-uniform-bool.html
+gl-uniformmatrix4fv.html
+gl-unknown-uniform.html
+null-uniform-location.html
+--min-version 1.0.2 out-of-bounds-uniform-array-access.html
+--min-version 1.0.2 uniform-default-values.html
+--min-version 1.0.3 uniform-values-per-program.html
+uniform-location.html
+uniform-samplers-test.html
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-arrays.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-arrays.html
new file mode 100644
index 000000000..4285d9d4e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-arrays.html
@@ -0,0 +1,512 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL uniform array Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="example" width="2" height="2"> </canvas>
+<script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 a_position;
+ void main()
+ {
+ gl_Position = a_position;
+ }
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+ precision mediump float;
+ uniform $(type) color[3];
+ void main()
+ {
+ gl_FragColor = vec4(color[0]$(elem), color[1]$(elem), color[2]$(elem), 1);
+ }
+</script>
+<script id="fshader-max" type="x-shader/x-fragment">
+ precision mediump float;
+ uniform vec4 colora[$(maxUniformVectors)];
+ void main()
+ {
+ gl_FragColor = vec4(colora[$(usedUniformVector)]);
+ }
+</script>
+<script id="fshader-max-ab-ab" type="x-shader/x-fragment">
+ precision mediump float;
+ uniform vec4 $(decl1);
+ uniform vec4 $(decl2);
+ void main()
+ {
+ gl_FragColor = vec4($(usage1) + $(usage2));
+ }
+</script>
+<script>
+"use strict";
+description();
+debug("");
+// MaxInt32 is 2^32-1. We need +1 of that to test overflow conditions.
+var MaxInt32PlusOne = 4294967296;
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+
+var vSrc = wtu.getScript("vshader");
+var fTemplate = wtu.getScript("fshader");
+
+var typeInfos = [
+ { type: 'float',
+ jsTypeOf: 'number',
+ setter: 'uniform1fv',
+ elem: '',
+ numSrcValues: 3,
+ invalidSet: function(loc) {
+ gl.uniform2fv(loc, [1, 2]);
+ },
+ srcValueAsString: function(index, srcValues) {
+ return srcValues[index].toString();
+ },
+ returnValueAsString: function(value) {
+ return value === null ? 'null' : value.toString();
+ },
+ checkType: function(value) {
+ return typeof value === 'number';
+ },
+ checkValue: function(typeInfo, index, value) {
+ return typeInfo.srcValues[index] == value;
+ },
+ srcValues: [16, 15, 14],
+ srcValuesLess: [],
+ srcValuesLessMultiple: [16],
+ srcValuesMoreMultiple: [16, 15, 14, 13],
+ srcValuesNonMultiple: null,
+ },
+ { type: 'vec2',
+ jsTypeOf: 'Float32Array',
+ setter: 'uniform2fv',
+ elem: '[1]',
+ numSrcValues: 3,
+ invalidSet: function(loc) {
+ gl.uniform1fv(loc, [2]);
+ },
+ illegalSet: function(loc) {
+ gl.uniform1fv(loc, 2);
+ },
+ srcValueAsString: function(index, srcValues) {
+ return "[" + srcValues[index * 2 + 0].toString() + ", " +
+ srcValues[index * 2 + 1].toString() + "]";
+ },
+ returnValueAsString: function(value) {
+ return value === null ? 'null' : ("[" + value[0] + ", " + value[1] + "]");
+ },
+ checkType: function(value) {
+ return value &&
+ typeof value.length === 'number' &&
+ value.length == 2;
+ },
+ checkValue: function(typeInfo, index, value) {
+ return value !== null &&
+ typeInfo.srcValues[index * 2 + 0] == value[0] &&
+ typeInfo.srcValues[index * 2 + 1] == value[1];
+ },
+ srcValues: [16, 15, 14, 13, 12, 11],
+ srcValuesLess: [16],
+ srcValuesLessMultiple: [16, 15, 14, 13],
+ srcValuesMoreMultiple: [16, 15, 14, 13, 12, 11, 10, 9],
+ srcValuesNonMultiple: [16, 15, 14, 13, 12, 11, 10],
+ },
+ { type: 'vec3',
+ jsTypeOf: 'Float32Array',
+ setter: 'uniform3fv',
+ elem: '[2]',
+ numSrcValues: 3,
+ invalidSet: function(loc) {
+ gl.uniform1fv(loc, [2]);
+ },
+ illegalSet: function(loc) {
+ gl.uniform1fv(loc, 2);
+ },
+ srcValueAsString: function(index, srcValues) {
+ return "[" + srcValues[index * 3 + 0].toString() + ", " +
+ srcValues[index * 3 + 1].toString() + ", " +
+ srcValues[index * 3 + 2].toString() + "]";
+ },
+ returnValueAsString: function(value) {
+ return value === null ? 'null' :
+ ("[" + value[0] + ", " + value[1] + ", " + value[2] + "]");
+ },
+ checkType: function(value) {
+ return value &&
+ typeof value.length === 'number' &&
+ value.length == 3;
+ },
+ checkValue: function(typeInfo, index, value) {
+ return value !== null &&
+ typeInfo.srcValues[index * 3 + 0] == value[0] &&
+ typeInfo.srcValues[index * 3 + 1] == value[1] &&
+ typeInfo.srcValues[index * 3 + 2] == value[2];
+ },
+ srcValues: [16, 15, 14, 13, 12, 11, 10, 9, 8],
+ srcValuesLess: [16, 15],
+ srcValuesLessMultiple: [16, 15, 14, 13, 12, 11],
+ srcValuesMoreMultiple: [16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2],
+ srcValuesNonMultiple: [16, 15, 14, 13, 12, 11, 10, 9, 8, 7],
+ },
+ { type: 'vec4',
+ jsTypeOf: 'Float32Array',
+ setter: 'uniform4fv',
+ elem: '[3]',
+ numSrcValues: 3,
+ invalidSet: function(loc) {
+ gl.uniform1fv(loc, [2]);
+ },
+ illegalSet: function(loc) {
+ gl.uniform1fv(loc, 2);
+ },
+ srcValueAsString: function(index, srcValues) {
+ return "[" + srcValues[index * 4 + 0].toString() + ", " +
+ srcValues[index * 4 + 1].toString() + ", " +
+ srcValues[index * 4 + 2].toString() + ", " +
+ srcValues[index * 4 + 3].toString() + "]";
+ },
+ returnValueAsString: function(value) {
+ return value === null ? 'null' :
+ ("[" + value[0] + ", " + value[1] +
+ ", " + value[2] + ", " + value[3] + "]");
+ },
+ checkType: function(value) {
+ return value &&
+ typeof value.length === 'number' &&
+ value.length == 4;
+ },
+ checkValue: function(typeInfo, index, value) {
+ return value !== null &&
+ typeInfo.srcValues[index * 4 + 0] == value[0] &&
+ typeInfo.srcValues[index * 4 + 1] == value[1] &&
+ typeInfo.srcValues[index * 4 + 2] == value[2] &&
+ typeInfo.srcValues[index * 4 + 3] == value[3];
+ },
+ srcValues: [16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5],
+ srcValuesLess: [16, 15, 14],
+ srcValuesLessMultiple: [16, 15, 14, 13, 12, 11, 10, 9],
+ srcValuesMoreMultiple: [16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],
+ srcValuesNonMultiple: [16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4],
+ }
+];
+
+for (var tt = 0; tt < typeInfos.length; ++tt) {
+ var typeInfo = typeInfos[tt];
+ debug("");
+ debug("check " + typeInfo.type);
+ var fSrc = wtu.replaceParams(fTemplate, typeInfo);
+ //debug("fSrc: " + fSrc);
+ var program = wtu.loadProgram(gl, vSrc, fSrc);
+
+ var numUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);
+ assertMsg(numUniforms == 1, "1 uniform found");
+ var info = gl.getActiveUniform(program, 0);
+ assertMsg(info.name == "color[0]",
+ "uniform name is 'color[0]' not 'color' as per OpenGL ES 2.0.24 section 2.10");
+ shouldBeNull("gl.getUniformLocation(program, 'color[" + MaxInt32PlusOne + "]');");
+ var loc = gl.getUniformLocation(program, "color[0]");
+ var srcValues = typeInfo.srcValues;
+ var srcValuesLess = typeInfo.srcValuesLess;
+ var srcValuesLessMultiple = typeInfo.srcValuesLessMultiple;
+ var srcValuesMoreMultiple = typeInfo.srcValuesMoreMultiple;
+ var srcValuesNonMultiple = typeInfo.srcValuesNonMultiple;
+
+ // Try setting the value before using the program
+ gl[typeInfo.setter](loc, srcValues);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "should fail if there is no current program");
+
+ gl.useProgram(program);
+ gl[typeInfo.setter](loc, srcValuesLess);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE,
+ "should fail with insufficient array size with gl." + typeInfo.setter);
+ if (srcValuesNonMultiple) {
+ gl[typeInfo.setter](loc, srcValuesNonMultiple);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE,
+ "should fail with non-multiple array size with gl." + typeInfo.setter);
+ }
+ gl[typeInfo.setter](loc, srcValues);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "can set an array of uniforms with gl." + typeInfo.setter);
+ gl[typeInfo.setter](loc, srcValuesLessMultiple);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "can partially set an array of uniforms with gl." + typeInfo.setter + " with a smaller array");
+ gl[typeInfo.setter](loc, srcValuesMoreMultiple);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "can set an array of uniforms with gl." + typeInfo.setter + " with a larger array");
+
+ var values = gl.getUniform(program, loc);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "can call gl.getUniform");
+ assertMsg(typeInfo.checkType(values),
+ "gl.getUniform returns the correct type.");
+ for (var ii = 0; ii < typeInfo.numSrcValues; ++ii) {
+ shouldBeNull("gl.getUniformLocation(program, 'color[" + (MaxInt32PlusOne + ii) + "]')");
+ var elemLoc = gl.getUniformLocation(program, "color[" + ii + "]");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "can get location of element " + ii +
+ " of array from gl.getUniformLocation");
+ var value = gl.getUniform(program, elemLoc);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "can get value of element " + ii + " of array from gl.getUniform");
+ assertMsg(typeInfo.checkValue(typeInfo, ii, value),
+ "value put in (" + typeInfo.srcValueAsString(ii, srcValues) +
+ ") matches value pulled out (" +
+ typeInfo.returnValueAsString(value) + ")");
+ }
+ typeInfo.invalidSet(loc);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "using the wrong size of gl.Uniform fails");
+ var exceptionCaught = false;
+ if (typeInfo.illegalSet) {
+ try {
+ typeInfo.illegalSet(loc);
+ } catch (e) {
+ exceptionCaught = true;
+ }
+ assertMsg(exceptionCaught, "passing non-array to glUniform*fv should throw TypeError");
+ }
+
+ gl.useProgram(null);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "can call gl.useProgram(null)");
+}
+
+// This test is to test drivers the have bugs related to optimizing
+// an array of uniforms when only 1 of those uniforms is used.
+debug("");
+debug("Test drivers don't over optimize unused array elements");
+var maxUniformVectors = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS);
+var tests = [
+ { desc: "using last element",
+ maxUniformVectors: maxUniformVectors,
+ usedUniformVector: maxUniformVectors - 1,
+ shader: "fshader-max",
+ color: [0, 1, 0, 1],
+ arrayName: "colora",
+ extraName: "colorb",
+ },
+ { desc: "using first element",
+ maxUniformVectors: maxUniformVectors,
+ usedUniformVector: 0,
+ shader: "fshader-max",
+ color: [0, 1, 0, 1],
+ arrayName: "colora",
+ extraName: "colorb",
+ },
+];
+
+// Generate test shaders. We're trying to force the driver to
+// overflow from 1 array into the next if it optimizes. So for example if it was C
+//
+// int big[4];
+// int little[1];
+// big[5] = 124;
+//
+// Would end up setting little[0] instead of big. Some drivers optimize
+// where if you only use say 'big[3]' it will actually only allocate just 1 element
+// for big.
+//
+// But, some drivers have a bug where the fact that they optimized big to 1 element
+// does not get passed down to glUniform so when setting the uniform 'big[3]' they
+// overwrite memory.
+//
+// If the driver crashes, yea. We found a bug. We can blacklist the driver.
+// Otherwise we try various combinations so that setting 'little[0]' first
+// and then setting all elements of 'big' we hope it will overwrite 'little[0]'
+// which will show the bug and again we can blacklist the driver.
+//
+// We don't know how the driver will order, in memory, the various uniforms
+// or for that matter we don't even know if they will be contiguous in memory
+// but to hopefully expose any bugs we try various combinations.
+//
+// It could be the compiler orders uniforms alphabetically.
+// It could be it orders them in order of declaration.
+// It could be it orders them in order of usage.
+//
+// We also test using only first element of big or just the last element of big.
+//
+for (var nameOrder = 0; nameOrder < 2; ++nameOrder) {
+ var name1 = nameOrder ? "colora" : "colorb";
+ var name2 = nameOrder ? "colorb" : "colora";
+ for (var last = 0; last < 2; ++last) {
+ var usedUniformVector = last ? maxUniformVectors - 2 : 0;
+ for (var declOrder = 0; declOrder < 2; ++declOrder) {
+ var bigName = declOrder ? name1 : name2;
+ var littleName = declOrder ? name2 : name1;
+ var decl1 = bigName + "[" + (maxUniformVectors - 1) + "]";
+ var decl2 = littleName + "[1]";
+ if (declOrder) {
+ var t = decl1;
+ decl1 = decl2;
+ decl2 = t;
+ }
+ for (var usageOrder = 0; usageOrder < 2; ++usageOrder) {
+ var usage1 = bigName + "[" + usedUniformVector + "]";
+ var usage2 = littleName + "[0]";
+ if (usageOrder) {
+ var t = usage1;
+ usage1 = usage2;
+ usage2 = t;
+ }
+ var fSrc = wtu.replaceParams(wtu.getScript("fshader-max-ab-ab"), {
+ decl1: decl1,
+ decl2: decl2,
+ usage1: usage1,
+ usage2: usage2,
+ });
+ var desc = "testing: " + name1 + ":" + name2 + " using " + (last ? "last" : "first") +
+ " creating uniforms " + decl1 + " " + decl2 + " and accessing " + usage1 + " " + usage2;
+ tests.push({
+ desc: desc,
+ maxUniformVectors: maxUniformVectors - 1,
+ usedUniformVector: usedUniformVector,
+ source: fSrc,
+ color: [0, 0, 0, 1],
+ arrayName: bigName,
+ extraName: littleName,
+ });
+ }
+ }
+ }
+}
+
+var allRequiredUniformLocationsQueryable = true;
+function testUniformOptimizationIssues(testIndex) {
+ var test = tests[testIndex];
+ debug("");
+ debug(test.desc);
+ var fSrc = test.source;
+ if (!fSrc) {
+ fSrc = wtu.replaceParams(wtu.getScript(test.shader), test);
+ }
+
+ var consoleElem = document.getElementById("console");
+ wtu.addShaderSource(
+ consoleElem, "vertex shader", vSrc);
+ wtu.addShaderSource(
+ consoleElem, "fragment shader", fSrc);
+
+ var program = wtu.loadProgram(gl, vSrc, fSrc);
+ gl.useProgram(program);
+
+ var colorbLocation = gl.getUniformLocation(program, test.extraName + "[0]");
+ if (colorbLocation) {
+ gl.uniform4fv(colorbLocation, [0, 1, 0, 0]);
+ }
+
+ // Ensure that requesting an array uniform past MaxInt32PlusOne returns no uniform
+ var nameMaxInt32PlusOne = test.arrayName + "[" + (test.usedUniformVector + MaxInt32PlusOne) + "]";
+ assertMsg(gl.getUniformLocation(program, nameMaxInt32PlusOne) === null,
+ "Requesting " + nameMaxInt32PlusOne + " uniform should return a null uniform location");
+
+ // Set just the used uniform
+ var name = test.arrayName + "[" + test.usedUniformVector + "]";
+ var uniformLocation = gl.getUniformLocation(program, name);
+ gl.uniform4fv(uniformLocation, test.color);
+ wtu.setupIndexedQuad(gl, 1, positionLoc);
+ wtu.clearAndDrawIndexedQuad(gl, 1);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+
+ // Set all the unused uniforms
+ var locations = [];
+ allRequiredUniformLocationsQueryable = true;
+ for (var ii = 0; ii < test.maxUniformVectors; ++ii) {
+ var name = test.arrayName + "[" + ii + "]";
+ var uniformLocation = gl.getUniformLocation(program, name);
+ locations.push(uniformLocation);
+ if (ii == test.usedUniformVector) {
+ continue;
+ }
+ // Locations > usedUnformVector may not exist.
+ // Locations <= usedUniformVector MUST exist.
+ if (ii <= test.usedUniformVector && (uniformLocation === undefined || uniformLocation === null)) {
+ allRequiredUniformLocationsQueryable = false;
+ }
+ gl.uniform4fv(uniformLocation, [1, 0, 0, 1]);
+ }
+ shouldBeTrue("allRequiredUniformLocationsQueryable");
+ var positionLoc = gl.getAttribLocation(program, "a_position");
+ wtu.setupIndexedQuad(gl, 1, positionLoc);
+ wtu.clearAndDrawIndexedQuad(gl, 1);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
+
+ // Check we can read & write each uniform.
+ // Note: uniforms past test.usedUniformVector might not exist.
+ for (var ii = 0; ii < test.maxUniformVectors; ++ii) {
+ gl.uniform4fv(locations[ii], [ii + 4, ii + 2, ii + 3, ii + 1]);
+ }
+
+ var kEpsilon = 0.01;
+ var isSame = function(v1, v2) {
+ return Math.abs(v1 - v2) < kEpsilon;
+ };
+
+ for (var ii = 0; ii < test.maxUniformVectors; ++ii) {
+ var location = locations[ii];
+ if (location) {
+ var value = gl.getUniform(program, locations[ii]);
+ if (!isSame(value[0], ii + 4) ||
+ !isSame(value[1], ii + 2) ||
+ !isSame(value[2], ii + 3) ||
+ !isSame(value[3], ii + 1)) {
+ testFailed("location: " + ii + " was not correct value");
+ break;
+ }
+ }
+ }
+}
+
+var testIndex = 0;
+function runNextTest() {
+ testUniformOptimizationIssues(testIndex++);
+ if (testIndex < tests.length) {
+ setTimeout(runNextTest, 0);
+ } else {
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors");
+ debug("");
+ finishTest();
+ }
+}
+runNextTest();
+
+var successfullyParsed = true;
+
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-bool.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-bool.html
new file mode 100644
index 000000000..9383f6f84
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-bool.html
@@ -0,0 +1,82 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL uniformMatrix Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="example" width="2" height="2"> </canvas>
+ <script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+ </script>
+
+ <script id="fshader" type="x-shader/x-fragment">
+ uniform bool color;
+ void main()
+ {
+ gl_FragColor = vec4(float(color),0.0,0.0,1.0);
+ }
+ </script>
+<script>
+"use strict";
+description("This test ensures WebGL implementations handle bool uniforms in a OpenGL ES 2.0 spec compliant way");
+
+debug("");
+debug("NOTE: Some OpenGL drivers do not handle this correctly");
+debug("");
+debug("Checking gl.uniform1f with bool.");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+var loc = gl.getUniformLocation(program, "color");
+gl.uniform1f(loc, 1);
+wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "should be able to set bool with gl.uniform1f");
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniformmatrix4fv.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniformmatrix4fv.html
new file mode 100644
index 000000000..a283b50e7
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniformmatrix4fv.html
@@ -0,0 +1,106 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL uniformMatrix Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="example" width="2" height="2"> </canvas>
+
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+uniform mat4 world4;
+uniform mat3 world3;
+uniform mat2 world2;
+void main()
+{
+ gl_Position = vec4(vPosition.xyz, world3[0].x + world2[0].x) * world4;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+void main()
+{
+ gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+}
+</script>
+
+<script>
+"use strict";
+description("This test ensures WebGL implementations handle uniformMatrix in a OpenGL ES 2.0 spec compliant way");
+
+debug("");
+debug("Checking gl.uniformMatrix.");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("example");
+var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+for (var ii = 2; ii <= 4; ++ii) {
+ var loc = gl.getUniformLocation(program, "world" + ii);
+ var matLess = [];
+ for (var jj = 0; jj < ii; ++jj) {
+ for (var ll = 0; ll < ii; ++ll) {
+ if (jj == ii - 1 && ll == ii - 1)
+ continue;
+ matLess[jj * ii + ll] = (jj == ll) ? 1 : 0;
+ }
+ }
+ var mat = matLess.concat([1]);
+ var matMore = mat.concat([1]);
+ name = "uniformMatrix" + ii + "fv";
+ gl[name](loc, false, matLess);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "should fail with insufficient array size for " + name);
+ gl[name](loc, false, mat);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should succeed with correct array size for " + name);
+ gl[name](loc, false, matMore);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "should fail with more than 1 array size for " + name);
+
+ mat[ii * ii - 1] = 1;
+ gl[name](loc, false, mat);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "can call " + name + "with transpose = false");
+ gl[name](loc, true, mat);
+ wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, name + " should return INVALID_VALUE with transpose = true");
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-unknown-uniform.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-unknown-uniform.html
new file mode 100644
index 000000000..e2a598768
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/gl-unknown-uniform.html
@@ -0,0 +1,91 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Unknown Uniform Conformance Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script id="vshader" type="x-shader/x-vertex">
+ attribute vec4 vPosition;
+ void main()
+ {
+ gl_Position = vPosition;
+ }
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+ void main()
+ {
+ gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+ }
+</script>
+<script>
+"use strict";
+description("Tests that unknown uniforms don't cause errors.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext("canvas");
+if (!gl) {
+ testFailed("context does not exist");
+} else {
+ testPassed("context exists");
+
+ debug("");
+
+ var program = wtu.setupProgram(gl, ["vshader", "fshader"], ["vPosition"]);
+ // Get the location of an unknown uniform.
+ var loc = gl.getUniformLocation(program, "someUnknownUniform");
+ assertMsg(loc === null, "location of unknown uniform should be null");
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "there should be no error from getting an unknown uniform");
+ gl.uniform1f(loc, 1);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "there should be no error from trying to set an unknown uniform");
+}
+
+debug("");
+var successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html
new file mode 100644
index 000000000..3151ef2ff
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html
@@ -0,0 +1,104 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Tests calling the various uniform[Matrix]* APIs with a null uniform location");
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+var program = wtu.loadStandardProgram(gl);
+
+wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined("gl.useProgram(program)");
+var floatArray = new Float32Array([1, 2, 3, 4]);
+var intArray = new Int32Array([1, 2, 3, 4]);
+
+function callUniformFunction(name) {
+ var isArrayVariant = (name.charAt(name.length - 1) == 'v');
+ var isMatrix = (name.indexOf("Matrix") != -1);
+ var isFloat =
+ (name.charAt(name.length - 1) == 'f' ||
+ name.charAt(name.length - 2) == 'f');
+ var sizeIndex = (isArrayVariant ? name.length - 3 : name.length - 2);
+ var size = parseInt(name.substring(sizeIndex, sizeIndex + 1));
+ // Initialize argument list with null uniform location
+ var args = [ null ];
+ if (isArrayVariant) {
+ // Call variant which takes values as array
+ if (isMatrix) {
+ size = size * size;
+ args.push(false);
+ }
+ var array = (isFloat ? new Float32Array(size) : new Int32Array(size));
+ for (var i = 0; i < size; i++) {
+ array[i] = i;
+ }
+ args.push(array);
+ } else {
+ // Call variant which takes values as parameters
+ for (var i = 0; i < size; i++) {
+ args.push(i);
+ }
+ }
+ var func = gl[name];
+ return func.apply(gl, args);
+}
+
+var funcs = [ "uniform1f", "uniform1fv", "uniform1i", "uniform1iv",
+ "uniform2f", "uniform2fv", "uniform2i", "uniform2iv",
+ "uniform3f", "uniform3fv", "uniform3i", "uniform3iv",
+ "uniform4f", "uniform4fv", "uniform4i", "uniform4iv",
+ "uniformMatrix2fv", "uniformMatrix3fv", "uniformMatrix4fv" ];
+var callString;
+
+for (var i = 0; i < funcs.length; i++) {
+ callString = "callUniformFunction('" + funcs[i] + "')";
+ shouldBeUndefined(callString);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR);
+}
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html
new file mode 100644
index 000000000..530c45d89
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html
@@ -0,0 +1,191 @@
+<!--
+
+/*
+** Copyright (c) 2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL out of bounds uniform array access.</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<canvas id="example" width="128" height="128" style="background: black;">
+</canvas>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+varying vec4 v_color;
+uniform float lineWidth;
+uniform int elemMult;
+uniform vec4 colorArray[6];
+void main()
+{
+ vec2 texcoord = vec2(vPosition.xy * 0.5 + vec2(0.5, 0.5));
+ int index = int(texcoord.x + texcoord.y * lineWidth) * elemMult;
+ v_color = colorArray[index];
+ gl_Position = vPosition;
+ gl_PointSize = 1.0;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 v_color;
+void main()
+{
+ gl_FragColor = v_color;
+}
+</script>
+<script>
+"use strict";
+debug("Tests a WebGL program that accesses out of bounds uniform array elements");
+
+var gl;
+var gridRes = 127;
+var lineWidthLoc;
+var elemMultLoc;
+var width = 128;
+var height = 128;
+var pixels = new Uint8Array(width * height * 4);
+
+var lineWidth = 0;
+var elemMult = 0;
+
+var knownColors = [
+ 1.0, 0.0, 0.0, 1.0, // Red
+ 0.0, 1.0, 0.0, 1.0, // Green
+ 0.0, 0.0, 1.0, 1.0, // Blue
+ 0.0, 1.0, 1.0, 1.0, // Cyan
+ 1.0, 0.0, 1.0, 1.0, // Magenta
+ 1.0, 1.0, 0.0, 1.0 // Yellow
+];
+
+function main() {
+ var wtu = WebGLTestUtils;
+ gl = wtu.create3DContext("example");
+ var program = wtu.setupProgram(
+ gl,
+ ['vshader', 'fshader'],
+ ['vPosition'], [0]);
+
+ // setupQuad produces the geometry we want for a gridRes x gridRes grid
+ // of points. No interpolation will be performed across the points, so
+ // according to the WebGL specification for out-of-bounds array accesses,
+ // we will get exactly the input colors from the uniform colorArray, or
+ // zero, for each pixel on the canvas.
+ wtu.setupIndexedQuad(gl, gridRes, 0);
+ var colorArrayLoc = gl.getUniformLocation(program, "colorArray[0]");
+ assertMsg(colorArrayLoc != null, "color array uniform should be found");
+ var colors = new Float32Array(knownColors);
+ gl.uniform4fv(colorArrayLoc, colors);
+ lineWidthLoc = gl.getUniformLocation(program, "lineWidth");
+ elemMultLoc = gl.getUniformLocation(program, "elemMult");
+ assertMsg(gl.getError() == gl.NO_ERROR, "Should be no errors from setup.");
+ runOneIteration();
+}
+
+function withinEpsilon(val1, val2) {
+ return Math.abs(val1 - val2) < 0.0001;
+}
+
+function isKnownColor(r, g, b) {
+ if (r == 0 && g == 0 && b == 0)
+ return true;
+ for (var ii = 0; ii < knownColors.length; ii += 4) {
+ if (withinEpsilon(r / 255.0, knownColors[ii + 0]) &&
+ withinEpsilon(g / 255.0, knownColors[ii + 1]) &&
+ withinEpsilon(b / 255.0, knownColors[ii + 2]))
+ return true;
+ }
+ return false;
+}
+
+function runOneIteration() {
+ if (elemMult < 2048) {
+ var ok = true;
+ var startingLineWidth = lineWidth;
+ var firstFailingPixel = null;
+ var firstFailingValue = null;
+ for (; lineWidth < 2540; lineWidth += 31) {
+ // Draw
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ gl.uniform1f(lineWidthLoc, lineWidth);
+ gl.uniform1i(elemMultLoc, elemMult);
+ gl.drawArrays(gl.POINTS, 0, gridRes * gridRes);
+
+ // Read back
+ gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
+
+ // Verify
+ for (var y = 0; y < height; ++y) {
+ for (var x = 0; x < width; ++x) {
+ if (!isKnownColor(pixels[4 * (width * y + x) + 0],
+ pixels[4 * (width * y + x) + 1],
+ pixels[4 * (width * y + x) + 2])) {
+ ok = false;
+ if (firstFailingPixel == null) {
+ firstFailingPixel = [x, y];
+ firstFailingValue = [pixels[4 * (width * y + x) + 0],
+ pixels[4 * (width * y + x) + 1],
+ pixels[4 * (width * y + x) + 2]];
+ }
+ }
+ }
+ }
+ }
+ var endingLineWidth = lineWidth - 31;
+ lineWidth -= 2540;
+ if (ok) {
+ testPassed("Good rendering results for lineWidths " +
+ startingLineWidth + "..." + endingLineWidth +
+ " at elemMult=" + elemMult);
+ } else {
+ testFailed("for lineWidth=" + lineWidth + ", elemMult=" + elemMult +
+ ": first failing pixel (" + firstFailingPixel[0] + ", " + firstFailingPixel[1] + ") was (" +
+ firstFailingValue[0] + ", " +
+ firstFailingValue[1] + ", " +
+ firstFailingValue[2] + "), should be (0, 0, 0) or one of known colors");
+ }
+ elemMult += 73;
+ setTimeout(runOneIteration, 0);
+ } else {
+ finishTest();
+ }
+}
+
+main();
+
+var successfullyParsed = true;
+
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-default-values.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-default-values.html
new file mode 100644
index 000000000..4ddd334a6
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-default-values.html
@@ -0,0 +1,362 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL uniform default values</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+<script src="../../resources/test-eval.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="example" width="2" height="2"> </canvas>
+<script id="vshader0" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+<script id="fshader0" type="x-shader/x-fragment">
+precision mediump float;
+uniform $(type) u_uniform;
+
+bool isZero($(type) value) {
+ $(check);
+}
+
+void main()
+{
+ gl_FragColor = isZero(u_uniform) ? vec4(0,1,0,1) : vec4(1,0,0,1);
+}
+</script>
+<script id="vshader1" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+varying vec4 v_color;
+uniform $(type) u_uniform;
+
+bool isZero($(type) value) {
+ $(check);
+}
+
+void main()
+{
+ gl_Position = vPosition;
+ v_color = isZero(u_uniform) ? vec4(0,1,0,1) : vec4(1,0,0,1);
+}
+</script>
+<script id="fshader1" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 v_color;
+void main()
+{
+ gl_FragColor = v_color;
+}
+</script>
+<script id="vshader2" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
+}
+</script>
+<script id="fshader2" type="x-shader/x-fragment">
+precision mediump float;
+uniform $(type) u_uniform[2];
+
+bool isZero($(type) value) {
+ $(check);
+}
+
+void main()
+{
+ gl_FragColor = isZero(u_uniform[1]) ? vec4(0,1,0,1) : vec4(1,0,0,1);
+}
+</script>
+<script id="vshader3" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+varying vec4 v_color;
+uniform $(type) u_uniform[2];
+
+bool isZero($(type) value) {
+ $(check);
+}
+
+void main()
+{
+ gl_Position = vPosition;
+ v_color = isZero(u_uniform[1]) ? vec4(0,1,0,1) : vec4(1,0,0,1);
+}
+</script>
+<script id="fshader3" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 v_color;
+void main()
+{
+ gl_FragColor = v_color;
+}
+</script>
+<script>
+"use strict";
+description();
+
+var tests = [
+{ type: 'float',
+ check: "return value == 0.0",
+ setFn: function(gl, loc) { gl.uniform1f(loc, 3.0); }
+},
+{ type: 'int',
+ check: "return value == 0",
+ setFn: function(gl, loc) { gl.uniform1i(loc, 3.0); }
+},
+{ type: 'bool',
+ check: "return value == false",
+ setFn: function(gl, loc) { gl.uniform1i(loc, 1); }
+},
+{ type: 'vec2',
+ check: "return value[0] == 0.0 && value[1] == 0.0",
+ setFn: function(gl, loc) { gl.uniform2f(loc, 3.0, 3.0); }
+},
+{ type: 'vec3',
+ check: "return value[0] == 0.0 && value[1] == 0.0 && value[2] == 0.0",
+ setFn: function(gl, loc) { gl.uniform3f(loc, 3.0, 3.0, 3.0); }
+},
+{ type: 'vec4',
+ check: "return value[0] == 0.0 && value[1] == 0.0 && value[2] == 0.0 && value[3] == 0.0",
+ setFn: function(gl, loc) { gl.uniform4f(loc, 3.0, 3.0, 3.0, 3.0); }
+},
+{ type: 'ivec2',
+ check: "return value[0] == 0 && value[1] == 0",
+ setFn: function(gl, loc) { gl.uniform2i(loc, 3, 3); }
+},
+{ type: 'ivec3',
+ check: "return value[0] == 0 && value[1] == 0 && value[2] == 0",
+ setFn: function(gl, loc) { gl.uniform3i(loc, 3, 3, 3); }
+},
+{ type: 'ivec4',
+ check: "return value[0] == 0 && value[1] == 0 && value[2] == 0 && value[3] == 0",
+ setFn: function(gl, loc) { gl.uniform4i(loc, 3, 3, 3, 3); }
+},
+{ type: 'bvec2',
+ check: "return value[0] == false && value[1] == false",
+ setFn: function(gl, loc) { gl.uniform2i(loc, 1, 1); }
+},
+{ type: 'bvec3',
+ check: "return value[0] == false && value[1] == false && value[2] == false",
+ setFn: function(gl, loc) { gl.uniform3i(loc, 1, 1, 1); }
+},
+{ type: 'bvec4',
+ check: "return value[0] == false && value[1] == false && value[2] == false && value[3] == false",
+ setFn: function(gl, loc) { gl.uniform4i(loc, 1, 1, 1, 1); }
+},
+{ type: 'mat2',
+ check:
+ "return " +
+ "value[0][0] == 0.0 && value[0][1] == 0.0 && " +
+ "value[1][0] == 0.0 && value[1][0] == 0.0",
+ valueCheck:
+ "return " +
+ "value[0] == 0.0 && value[1] == 0.0 && " +
+ "value[2] == 0.0 && value[3] == 0.0",
+ setFn: function(gl, loc) { gl.uniformMatrix2fv(loc, false, [1, 1, 1, 1]); }
+},
+{ type: 'mat3',
+ check:
+ "return " +
+ "value[0][0] == 0.0 && value[1][0] == 0.0 && value[2][0] == 0.0 && " +
+ "value[0][1] == 0.0 && value[1][1] == 0.0 && value[2][1] == 0.0 && " +
+ "value[0][2] == 0.0 && value[1][2] == 0.0 && value[2][2] == 0.0",
+ valueCheck:
+ "return " +
+ "value[0] == 0.0 && value[1] == 0.0 && value[2] == 0.0 && " +
+ "value[3] == 0.0 && value[4] == 0.0 && value[5] == 0.0 && " +
+ "value[6] == 0.0 && value[7] == 0.0 && value[8] == 0.0",
+ setFn: function(gl, loc) { gl.uniformMatrix3fv(loc, false, [1, 1, 1, 1, 1, 1, 1, 1, 1]); }
+},
+{ type: 'mat4',
+ check:
+ "return " +
+ "value[0][0] == 0.0 && value[1][0] == 0.0 && value[2][0] == 0.0 && value[3][0] == 0.0 && " +
+ "value[0][1] == 0.0 && value[1][1] == 0.0 && value[2][1] == 0.0 && value[3][1] == 0.0 && " +
+ "value[0][2] == 0.0 && value[1][2] == 0.0 && value[2][2] == 0.0 && value[3][2] == 0.0 && " +
+ "value[0][3] == 0.0 && value[1][3] == 0.0 && value[2][3] == 0.0 && value[3][3] == 0.0",
+ valueCheck:
+ "return " +
+ "value[ 0] == 0.0 && value[ 1] == 0.0 && value[ 2] == 0.0 && value[ 3] == 0.0 && " +
+ "value[ 4] == 0.0 && value[ 5] == 0.0 && value[ 6] == 0.0 && value[ 7] == 0.0 && " +
+ "value[ 8] == 0.0 && value[ 9] == 0.0 && value[10] == 0.0 && value[11] == 0.0 && " +
+ "value[12] == 0.0 && value[13] == 0.0 && value[14] == 0.0 && value[15] == 0.0",
+ setFn: function(gl, loc) { gl.uniformMatrix4fv(loc, false, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]); }
+},
+{ type: 'sampler2D',
+ check:
+ "vec4 v = texture2D(value, vec2(0, 0));" +
+ "return v.x == 1.0 && v.y == 1.0 && v.z == 1.0 && v.w == 1.0",
+ valueCheck:
+ "return value == 0",
+ setFn: function(gl, loc) { gl.uniform1i(loc, 1); }
+},
+{ type: 'samplerCube',
+ check:
+ "vec4 v = textureCube(value, vec3(0, 0, 0));" +
+ "return v.x == 1.0 && v.y == 1.0 && v.z == 1.0 && v.w == 1.0",
+ valueCheck:
+ "return value == 0",
+ setFn: function(gl, loc) { gl.uniform1i(loc, 1); }
+},
+];
+
+var wtu = WebGLTestUtils;
+var gl = wtu.create3DContext();
+var c = document.getElementById("console");
+var checkFn;
+
+wtu.setupUnitQuad(gl, [0, 1]);
+
+// Set unit 0 to a non-0 texture.
+var haveVertexTextureImageUnits =
+ gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS) >= 2;
+var tex2D = gl.createTexture();
+var texCube = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex2D);
+gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCube);
+
+var pixel = new Uint8Array([255, 255, 255, 255]);
+var targets = [
+ gl.TEXTURE_2D,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+ gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+ gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+];
+for (var ii = 0; ii < targets.length; ++ii) {
+ gl.texImage2D(
+ targets[ii], 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixel);
+}
+
+var shaderTemplates = [
+{ vs: "vshader0", fs: "fshader0", type: 'f' },
+{ vs: "vshader1", fs: "fshader1", type: 'v' },
+{ vs: "vshader2", fs: "fshader2", type: 'f' },
+{ vs: "vshader3", fs: "fshader3", type: 'v' },
+];
+
+// Get shader templates
+for (var ii = 0; ii < shaderTemplates.length; ++ii) {
+ var template = shaderTemplates[ii];
+ template.vs = wtu.getScript(template.vs);
+ template.fs = wtu.getScript(template.fs);
+}
+
+function testType(test) {
+ debug("");
+ debug("testing: " + test.type);
+
+ for (var ii = 0; ii < shaderTemplates.length; ++ii) {
+ var template = shaderTemplates[ii];
+
+ if (test.type.substring(0, 7) == "sampler" &&
+ template.type == 'v' &&
+ !haveVertexTextureImageUnits) {
+ continue;
+ }
+
+ var vs = wtu.replaceParams(template.vs, test);
+ var fs = wtu.replaceParams(template.fs, test);
+
+ wtu.addShaderSource(c, "vertex shader", vs);
+ wtu.addShaderSource(c, "fragment shader", fs);
+
+ var vs = wtu.loadShader(gl, vs, gl.VERTEX_SHADER);
+ var fs = wtu.loadShader(gl, fs, gl.FRAGMENT_SHADER);
+ var program = wtu.createProgram(gl, vs, fs);
+
+ gl.useProgram(program);
+
+ var loc = gl.getUniformLocation(program, "u_uniform[1]");
+ if (!loc) {
+ var loc = gl.getUniformLocation(program, "u_uniform");
+ }
+
+ var value = gl.getUniform(program, loc);
+ TestEval("checkFn = function(value) {" + (test.valueCheck ? test.valueCheck : test.check) + ";}");
+ if (checkFn(value)) {
+ testPassed("uniform is zero");
+ } else {
+ testFailed("uniform is not zero");
+ }
+
+ debug("default value should be zero");
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green", 0);
+
+ debug("test test by setting value");
+ test.setFn(gl, loc);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [255, 0, 0, 255], "should be red", 0);
+
+ debug("re-linking should reset to defaults");
+ gl.linkProgram(program);
+
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green", 0);
+
+ gl.deleteProgram(program);
+ gl.deleteShader(vs);
+ gl.deleteShader(fs);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no GL errors");
+ }
+}
+
+var testNdx = 0;
+function runNextTest() {
+ testType(tests[testNdx++]);
+ if (testNdx >= tests.length) {
+ finishTest();
+ } else {
+ setTimeout(runNextTest, 0);
+ }
+}
+
+runNextTest();
+
+var successfullyParsed = true;
+
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html
new file mode 100644
index 000000000..2d79a9824
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html
@@ -0,0 +1,117 @@
+<!--
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+"use strict";
+description("Tests the WebGLUniformLocation API");
+
+var wtu = WebGLTestUtils;
+var contextA = wtu.create3DContext();
+var contextB = wtu.create3DContext();
+var programA1 = wtu.loadStandardProgram(contextA);
+var programA2 = wtu.loadStandardProgram(contextA);
+var programB = wtu.loadStandardProgram(contextB);
+var programS = wtu.loadProgramFromFile(contextA, "../resources/structUniformShader.vert", "../resources/fragmentShader.frag");
+var programV = wtu.loadProgramFromFile(contextA, "../resources/floatUniformShader.vert", "../resources/noopUniformShader.frag");
+var locationA = contextA.getUniformLocation(programA1, 'u_modelViewProjMatrix');
+var locationB = contextB.getUniformLocation(programB, 'u_modelViewProjMatrix');
+var locationSx = contextA.getUniformLocation(programS, "u_struct.x");
+var locationSx2;
+var locationArray0 = contextA.getUniformLocation(programS, "u_array[0]");
+var locationArray1 = contextA.getUniformLocation(programS, "u_array[1]");
+var locationVec4 = contextA.getUniformLocation(programV, "fval4");
+
+var vec = [1, 2, 3, 4];
+var mat = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
+
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.useProgram(programA2)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.uniformMatrix4fv(locationA, false, mat)");
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.useProgram(programA1)");
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.uniformMatrix4fv(locationA, false, mat)");
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.uniformMatrix4fv(null, false, mat)");
+
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.useProgram(programS)");
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.uniform1i(locationSx, 333)");
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.uniform1f(locationArray0, 4.0)");
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.uniform1f(locationArray1, 5.0)");
+
+shouldBe("contextA.getUniform(programS, locationSx)", "333");
+shouldBe("contextA.getUniform(programS, locationArray0)", "4.0");
+shouldBe("contextA.getUniform(programS, locationArray1)", "5.0");
+
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.useProgram(programV)");
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.uniform4fv(locationVec4, vec)");
+shouldBe("contextA.getUniform(programV, locationVec4)", "vec");
+
+shouldBeNull("contextA.getUniformLocation(programV, \"IDontExist\")");
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.linkProgram(programA1)");
+// After linking all boxes are bad.
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.uniformMatrix4fv(locationA, false, mat)");
+
+// after re-linking the same program, all uniform locations become invalid.
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.useProgram(programS)");
+contextA.stencilMask(1);
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.linkProgram(programS)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.uniform1i(locationSx, 3)");
+wtu.shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getUniform(programS, locationSx)");
+
+// Retrieve the locations again, and they should be good.
+locationSx = contextA.getUniformLocation(programS, "u_struct.x");
+locationArray0 = contextA.getUniformLocation(programS, "u_array[0]");
+debug("here");
+contextA.stencilMask(0);
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.uniform1i(locationSx, 3)");
+wtu.shouldGenerateGLError(contextA, contextA.NO_ERROR, "contextA.uniform1f(locationArray0, 123)");
+shouldBe("contextA.getUniform(programS, locationSx)", "3");
+shouldBe("contextA.getUniform(programS, locationArray0)", "123");
+
+// getUniformLocation should return a different object everytime, should not cache and return the same object
+debug("Testing that getUniformLocation returns a different object everytime");
+locationSx = contextA.getUniformLocation(programS, "u_struct.x");
+locationSx2 = contextA.getUniformLocation(programS, "u_struct.x");
+shouldBeFalse("locationSx === locationSx2");
+locationSx.foo = {};
+locationSx2.foo = {};
+shouldBeFalse("locationSx.foo === locationSx2.foo");
+
+var successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-samplers-test.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-samplers-test.html
new file mode 100644
index 000000000..57b5580dc
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-samplers-test.html
@@ -0,0 +1,135 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>WebGL sampler uniforms conformance test.</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<canvas id="example" width="2" height="2" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+
+ <script>
+"use strict";
+function init()
+{
+ description(
+ "Tests that only Uniform1i and Uniform1iv can be used to set" +
+ "sampler uniforms.");
+
+ var canvas2d = document.getElementById("canvas2d");
+
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ var program = wtu.setupTexturedQuad(gl);
+
+ var textureLoc = gl.getUniformLocation(program, "tex");
+
+ gl.uniform1i(textureLoc, 1);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "uniform1i can set a sampler uniform");
+ gl.uniform1iv(textureLoc, [1]);
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR,
+ "uniform1iv can set a sampler uniform");
+ gl.uniform1f(textureLoc, 1);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "uniform1f returns INVALID_OPERATION if attempting to set a sampler uniform");
+ gl.uniform1fv(textureLoc, [1]);
+ wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION,
+ "uniform1fv returns INVALID_OPERATION if attempting to set a sampler uniform");
+
+ var maxTextureUnits = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
+
+ var testUniformi = function() {
+ var success = true;
+ for (var ii = 0; ii < maxTextureUnits; ++ii) {
+ gl.uniform1i(textureLoc, ii);
+ success = success && (gl.getError() == gl.NO_ERROR);
+ }
+ expectTrue(success, "uniform1i works for any valid texture unit");
+ };
+
+ var testUniformiv = function() {
+ var success = true;
+ for (var ii = 0; ii < maxTextureUnits; ++ii) {
+ gl.uniform1iv(textureLoc, [ii]);
+ success = success && (gl.getError() == gl.NO_ERROR);
+ }
+ expectTrue(success, "uniform1iv works for any valid texture unit");
+ };
+
+ var steps = [
+ testUniformi,
+ testUniformiv,
+ ];
+
+ var generateInvalidUniformiTests = function(start, end) {
+ return function() {
+ var success = true;
+ for (var ii = start; ii < end; ++ii) {
+ gl.uniform1i(textureLoc, ii);
+ success = success && (gl.getError() == gl.INVALID_VALUE);
+ }
+ expectTrue(success, "uniform1i generates INVALID_VALUE for invalid texture units 0x" + start.toString(16) + " to 0x" + end.toString(16));
+ };
+ };
+
+ var generateInvalidUniformivTests = function(start, end) {
+ return function() {
+ var success = true;
+ for (var ii = start; ii < end; ++ii) {
+ gl.uniform1iv(textureLoc, [ii]);
+ success = success && (gl.getError() == gl.INVALID_VALUE);
+ }
+ expectTrue(success, "uniform1iv generates INVALID_VALUE for invalid texture units 0x" + start.toString(16) + " to 0x" + end.toString(16));
+ };
+ };
+
+ var step = 0x1000;
+ for (var ii = maxTextureUnits; ii < 0x10000; ii += step) {
+ steps.push(generateInvalidUniformiTests(ii, ii + step));
+ steps.push(generateInvalidUniformivTests(ii, ii + step));
+ }
+
+ steps.push(finishTest);
+ wtu.runSteps(steps);
+}
+
+init();
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html
new file mode 100644
index 000000000..622c68d8b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html
@@ -0,0 +1,202 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<html>
+ <head>
+<meta charset="utf-8">
+ <title>WebGL uniform values are per program conformance test.</title>
+ <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+ <script src=/resources/testharness.js></script>
+ <script src=/resources/testharnessreport.js></script>
+ <script src="../../resources/js-test-pre.js"></script>
+ <script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 a_position;
+void main() {
+ gl_Position = a_position;
+}
+</script>
+<script id="fshader" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 v_color;
+void main() {
+ gl_FragColor = v_color;
+}
+</script>
+<script id="vshaderTest" type="x-shader/x-vertex">
+attribute vec4 a_position;
+uniform $(type) $(name1);
+uniform $(type) $(name2);
+uniform bool u_select;
+varying vec4 v_color;
+void main() {
+ $(type) value = u_select ? $(name2) : $(name1);
+ v_color = $(conversion);
+ gl_Position = a_position;
+}
+</script>
+<script id="fshaderTest" type="x-shader/x-fragment">
+precision mediump float;
+uniform $(type) $(name1);
+uniform $(type) $(name2);
+uniform bool u_select;
+void main() {
+ $(type) value = u_select ? $(name2) : $(name1);
+ gl_FragColor = $(conversion);
+}
+</script>
+<canvas id="example" width="2" height="2" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+"use strict";
+function init() {
+ description();
+
+ var console = document.getElementById("console");
+ var wtu = WebGLTestUtils;
+ var gl = wtu.create3DContext("example");
+ wtu.setupUnitQuad(gl);
+ var vtemplate = wtu.getScript("vshader");
+ var ftemplate = wtu.getScript("fshader");
+ var vtemplateTest = wtu.getScript("vshaderTest");
+ var ftemplateTest = wtu.getScript("fshaderTest");
+
+ var shaders = [
+ [vtemplate, ftemplateTest],
+ [vtemplateTest, ftemplate],
+ ];
+
+ var names = [
+ ["u_value1", "u_value2"],
+ ["a", "b"],
+ ["x", "y"],
+ ["y", "z"],
+ ["y", "u"],
+ ["a00000", "a00001"],
+ ];
+ var testList = [
+ { type: "float",
+ conversion: "vec4(value, 0, 0, 0)",
+ values: [[64], [128]],
+ func: 'uniform1fv',
+ },
+ { type: "vec2",
+ conversion: "vec4(value, 0, 0)",
+ values: [[64, 128], [128, 64]],
+ func: 'uniform2fv',
+ },
+ { type: "vec3",
+ conversion: "vec4(value, 0)",
+ values: [[64, 128, 192], [192, 128, 64]],
+ func: 'uniform3fv',
+ },
+ { type: "vec4",
+ conversion: "vec4(value)",
+ values: [[64, 128, 192, 255], [255, 192, 128, 64]],
+ func: 'uniform4fv',
+ },
+ ];
+
+ var clone = function(obj) {
+ var n = { };
+ for (var $key in obj) {
+ n[$key] = obj[$key];
+ }
+ return n;
+ };
+
+ var tests = [];
+ names.forEach(function(namePair) {
+ testList.forEach(function(test) {
+ var t = clone(test);
+ t.name1 = namePair[0];
+ t.name2 = namePair[1];
+ tests.push(t);
+ });
+ });
+
+ var runTest = function(test) {
+ debug("");
+ debug("testing: " + test.type);
+ shaders.forEach(function(shaderPair) {
+ var progs = [];
+ for (var ii = 0; ii < 2; ++ii) {
+ var vsource = wtu.replaceParams(shaderPair[0], test);
+ var fsource = wtu.replaceParams(shaderPair[1], test);
+ if (!ii) {
+ wtu.addShaderSource(console, "vertex shader: type = " + test.type + " with names " + test.name1 + ", " + test.name2, vsource);
+ wtu.addShaderSource(console, "fragment shader: type = " + test.type + " with names " + test.name1 + ", " + test.name2, fsource);
+ }
+ var program = wtu.setupProgram(gl, [vsource, fsource], ["a_position"]);
+ var info = {
+ program: program,
+ valueLocs: [gl.getUniformLocation(program, test.name1),
+ gl.getUniformLocation(program, test.name2)],
+ selectLoc: gl.getUniformLocation(program, "u_select"),
+ };
+ var v1 = test.values[0];
+ var v2 = test.values[1];
+ if (ii) {
+ var t = v1;
+ v1 = v2;
+ v2 = t;
+ }
+ info.expect = [v1, v2];
+ for (var jj = 0; jj < 2; ++jj) {
+ var input = info.expect[jj].map(function(v) { return v / 255; });
+ gl[test.func](info.valueLocs[jj], input);
+ }
+ progs.push(info);
+ }
+ for (var ii = 0; ii < 2; ++ii) {
+ progs.forEach(function(info) {
+ gl.useProgram(info.program);
+ gl.uniform1i(info.selectLoc, ii);
+ wtu.clearAndDrawUnitQuad(gl);
+ wtu.checkCanvas(gl, info.expect[ii], undefined, 1);
+ });
+ }
+ progs.forEach(function(info) {
+ gl.deleteProgram(info.program);
+ });
+ });
+ }
+ tests.forEach(function(test){
+ runTest(test);
+ });
+}
+init();
+var successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/extra/50x50pixel-black-with-red-triangle.png b/testing/web-platform/tests/webgl/conformance-1.0.3/extra/50x50pixel-black-with-red-triangle.png
new file mode 100644
index 000000000..4ec975107
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/extra/50x50pixel-black-with-red-triangle.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/extra/canvas-compositing-test.png b/testing/web-platform/tests/webgl/conformance-1.0.3/extra/canvas-compositing-test.png
new file mode 100644
index 000000000..ba80dbe76
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/extra/canvas-compositing-test.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/extra/tex-image-with-video-test.js b/testing/web-platform/tests/webgl/conformance-1.0.3/extra/tex-image-with-video-test.js
new file mode 100644
index 000000000..fa1cacf8e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/extra/tex-image-with-video-test.js
@@ -0,0 +1,173 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// This block needs to be outside the onload handler in order for this
+// test to run reliably in WebKit's test harness (at least the
+// Chromium port). https://bugs.webkit.org/show_bug.cgi?id=87448
+initTestingHarness();
+
+var old = debug;
+var debug = function(msg) {
+ console.log(msg);
+ old(msg);
+};
+
+function generateTest(pixelFormat, pixelType, prologue) {
+ var wtu = WebGLTestUtils;
+ var gl = null;
+ var textureLoc = null;
+ var successfullyParsed = false;
+
+ // Test each format separately because many browsers implement each
+ // differently. Some might be GPU accelerated, some might not. Etc...
+ var videos = [
+ { src: "../conformance/resources/red-green.mp4" , type: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"', },
+ { src: "../conformance/resources/red-green.webmvp8.webm", type: 'video/webm; codecs="vp8, vorbis"', },
+ { src: "../conformance/resources/red-green.theora.ogv", type: 'video/ogg; codecs="theora, vorbis"', },
+ ];
+
+ var videoNdx = 0;
+ var video;
+
+ function runNextVideo() {
+ if (video) {
+ video.pause();
+ }
+
+ if (videoNdx == videos.length) {
+ finishTest();
+ return;
+ }
+
+ var info = videos[videoNdx++];
+ debug("");
+ debug("testing: " + info.type);
+ video = document.createElement("video");
+ var canPlay = true;
+ if (!video.canPlayType) {
+ testFailed("video.canPlayType required method missing");
+ runNextVideo();
+ return;
+ }
+
+ if(!video.canPlayType(info.type).replace(/no/, '')) {
+ debug(info.type + " unsupported");
+ runNextVideo();
+ return;
+ };
+
+ document.body.appendChild(video);
+ video.type = info.type;
+ video.crossOrigin = 'anonymous';
+ video.src = info.src;
+ wtu.startPlayingAndWaitForVideo(video, runTest);
+ }
+
+ var init = function()
+ {
+ description('Verify texImage2D and texSubImage2D code paths taking video elements (' + pixelFormat + '/' + pixelType + ')');
+
+ gl = wtu.create3DContext("example");
+
+ if (!prologue(gl)) {
+ finishTest();
+ return;
+ }
+
+ var program = wtu.setupTexturedQuad(gl);
+
+ gl.clearColor(0,0,0,1);
+ gl.clearDepth(1);
+
+ textureLoc = gl.getUniformLocation(program, "tex");
+ runNextVideo();
+ }
+
+ function runOneIteration(videoElement, useTexSubImage2D, flipY, topColor, bottomColor)
+ {
+ debug('Testing ' + (useTexSubImage2D ? 'texSubImage2D' : 'texImage2D') +
+ ' with flipY=' + flipY);
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+ // Disable any writes to the alpha channel
+ gl.colorMask(1, 1, 1, 0);
+ var texture = gl.createTexture();
+ // Bind the texture to texture unit 0
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ // Set up texture parameters
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ // Set up pixel store parameters
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
+ // Upload the videoElement into the texture
+ if (useTexSubImage2D) {
+ // Initialize the texture to black first
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat],
+ videoElement.videoWidth, videoElement.videoHeight, 0,
+ gl[pixelFormat], gl[pixelType], null);
+ gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl[pixelFormat], gl[pixelType], videoElement);
+ } else {
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], gl[pixelFormat], gl[pixelType], videoElement);
+ }
+
+ var c = document.createElement("canvas");
+ c.width = 16;
+ c.height = 16;
+ c.style.border = "1px solid black";
+ var ctx = c.getContext("2d");
+ ctx.drawImage(videoElement, 0, 0, 16, 16);
+ document.body.appendChild(c);
+
+ // Point the uniform sampler to texture unit 0
+ gl.uniform1i(textureLoc, 0);
+ // Draw the triangles
+ wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]);
+ // Check a few pixels near the top and bottom and make sure they have
+ // the right color.
+ var tolerance = 5;
+ debug("Checking lower left corner");
+ wtu.checkCanvasRect(gl, 4, 4, 2, 2, bottomColor,
+ "shouldBe " + bottomColor, tolerance);
+ debug("Checking upper left corner");
+ wtu.checkCanvasRect(gl, 4, gl.canvas.height - 8, 2, 2, topColor,
+ "shouldBe " + topColor, tolerance);
+ }
+
+ function runTest(videoElement)
+ {
+ var red = [255, 0, 0];
+ var green = [0, 255, 0];
+ runOneIteration(videoElement, false, true, red, green);
+ runOneIteration(videoElement, false, false, green, red);
+ runOneIteration(videoElement, true, true, red, green);
+ runOneIteration(videoElement, true, false, green, red);
+
+ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors");
+
+ runNextVideo();
+ }
+
+ return init;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/resources/cookies.js b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/cookies.js
new file mode 100644
index 000000000..d12170ef0
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/cookies.js
@@ -0,0 +1,60 @@
+/*\
+|*|
+|*| :: cookies.js ::
+|*|
+|*| A complete cookies reader/writer framework with full unicode support.
+|*|
+|*| https://developer.mozilla.org/en-US/docs/DOM/document.cookie
+|*|
+|*| This framework is released under the GNU Public License, version 3 or later.
+|*| http://www.gnu.org/licenses/gpl-3.0-standalone.html
+|*|
+|*| Syntaxes:
+|*|
+|*| * docCookies.setItem(name, value[, end[, path[, domain[, secure]]]])
+|*| * docCookies.getItem(name)
+|*| * docCookies.removeItem(name[, path], domain)
+|*| * docCookies.hasItem(name)
+|*| * docCookies.keys()
+|*|
+\*/
+
+var docCookies = {
+ getItem: function (sKey) {
+ return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null;
+ },
+ setItem: function (sKey, sValue, vEnd, sPath, sDomain, bSecure) {
+ if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) { return false; }
+ var sExpires = "";
+ if (vEnd) {
+ switch (vEnd.constructor) {
+ case Number:
+ sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + vEnd;
+ break;
+ case String:
+ sExpires = "; expires=" + vEnd;
+ break;
+ case Date:
+ sExpires = "; expires=" + vEnd.toUTCString();
+ break;
+ }
+ }
+ document.cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(sValue) + sExpires + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "") + (bSecure ? "; secure" : "");
+ return true;
+ },
+
+
+ removeItem: function (sKey, sPath, sDomain) {
+ if (!sKey || !this.hasItem(sKey)) { return false; }
+ document.cookie = encodeURIComponent(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + ( sDomain ? "; domain=" + sDomain : "") + ( sPath ? "; path=" + sPath : "");
+ return true;
+ },
+ hasItem: function (sKey) {
+ return (new RegExp("(?:^|;\\s*)" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie);
+ },
+ keys: /* optional method: you can safely remove it! */ function () {
+ var aKeys = document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g, "").split(/\s*(?:\=[^;]*)?;\s*/);
+ for (var nIdx = 0; nIdx < aKeys.length; nIdx++) { aKeys[nIdx] = decodeURIComponent(aKeys[nIdx]); }
+ return aKeys;
+ }
+}; \ No newline at end of file
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/resources/desktop-gl-constants.js b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/desktop-gl-constants.js
new file mode 100644
index 000000000..6bea0acb4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/desktop-gl-constants.js
@@ -0,0 +1,2645 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// Defines a bunch of DesktopGL constants so we can make sure WebGL
+// implementations disallow them.
+
+var desktopGL = {
+ 'MIN': 0x8007,
+ 'MAX': 0x8008,
+ 'QUADS': 0x0007,
+ 'QUAD_STRIP': 0x0008,
+ 'POLYGON': 0x0009,
+ '1': 0x0001,
+ '2': 0x0002,
+ '3': 0x0003,
+ '4': 0x0004,
+ 'STATIC_READ': 0x88E5,
+ 'CLIP_PLANE0': 0x3000,
+ 'PERSPECTIVE_CORRECTION_HINT': 0x0C50,
+ 'ACCUM_BUFFER_BIT': 0x0200,
+ 'RGB4': 0x804F,
+ 'RGB5': 0x8050,
+ 'RGB8': 0x8051,
+ 'RGB10': 0x8052,
+ 'RGB12': 0x8053,
+ 'RGB16': 0x8054,
+ 'RGBA2': 0x8055,
+ 'RGBA4': 0x8056,
+ 'RGB5_A1': 0x8057,
+ 'RGBA8': 0x8058,
+ 'RGB10_A2': 0x8059,
+ 'RGBA12': 0x805A,
+ 'RGBA16': 0x805B,
+ 'SMOOTH_POINT_SIZE_RANGE': 0x0B12,
+ 'SMOOTH_POINT_SIZE_GRANULARITY': 0x0B13,
+ 'SMOOTH_LINE_WIDTH_RANGE': 0x0B22,
+ 'SMOOTH_LINE_WIDTH_GRANULARITY': 0x0B23,
+ 'UNSIGNED_BYTE_3_3_2': 0x8032,
+ 'UNSIGNED_SHORT_4_4_4_4': 0x8033,
+ 'UNSIGNED_SHORT_5_5_5_1': 0x8034,
+ 'UNSIGNED_INT_8_8_8_8': 0x8035,
+ 'UNSIGNED_INT_10_10_10_2': 0x8036,
+ 'RESCALE_NORMAL': 0x803A,
+ 'TEXTURE_BINDING_3D': 0x806A,
+ 'PACK_SKIP_IMAGES': 0x806B,
+ 'PACK_IMAGE_HEIGHT': 0x806C,
+ 'UNPACK_SKIP_IMAGES': 0x806D,
+ 'UNPACK_IMAGE_HEIGHT': 0x806E,
+ 'TEXTURE_3D': 0x806F,
+ 'PROXY_TEXTURE_3D': 0x8070,
+ 'TEXTURE_DEPTH': 0x8071,
+ 'TEXTURE_WRAP_R': 0x8072,
+ 'MAX_3D_TEXTURE_SIZE': 0x8073,
+ 'BGR': 0x80E0,
+ 'BGRA': 0x80E1,
+ 'MAX_ELEMENTS_VERTICES': 0x80E8,
+ 'MAX_ELEMENTS_INDICES': 0x80E9,
+ 'CLAMP_TO_EDGE': 0x812F,
+ 'TEXTURE_MIN_LOD': 0x813A,
+ 'TEXTURE_MAX_LOD': 0x813B,
+ 'TEXTURE_BASE_LEVEL': 0x813C,
+ 'TEXTURE_MAX_LEVEL': 0x813D,
+ 'LIGHT_MODEL_COLOR_CONTROL': 0x81F8,
+ 'SINGLE_COLOR': 0x81F9,
+ 'SEPARATE_SPECULAR_COLOR': 0x81FA,
+ 'UNSIGNED_BYTE_2_3_3_REV': 0x8362,
+ 'UNSIGNED_SHORT_5_6_5': 0x8363,
+ 'UNSIGNED_SHORT_5_6_5_REV': 0x8364,
+ 'UNSIGNED_SHORT_4_4_4_4_REV': 0x8365,
+ 'UNSIGNED_SHORT_1_5_5_5_REV': 0x8366,
+ 'UNSIGNED_INT_8_8_8_8_REV': 0x8367,
+ 'UNSIGNED_INT_2_10_10_10_REV': 0x8368,
+ 'ALIASED_POINT_SIZE_RANGE': 0x846D,
+ 'ALIASED_LINE_WIDTH_RANGE': 0x846E,
+ 'MULTISAMPLE': 0x809D,
+ 'SAMPLE_ALPHA_TO_COVERAGE': 0x809E,
+ 'SAMPLE_ALPHA_TO_ONE': 0x809F,
+ 'SAMPLE_COVERAGE': 0x80A0,
+ 'SAMPLE_BUFFERS': 0x80A8,
+ 'SAMPLES': 0x80A9,
+ 'SAMPLE_COVERAGE_VALUE': 0x80AA,
+ 'SAMPLE_COVERAGE_INVERT': 0x80AB,
+ 'CLAMP_TO_BORDER': 0x812D,
+ 'TEXTURE0': 0x84C0,
+ 'TEXTURE1': 0x84C1,
+ 'TEXTURE2': 0x84C2,
+ 'TEXTURE3': 0x84C3,
+ 'TEXTURE4': 0x84C4,
+ 'TEXTURE5': 0x84C5,
+ 'TEXTURE6': 0x84C6,
+ 'TEXTURE7': 0x84C7,
+ 'TEXTURE8': 0x84C8,
+ 'TEXTURE9': 0x84C9,
+ 'TEXTURE10': 0x84CA,
+ 'TEXTURE11': 0x84CB,
+ 'TEXTURE12': 0x84CC,
+ 'TEXTURE13': 0x84CD,
+ 'TEXTURE14': 0x84CE,
+ 'TEXTURE15': 0x84CF,
+ 'TEXTURE16': 0x84D0,
+ 'TEXTURE17': 0x84D1,
+ 'TEXTURE18': 0x84D2,
+ 'TEXTURE19': 0x84D3,
+ 'TEXTURE20': 0x84D4,
+ 'TEXTURE21': 0x84D5,
+ 'TEXTURE22': 0x84D6,
+ 'TEXTURE23': 0x84D7,
+ 'TEXTURE24': 0x84D8,
+ 'TEXTURE25': 0x84D9,
+ 'TEXTURE26': 0x84DA,
+ 'TEXTURE27': 0x84DB,
+ 'TEXTURE28': 0x84DC,
+ 'TEXTURE29': 0x84DD,
+ 'TEXTURE30': 0x84DE,
+ 'TEXTURE31': 0x84DF,
+ 'ACTIVE_TEXTURE': 0x84E0,
+ 'CLIENT_ACTIVE_TEXTURE': 0x84E1,
+ 'MAX_TEXTURE_UNITS': 0x84E2,
+ 'TRANSPOSE_MODELVIEW_MATRIX': 0x84E3,
+ 'TRANSPOSE_PROJECTION_MATRIX': 0x84E4,
+ 'TRANSPOSE_TEXTURE_MATRIX': 0x84E5,
+ 'TRANSPOSE_COLOR_MATRIX': 0x84E6,
+ 'SUBTRACT': 0x84E7,
+ 'COMPRESSED_ALPHA': 0x84E9,
+ 'COMPRESSED_LUMINANCE': 0x84EA,
+ 'COMPRESSED_LUMINANCE_ALPHA': 0x84EB,
+ 'COMPRESSED_INTENSITY': 0x84EC,
+ 'COMPRESSED_RGB': 0x84ED,
+ 'COMPRESSED_RGBA': 0x84EE,
+ 'TEXTURE_COMPRESSION_HINT': 0x84EF,
+ 'NORMAL_MAP': 0x8511,
+ 'REFLECTION_MAP': 0x8512,
+ 'TEXTURE_CUBE_MAP': 0x8513,
+ 'TEXTURE_BINDING_CUBE_MAP': 0x8514,
+ 'TEXTURE_CUBE_MAP_POSITIVE_X': 0x8515,
+ 'TEXTURE_CUBE_MAP_NEGATIVE_X': 0x8516,
+ 'TEXTURE_CUBE_MAP_POSITIVE_Y': 0x8517,
+ 'TEXTURE_CUBE_MAP_NEGATIVE_Y': 0x8518,
+ 'TEXTURE_CUBE_MAP_POSITIVE_Z': 0x8519,
+ 'TEXTURE_CUBE_MAP_NEGATIVE_Z': 0x851A,
+ 'PROXY_TEXTURE_CUBE_MAP': 0x851B,
+ 'MAX_CUBE_MAP_TEXTURE_SIZE': 0x851C,
+ 'COMBINE': 0x8570,
+ 'COMBINE_RGB': 0x8571,
+ 'COMBINE_ALPHA': 0x8572,
+ 'RGB_SCALE': 0x8573,
+ 'ADD_SIGNED': 0x8574,
+ 'INTERPOLATE': 0x8575,
+ 'CONSTANT': 0x8576,
+ 'PRIMARY_COLOR': 0x8577,
+ 'PREVIOUS': 0x8578,
+ 'SOURCE0_RGB': 0x8580,
+ 'SOURCE1_RGB': 0x8581,
+ 'SOURCE2_RGB': 0x8582,
+ 'SOURCE0_ALPHA': 0x8588,
+ 'SOURCE1_ALPHA': 0x8589,
+ 'SOURCE2_ALPHA': 0x858A,
+ 'OPERAND0_RGB': 0x8590,
+ 'OPERAND1_RGB': 0x8591,
+ 'OPERAND2_RGB': 0x8592,
+ 'OPERAND0_ALPHA': 0x8598,
+ 'OPERAND1_ALPHA': 0x8599,
+ 'OPERAND2_ALPHA': 0x859A,
+ 'TEXTURE_COMPRESSED_IMAGE_SIZE': 0x86A0,
+ 'TEXTURE_COMPRESSED': 0x86A1,
+ 'NUM_COMPRESSED_TEXTURE_FORMATS': 0x86A2,
+ 'COMPRESSED_TEXTURE_FORMATS': 0x86A3,
+ 'DOT3_RGB': 0x86AE,
+ 'DOT3_RGBA': 0x86AF,
+ 'MULTISAMPLE_BIT': 0x20000000,
+ 'BLEND_DST_RGB': 0x80C8,
+ 'BLEND_SRC_RGB': 0x80C9,
+ 'BLEND_DST_ALPHA': 0x80CA,
+ 'BLEND_SRC_ALPHA': 0x80CB,
+ 'POINT_SIZE_MIN': 0x8126,
+ 'POINT_SIZE_MAX': 0x8127,
+ 'POINT_FADE_THRESHOLD_SIZE': 0x8128,
+ 'POINT_DISTANCE_ATTENUATION': 0x8129,
+ 'GENERATE_MIPMAP': 0x8191,
+ 'GENERATE_MIPMAP_HINT': 0x8192,
+ 'DEPTH_COMPONENT16': 0x81A5,
+ 'DEPTH_COMPONENT24': 0x81A6,
+ 'DEPTH_COMPONENT32': 0x81A7,
+ 'MIRRORED_REPEAT': 0x8370,
+ 'FOG_COORDINATE_SOURCE': 0x8450,
+ 'FOG_COORDINATE': 0x8451,
+ 'FRAGMENT_DEPTH': 0x8452,
+ 'CURRENT_FOG_COORDINATE': 0x8453,
+ 'FOG_COORDINATE_ARRAY_TYPE': 0x8454,
+ 'FOG_COORDINATE_ARRAY_STRIDE': 0x8455,
+ 'FOG_COORDINATE_ARRAY_POINTER': 0x8456,
+ 'FOG_COORDINATE_ARRAY': 0x8457,
+ 'COLOR_SUM': 0x8458,
+ 'CURRENT_SECONDARY_COLOR': 0x8459,
+ 'SECONDARY_COLOR_ARRAY_SIZE': 0x845A,
+ 'SECONDARY_COLOR_ARRAY_TYPE': 0x845B,
+ 'SECONDARY_COLOR_ARRAY_STRIDE': 0x845C,
+ 'SECONDARY_COLOR_ARRAY_POINTER': 0x845D,
+ 'SECONDARY_COLOR_ARRAY': 0x845E,
+ 'MAX_TEXTURE_LOD_BIAS': 0x84FD,
+ 'TEXTURE_FILTER_CONTROL': 0x8500,
+ 'TEXTURE_LOD_BIAS': 0x8501,
+ 'INCR_WRAP': 0x8507,
+ 'DECR_WRAP': 0x8508,
+ 'TEXTURE_DEPTH_SIZE': 0x884A,
+ 'DEPTH_TEXTURE_MODE': 0x884B,
+ 'TEXTURE_COMPARE_MODE': 0x884C,
+ 'TEXTURE_COMPARE_FUNC': 0x884D,
+ 'COMPARE_R_TO_TEXTURE': 0x884E,
+ 'BUFFER_SIZE': 0x8764,
+ 'BUFFER_USAGE': 0x8765,
+ 'QUERY_COUNTER_BITS': 0x8864,
+ 'CURRENT_QUERY': 0x8865,
+ 'QUERY_RESULT': 0x8866,
+ 'QUERY_RESULT_AVAILABLE': 0x8867,
+ 'ARRAY_BUFFER': 0x8892,
+ 'ELEMENT_ARRAY_BUFFER': 0x8893,
+ 'ARRAY_BUFFER_BINDING': 0x8894,
+ 'ELEMENT_ARRAY_BUFFER_BINDING': 0x8895,
+ 'VERTEX_ARRAY_BUFFER_BINDING': 0x8896,
+ 'NORMAL_ARRAY_BUFFER_BINDING': 0x8897,
+ 'COLOR_ARRAY_BUFFER_BINDING': 0x8898,
+ 'INDEX_ARRAY_BUFFER_BINDING': 0x8899,
+ 'TEXTURE_COORD_ARRAY_BUFFER_BINDING': 0x889A,
+ 'EDGE_FLAG_ARRAY_BUFFER_BINDING': 0x889B,
+ 'SECONDARY_COLOR_ARRAY_BUFFER_BINDING': 0x889C,
+ 'FOG_COORDINATE_ARRAY_BUFFER_BINDING': 0x889D,
+ 'WEIGHT_ARRAY_BUFFER_BINDING': 0x889E,
+ 'VERTEX_ATTRIB_ARRAY_BUFFER_BINDING': 0x889F,
+ 'READ_ONLY': 0x88B8,
+ 'WRITE_ONLY': 0x88B9,
+ 'READ_WRITE': 0x88BA,
+ 'BUFFER_ACCESS': 0x88BB,
+ 'BUFFER_MAPPED': 0x88BC,
+ 'BUFFER_MAP_POINTER': 0x88BD,
+ 'STREAM_DRAW': 0x88E0,
+ 'STREAM_READ': 0x88E1,
+ 'STREAM_COPY': 0x88E2,
+ 'STATIC_DRAW': 0x88E4,
+ 'STATIC_READ': 0x88E5,
+ 'STATIC_COPY': 0x88E6,
+ 'DYNAMIC_DRAW': 0x88E8,
+ 'DYNAMIC_READ': 0x88E9,
+ 'DYNAMIC_COPY': 0x88EA,
+ 'SAMPLES_PASSED': 0x8914,
+ 'VERTEX_ATTRIB_ARRAY_ENABLED': 0x8622,
+ 'VERTEX_ATTRIB_ARRAY_SIZE': 0x8623,
+ 'VERTEX_ATTRIB_ARRAY_STRIDE': 0x8624,
+ 'VERTEX_ATTRIB_ARRAY_TYPE': 0x8625,
+ 'CURRENT_VERTEX_ATTRIB': 0x8626,
+ 'VERTEX_PROGRAM_POINT_SIZE': 0x8642,
+ 'VERTEX_PROGRAM_TWO_SIDE': 0x8643,
+ 'VERTEX_ATTRIB_ARRAY_POINTER': 0x8645,
+ 'STENCIL_BACK_FUNC': 0x8800,
+ 'STENCIL_BACK_FAIL': 0x8801,
+ 'STENCIL_BACK_PASS_DEPTH_FAIL': 0x8802,
+ 'STENCIL_BACK_PASS_DEPTH_PASS': 0x8803,
+ 'MAX_DRAW_BUFFERS': 0x8824,
+ 'DRAW_BUFFER0': 0x8825,
+ 'DRAW_BUFFER1': 0x8826,
+ 'DRAW_BUFFER2': 0x8827,
+ 'DRAW_BUFFER3': 0x8828,
+ 'DRAW_BUFFER4': 0x8829,
+ 'DRAW_BUFFER5': 0x882A,
+ 'DRAW_BUFFER6': 0x882B,
+ 'DRAW_BUFFER7': 0x882C,
+ 'DRAW_BUFFER8': 0x882D,
+ 'DRAW_BUFFER9': 0x882E,
+ 'DRAW_BUFFER10': 0x882F,
+ 'DRAW_BUFFER11': 0x8830,
+ 'DRAW_BUFFER12': 0x8831,
+ 'DRAW_BUFFER13': 0x8832,
+ 'DRAW_BUFFER14': 0x8833,
+ 'DRAW_BUFFER15': 0x8834,
+ 'BLEND_EQUATION_ALPHA': 0x883D,
+ 'POINT_SPRITE': 0x8861,
+ 'COORD_REPLACE': 0x8862,
+ 'MAX_VERTEX_ATTRIBS': 0x8869,
+ 'VERTEX_ATTRIB_ARRAY_NORMALIZED': 0x886A,
+ 'MAX_TEXTURE_COORDS': 0x8871,
+ 'MAX_TEXTURE_IMAGE_UNITS': 0x8872,
+ 'FRAGMENT_SHADER': 0x8B30,
+ 'VERTEX_SHADER': 0x8B31,
+ 'MAX_FRAGMENT_UNIFORM_COMPONENTS': 0x8B49,
+ 'MAX_VERTEX_UNIFORM_COMPONENTS': 0x8B4A,
+ 'MAX_VARYING_FLOATS': 0x8B4B,
+ 'MAX_VERTEX_TEXTURE_IMAGE_UNITS': 0x8B4C,
+ 'MAX_COMBINED_TEXTURE_IMAGE_UNITS': 0x8B4D,
+ 'SHADER_TYPE': 0x8B4F,
+ 'FLOAT_VEC2': 0x8B50,
+ 'FLOAT_VEC3': 0x8B51,
+ 'FLOAT_VEC4': 0x8B52,
+ 'INT_VEC2': 0x8B53,
+ 'INT_VEC3': 0x8B54,
+ 'INT_VEC4': 0x8B55,
+ 'BOOL': 0x8B56,
+ 'BOOL_VEC2': 0x8B57,
+ 'BOOL_VEC3': 0x8B58,
+ 'BOOL_VEC4': 0x8B59,
+ 'FLOAT_MAT2': 0x8B5A,
+ 'FLOAT_MAT3': 0x8B5B,
+ 'FLOAT_MAT4': 0x8B5C,
+ 'SAMPLER_1D': 0x8B5D,
+ 'SAMPLER_2D': 0x8B5E,
+ 'SAMPLER_3D': 0x8B5F,
+ 'SAMPLER_CUBE': 0x8B60,
+ 'SAMPLER_1D_SHADOW': 0x8B61,
+ 'SAMPLER_2D_SHADOW': 0x8B62,
+ 'DELETE_STATUS': 0x8B80,
+ 'COMPILE_STATUS': 0x8B81,
+ 'LINK_STATUS': 0x8B82,
+ 'VALIDATE_STATUS': 0x8B83,
+ 'INFO_LOG_LENGTH': 0x8B84,
+ 'ATTACHED_SHADERS': 0x8B85,
+ 'ACTIVE_UNIFORMS': 0x8B86,
+ 'ACTIVE_UNIFORM_MAX_LENGTH': 0x8B87,
+ 'SHADER_SOURCE_LENGTH': 0x8B88,
+ 'ACTIVE_ATTRIBUTES': 0x8B89,
+ 'ACTIVE_ATTRIBUTE_MAX_LENGTH': 0x8B8A,
+ 'FRAGMENT_SHADER_DERIVATIVE_HINT': 0x8B8B,
+ 'SHADING_LANGUAGE_VERSION': 0x8B8C,
+ 'CURRENT_PROGRAM': 0x8B8D,
+ 'POINT_SPRITE_COORD_ORIGIN': 0x8CA0,
+ 'LOWER_LEFT': 0x8CA1,
+ 'UPPER_LEFT': 0x8CA2,
+ 'STENCIL_BACK_REF': 0x8CA3,
+ 'STENCIL_BACK_VALUE_MASK': 0x8CA4,
+ 'STENCIL_BACK_WRITEMASK': 0x8CA5,
+ 'CURRENT_RASTER_SECONDARY_COLOR': 0x845F,
+ 'PIXEL_PACK_BUFFER': 0x88EB,
+ 'PIXEL_UNPACK_BUFFER': 0x88EC,
+ 'PIXEL_PACK_BUFFER_BINDING': 0x88ED,
+ 'PIXEL_UNPACK_BUFFER_BINDING': 0x88EF,
+ 'FLOAT_MAT2x3': 0x8B65,
+ 'FLOAT_MAT2x4': 0x8B66,
+ 'FLOAT_MAT3x2': 0x8B67,
+ 'FLOAT_MAT3x4': 0x8B68,
+ 'FLOAT_MAT4x2': 0x8B69,
+ 'FLOAT_MAT4x3': 0x8B6A,
+ 'SRGB': 0x8C40,
+ 'SRGB8': 0x8C41,
+ 'SRGB_ALPHA': 0x8C42,
+ 'SRGB8_ALPHA8': 0x8C43,
+ 'SLUMINANCE_ALPHA': 0x8C44,
+ 'SLUMINANCE8_ALPHA8': 0x8C45,
+ 'SLUMINANCE': 0x8C46,
+ 'SLUMINANCE8': 0x8C47,
+ 'COMPRESSED_SRGB': 0x8C48,
+ 'COMPRESSED_SRGB_ALPHA': 0x8C49,
+ 'COMPRESSED_SLUMINANCE': 0x8C4A,
+ 'COMPRESSED_SLUMINANCE_ALPHA': 0x8C4B,
+ 'CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT': 0x0001,
+ 'MAJOR_VERSION': 0x821B,
+ 'MINOR_VERSION': 0x821C,
+ 'NUM_EXTENSIONS': 0x821D,
+ 'CONTEXT_FLAGS': 0x821E,
+ 'DEPTH_BUFFER': 0x8223,
+ 'STENCIL_BUFFER': 0x8224,
+ 'COMPRESSED_RED': 0x8225,
+ 'COMPRESSED_RG': 0x8226,
+ 'RGBA32F': 0x8814,
+ 'RGB32F': 0x8815,
+ 'RGBA16F': 0x881A,
+ 'RGB16F': 0x881B,
+ 'VERTEX_ATTRIB_ARRAY_INTEGER': 0x88FD,
+ 'MAX_ARRAY_TEXTURE_LAYERS': 0x88FF,
+ 'MIN_PROGRAM_TEXEL_OFFSET': 0x8904,
+ 'MAX_PROGRAM_TEXEL_OFFSET': 0x8905,
+ 'CLAMP_VERTEX_COLOR': 0x891A,
+ 'CLAMP_FRAGMENT_COLOR': 0x891B,
+ 'CLAMP_READ_COLOR': 0x891C,
+ 'FIXED_ONLY': 0x891D,
+ 'TEXTURE_RED_TYPE': 0x8C10,
+ 'TEXTURE_GREEN_TYPE': 0x8C11,
+ 'TEXTURE_BLUE_TYPE': 0x8C12,
+ 'TEXTURE_ALPHA_TYPE': 0x8C13,
+ 'TEXTURE_LUMINANCE_TYPE': 0x8C14,
+ 'TEXTURE_INTENSITY_TYPE': 0x8C15,
+ 'TEXTURE_DEPTH_TYPE': 0x8C16,
+ 'UNSIGNED_NORMALIZED': 0x8C17,
+ 'TEXTURE_1D_ARRAY': 0x8C18,
+ 'PROXY_TEXTURE_1D_ARRAY': 0x8C19,
+ 'TEXTURE_2D_ARRAY': 0x8C1A,
+ 'PROXY_TEXTURE_2D_ARRAY': 0x8C1B,
+ 'TEXTURE_BINDING_1D_ARRAY': 0x8C1C,
+ 'TEXTURE_BINDING_2D_ARRAY': 0x8C1D,
+ 'R11F_G11F_B10F': 0x8C3A,
+ 'UNSIGNED_INT_10F_11F_11F_REV': 0x8C3B,
+ 'RGB9_E5': 0x8C3D,
+ 'UNSIGNED_INT_5_9_9_9_REV': 0x8C3E,
+ 'TEXTURE_SHARED_SIZE': 0x8C3F,
+ 'TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH': 0x8C76,
+ 'TRANSFORM_FEEDBACK_BUFFER_MODE': 0x8C7F,
+ 'MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS': 0x8C80,
+ 'TRANSFORM_FEEDBACK_VARYINGS': 0x8C83,
+ 'TRANSFORM_FEEDBACK_BUFFER_START': 0x8C84,
+ 'TRANSFORM_FEEDBACK_BUFFER_SIZE': 0x8C85,
+ 'PRIMITIVES_GENERATED': 0x8C87,
+ 'TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN': 0x8C88,
+ 'RASTERIZER_DISCARD': 0x8C89,
+ 'MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS': 0x8C8A,
+ 'MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS': 0x8C8B,
+ 'INTERLEAVED_ATTRIBS': 0x8C8C,
+ 'SEPARATE_ATTRIBS': 0x8C8D,
+ 'TRANSFORM_FEEDBACK_BUFFER': 0x8C8E,
+ 'TRANSFORM_FEEDBACK_BUFFER_BINDING': 0x8C8F,
+ 'RGBA32UI': 0x8D70,
+ 'RGB32UI': 0x8D71,
+ 'RGBA16UI': 0x8D76,
+ 'RGB16UI': 0x8D77,
+ 'RGBA8UI': 0x8D7C,
+ 'RGB8UI': 0x8D7D,
+ 'RGBA32I': 0x8D82,
+ 'RGB32I': 0x8D83,
+ 'RGBA16I': 0x8D88,
+ 'RGB16I': 0x8D89,
+ 'RGBA8I': 0x8D8E,
+ 'RGB8I': 0x8D8F,
+ 'RED_INTEGER': 0x8D94,
+ 'GREEN_INTEGER': 0x8D95,
+ 'BLUE_INTEGER': 0x8D96,
+ 'ALPHA_INTEGER': 0x8D97,
+ 'RGB_INTEGER': 0x8D98,
+ 'RGBA_INTEGER': 0x8D99,
+ 'BGR_INTEGER': 0x8D9A,
+ 'BGRA_INTEGER': 0x8D9B,
+ 'SAMPLER_1D_ARRAY': 0x8DC0,
+ 'SAMPLER_2D_ARRAY': 0x8DC1,
+ 'SAMPLER_1D_ARRAY_SHADOW': 0x8DC3,
+ 'SAMPLER_2D_ARRAY_SHADOW': 0x8DC4,
+ 'SAMPLER_CUBE_SHADOW': 0x8DC5,
+ 'UNSIGNED_INT_VEC2': 0x8DC6,
+ 'UNSIGNED_INT_VEC3': 0x8DC7,
+ 'UNSIGNED_INT_VEC4': 0x8DC8,
+ 'INT_SAMPLER_1D': 0x8DC9,
+ 'INT_SAMPLER_2D': 0x8DCA,
+ 'INT_SAMPLER_3D': 0x8DCB,
+ 'INT_SAMPLER_CUBE': 0x8DCC,
+ 'INT_SAMPLER_1D_ARRAY': 0x8DCE,
+ 'INT_SAMPLER_2D_ARRAY': 0x8DCF,
+ 'UNSIGNED_INT_SAMPLER_1D': 0x8DD1,
+ 'UNSIGNED_INT_SAMPLER_2D': 0x8DD2,
+ 'UNSIGNED_INT_SAMPLER_3D': 0x8DD3,
+ 'UNSIGNED_INT_SAMPLER_CUBE': 0x8DD4,
+ 'UNSIGNED_INT_SAMPLER_1D_ARRAY': 0x8DD6,
+ 'UNSIGNED_INT_SAMPLER_2D_ARRAY': 0x8DD7,
+ 'QUERY_WAIT': 0x8E13,
+ 'QUERY_NO_WAIT': 0x8E14,
+ 'QUERY_BY_REGION_WAIT': 0x8E15,
+ 'QUERY_BY_REGION_NO_WAIT': 0x8E16,
+ 'MULTISAMPLE_3DFX': 0x86B2,
+ 'SAMPLE_BUFFERS_3DFX': 0x86B3,
+ 'SAMPLES_3DFX': 0x86B4,
+ 'MULTISAMPLE_BIT_3DFX': 0x20000000,
+ 'COMPRESSED_RGB_FXT1_3DFX': 0x86B0,
+ 'COMPRESSED_RGBA_FXT1_3DFX': 0x86B1,
+ 'UNPACK_CLIENT_STORAGE_APPLE': 0x85B2,
+ 'ELEMENT_ARRAY_APPLE': 0x8768,
+ 'ELEMENT_ARRAY_TYPE_APPLE': 0x8769,
+ 'ELEMENT_ARRAY_POINTER_APPLE': 0x876A,
+ 'HALF_APPLE': 0x140B,
+ 'RGBA_FLOAT32_APPLE': 0x8814,
+ 'RGB_FLOAT32_APPLE': 0x8815,
+ 'ALPHA_FLOAT32_APPLE': 0x8816,
+ 'INTENSITY_FLOAT32_APPLE': 0x8817,
+ 'LUMINANCE_FLOAT32_APPLE': 0x8818,
+ 'LUMINANCE_ALPHA_FLOAT32_APPLE': 0x8819,
+ 'RGBA_FLOAT16_APPLE': 0x881A,
+ 'RGB_FLOAT16_APPLE': 0x881B,
+ 'ALPHA_FLOAT16_APPLE': 0x881C,
+ 'INTENSITY_FLOAT16_APPLE': 0x881D,
+ 'LUMINANCE_FLOAT16_APPLE': 0x881E,
+ 'LUMINANCE_ALPHA_FLOAT16_APPLE': 0x881F,
+ 'COLOR_FLOAT_APPLE': 0x8A0F,
+ 'BUFFER_SERIALIZED_MODIFY_APPLE': 0x8A12,
+ 'BUFFER_FLUSHING_UNMAP_APPLE': 0x8A13,
+ 'MIN_PBUFFER_VIEWPORT_DIMS_APPLE': 0x8A10,
+ 'LIGHT_MODEL_SPECULAR_VECTOR_APPLE': 0x85B0,
+ 'TEXTURE_RANGE_LENGTH_APPLE': 0x85B7,
+ 'TEXTURE_RANGE_POINTER_APPLE': 0x85B8,
+ 'TEXTURE_STORAGE_HINT_APPLE': 0x85BC,
+ 'STORAGE_PRIVATE_APPLE': 0x85BD,
+ 'STORAGE_CACHED_APPLE': 0x85BE,
+ 'STORAGE_SHARED_APPLE': 0x85BF,
+ 'TRANSFORM_HINT_APPLE': 0x85B1,
+ 'VERTEX_ARRAY_BINDING_APPLE': 0x85B5,
+ 'VERTEX_ARRAY_RANGE_APPLE': 0x851D,
+ 'VERTEX_ARRAY_RANGE_LENGTH_APPLE': 0x851E,
+ 'VERTEX_ARRAY_STORAGE_HINT_APPLE': 0x851F,
+ 'MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE': 0x8520,
+ 'VERTEX_ARRAY_RANGE_POINTER_APPLE': 0x8521,
+ 'STORAGE_CACHED_APPLE': 0x85BE,
+ 'STORAGE_SHARED_APPLE': 0x85BF,
+ 'YCBCR_422_APPLE': 0x85B9,
+ 'UNSIGNED_SHORT_8_8_APPLE': 0x85BA,
+ 'UNSIGNED_SHORT_8_8_REV_APPLE': 0x85BB,
+ 'RGBA_FLOAT_MODE_ARB': 0x8820,
+ 'CLAMP_VERTEX_COLOR_ARB': 0x891A,
+ 'CLAMP_FRAGMENT_COLOR_ARB': 0x891B,
+ 'CLAMP_READ_COLOR_ARB': 0x891C,
+ 'FIXED_ONLY_ARB': 0x891D,
+ 'DEPTH_COMPONENT32F': 0x8CAC,
+ 'DEPTH32F_STENCIL8': 0x8CAD,
+ 'FLOAT_32_UNSIGNED_INT_24_8_REV': 0x8DAD,
+ 'DEPTH_COMPONENT16_ARB': 0x81A5,
+ 'DEPTH_COMPONENT24_ARB': 0x81A6,
+ 'DEPTH_COMPONENT32_ARB': 0x81A7,
+ 'TEXTURE_DEPTH_SIZE_ARB': 0x884A,
+ 'DEPTH_TEXTURE_MODE_ARB': 0x884B,
+ 'MAX_DRAW_BUFFERS_ARB': 0x8824,
+ 'DRAW_BUFFER0_ARB': 0x8825,
+ 'DRAW_BUFFER1_ARB': 0x8826,
+ 'DRAW_BUFFER2_ARB': 0x8827,
+ 'DRAW_BUFFER3_ARB': 0x8828,
+ 'DRAW_BUFFER4_ARB': 0x8829,
+ 'DRAW_BUFFER5_ARB': 0x882A,
+ 'DRAW_BUFFER6_ARB': 0x882B,
+ 'DRAW_BUFFER7_ARB': 0x882C,
+ 'DRAW_BUFFER8_ARB': 0x882D,
+ 'DRAW_BUFFER9_ARB': 0x882E,
+ 'DRAW_BUFFER10_ARB': 0x882F,
+ 'DRAW_BUFFER11_ARB': 0x8830,
+ 'DRAW_BUFFER12_ARB': 0x8831,
+ 'DRAW_BUFFER13_ARB': 0x8832,
+ 'DRAW_BUFFER14_ARB': 0x8833,
+ 'DRAW_BUFFER15_ARB': 0x8834,
+ 'FRAGMENT_PROGRAM_ARB': 0x8804,
+ 'PROGRAM_ALU_INSTRUCTIONS_ARB': 0x8805,
+ 'PROGRAM_TEX_INSTRUCTIONS_ARB': 0x8806,
+ 'PROGRAM_TEX_INDIRECTIONS_ARB': 0x8807,
+ 'PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB': 0x8808,
+ 'PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB': 0x8809,
+ 'PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB': 0x880A,
+ 'MAX_PROGRAM_ALU_INSTRUCTIONS_ARB': 0x880B,
+ 'MAX_PROGRAM_TEX_INSTRUCTIONS_ARB': 0x880C,
+ 'MAX_PROGRAM_TEX_INDIRECTIONS_ARB': 0x880D,
+ 'MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB': 0x880E,
+ 'MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB': 0x880F,
+ 'MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB': 0x8810,
+ 'MAX_TEXTURE_COORDS_ARB': 0x8871,
+ 'MAX_TEXTURE_IMAGE_UNITS_ARB': 0x8872,
+ 'FRAGMENT_SHADER_ARB': 0x8B30,
+ 'MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB': 0x8B49,
+ 'FRAGMENT_SHADER_DERIVATIVE_HINT_ARB': 0x8B8B,
+ 'INVALID_FRAMEBUFFER_OPERATION': 0x0506,
+ 'FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING': 0x8210,
+ 'FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE': 0x8211,
+ 'FRAMEBUFFER_ATTACHMENT_RED_SIZE': 0x8212,
+ 'FRAMEBUFFER_ATTACHMENT_GREEN_SIZE': 0x8213,
+ 'FRAMEBUFFER_ATTACHMENT_BLUE_SIZE': 0x8214,
+ 'FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE': 0x8215,
+ 'FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE': 0x8216,
+ 'FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE': 0x8217,
+ 'FRAMEBUFFER_DEFAULT': 0x8218,
+ 'FRAMEBUFFER_UNDEFINED': 0x8219,
+ 'DEPTH_STENCIL_ATTACHMENT': 0x821A,
+ 'INDEX': 0x8222,
+ 'MAX_RENDERBUFFER_SIZE': 0x84E8,
+ 'DEPTH_STENCIL': 0x84F9,
+ 'UNSIGNED_INT_24_8': 0x84FA,
+ 'DEPTH24_STENCIL8': 0x88F0,
+ 'TEXTURE_STENCIL_SIZE': 0x88F1,
+ 'UNSIGNED_NORMALIZED': 0x8C17,
+ 'SRGB': 0x8C40,
+ 'DRAW_FRAMEBUFFER_BINDING': 0x8CA6,
+ 'FRAMEBUFFER_BINDING': 0x8CA6,
+ 'RENDERBUFFER_BINDING': 0x8CA7,
+ 'READ_FRAMEBUFFER': 0x8CA8,
+ 'DRAW_FRAMEBUFFER': 0x8CA9,
+ 'READ_FRAMEBUFFER_BINDING': 0x8CAA,
+ 'RENDERBUFFER_SAMPLES': 0x8CAB,
+ 'FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE': 0x8CD0,
+ 'FRAMEBUFFER_ATTACHMENT_OBJECT_NAME': 0x8CD1,
+ 'FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL': 0x8CD2,
+ 'FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE': 0x8CD3,
+ 'FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER': 0x8CD4,
+ 'FRAMEBUFFER_COMPLETE': 0x8CD5,
+ 'FRAMEBUFFER_INCOMPLETE_ATTACHMENT': 0x8CD6,
+ 'FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT': 0x8CD7,
+ 'FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER': 0x8CDB,
+ 'FRAMEBUFFER_INCOMPLETE_READ_BUFFER': 0x8CDC,
+ 'FRAMEBUFFER_UNSUPPORTED': 0x8CDD,
+ 'MAX_COLOR_ATTACHMENTS': 0x8CDF,
+ 'COLOR_ATTACHMENT0': 0x8CE0,
+ 'COLOR_ATTACHMENT1': 0x8CE1,
+ 'COLOR_ATTACHMENT2': 0x8CE2,
+ 'COLOR_ATTACHMENT3': 0x8CE3,
+ 'COLOR_ATTACHMENT4': 0x8CE4,
+ 'COLOR_ATTACHMENT5': 0x8CE5,
+ 'COLOR_ATTACHMENT6': 0x8CE6,
+ 'COLOR_ATTACHMENT7': 0x8CE7,
+ 'COLOR_ATTACHMENT8': 0x8CE8,
+ 'COLOR_ATTACHMENT9': 0x8CE9,
+ 'COLOR_ATTACHMENT10': 0x8CEA,
+ 'COLOR_ATTACHMENT11': 0x8CEB,
+ 'COLOR_ATTACHMENT12': 0x8CEC,
+ 'COLOR_ATTACHMENT13': 0x8CED,
+ 'COLOR_ATTACHMENT14': 0x8CEE,
+ 'COLOR_ATTACHMENT15': 0x8CEF,
+ 'DEPTH_ATTACHMENT': 0x8D00,
+ 'STENCIL_ATTACHMENT': 0x8D20,
+ 'FRAMEBUFFER': 0x8D40,
+ 'RENDERBUFFER': 0x8D41,
+ 'RENDERBUFFER_WIDTH': 0x8D42,
+ 'RENDERBUFFER_HEIGHT': 0x8D43,
+ 'RENDERBUFFER_INTERNAL_FORMAT': 0x8D44,
+ 'STENCIL_INDEX1': 0x8D46,
+ 'STENCIL_INDEX4': 0x8D47,
+ 'STENCIL_INDEX8': 0x8D48,
+ 'STENCIL_INDEX16': 0x8D49,
+ 'RENDERBUFFER_RED_SIZE': 0x8D50,
+ 'RENDERBUFFER_GREEN_SIZE': 0x8D51,
+ 'RENDERBUFFER_BLUE_SIZE': 0x8D52,
+ 'RENDERBUFFER_ALPHA_SIZE': 0x8D53,
+ 'RENDERBUFFER_DEPTH_SIZE': 0x8D54,
+ 'RENDERBUFFER_STENCIL_SIZE': 0x8D55,
+ 'FRAMEBUFFER_INCOMPLETE_MULTISAMPLE': 0x8D56,
+ 'MAX_SAMPLES': 0x8D57,
+ 'FRAMEBUFFER_SRGB': 0x8DB9,
+ 'LINES_ADJACENCY_ARB': 0xA,
+ 'LINE_STRIP_ADJACENCY_ARB': 0xB,
+ 'TRIANGLES_ADJACENCY_ARB': 0xC,
+ 'TRIANGLE_STRIP_ADJACENCY_ARB': 0xD,
+ 'PROGRAM_POINT_SIZE_ARB': 0x8642,
+ 'MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB': 0x8C29,
+ 'FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER': 0x8CD4,
+ 'FRAMEBUFFER_ATTACHMENT_LAYERED_ARB': 0x8DA7,
+ 'FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB': 0x8DA8,
+ 'FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB': 0x8DA9,
+ 'GEOMETRY_SHADER_ARB': 0x8DD9,
+ 'GEOMETRY_VERTICES_OUT_ARB': 0x8DDA,
+ 'GEOMETRY_INPUT_TYPE_ARB': 0x8DDB,
+ 'GEOMETRY_OUTPUT_TYPE_ARB': 0x8DDC,
+ 'MAX_GEOMETRY_VARYING_COMPONENTS_ARB': 0x8DDD,
+ 'MAX_VERTEX_VARYING_COMPONENTS_ARB': 0x8DDE,
+ 'MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB': 0x8DDF,
+ 'MAX_GEOMETRY_OUTPUT_VERTICES_ARB': 0x8DE0,
+ 'MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB': 0x8DE1,
+ 'HALF_FLOAT_ARB': 0x140B,
+ 'HALF_FLOAT': 0x140B,
+ 'CONSTANT_COLOR': 0x8001,
+ 'ONE_MINUS_CONSTANT_COLOR': 0x8002,
+ 'CONSTANT_ALPHA': 0x8003,
+ 'ONE_MINUS_CONSTANT_ALPHA': 0x8004,
+ 'BLEND_COLOR': 0x8005,
+ 'FUNC_ADD': 0x8006,
+ 'MIN': 0x8007,
+ 'MAX': 0x8008,
+ 'BLEND_EQUATION': 0x8009,
+ 'FUNC_SUBTRACT': 0x800A,
+ 'FUNC_REVERSE_SUBTRACT': 0x800B,
+ 'CONVOLUTION_1D': 0x8010,
+ 'CONVOLUTION_2D': 0x8011,
+ 'SEPARABLE_2D': 0x8012,
+ 'CONVOLUTION_BORDER_MODE': 0x8013,
+ 'CONVOLUTION_FILTER_SCALE': 0x8014,
+ 'CONVOLUTION_FILTER_BIAS': 0x8015,
+ 'REDUCE': 0x8016,
+ 'CONVOLUTION_FORMAT': 0x8017,
+ 'CONVOLUTION_WIDTH': 0x8018,
+ 'CONVOLUTION_HEIGHT': 0x8019,
+ 'MAX_CONVOLUTION_WIDTH': 0x801A,
+ 'MAX_CONVOLUTION_HEIGHT': 0x801B,
+ 'POST_CONVOLUTION_RED_SCALE': 0x801C,
+ 'POST_CONVOLUTION_GREEN_SCALE': 0x801D,
+ 'POST_CONVOLUTION_BLUE_SCALE': 0x801E,
+ 'POST_CONVOLUTION_ALPHA_SCALE': 0x801F,
+ 'POST_CONVOLUTION_RED_BIAS': 0x8020,
+ 'POST_CONVOLUTION_GREEN_BIAS': 0x8021,
+ 'POST_CONVOLUTION_BLUE_BIAS': 0x8022,
+ 'POST_CONVOLUTION_ALPHA_BIAS': 0x8023,
+ 'HISTOGRAM': 0x8024,
+ 'PROXY_HISTOGRAM': 0x8025,
+ 'HISTOGRAM_WIDTH': 0x8026,
+ 'HISTOGRAM_FORMAT': 0x8027,
+ 'HISTOGRAM_RED_SIZE': 0x8028,
+ 'HISTOGRAM_GREEN_SIZE': 0x8029,
+ 'HISTOGRAM_BLUE_SIZE': 0x802A,
+ 'HISTOGRAM_ALPHA_SIZE': 0x802B,
+ 'HISTOGRAM_LUMINANCE_SIZE': 0x802C,
+ 'HISTOGRAM_SINK': 0x802D,
+ 'MINMAX': 0x802E,
+ 'MINMAX_FORMAT': 0x802F,
+ 'MINMAX_SINK': 0x8030,
+ 'TABLE_TOO_LARGE': 0x8031,
+ 'COLOR_MATRIX': 0x80B1,
+ 'COLOR_MATRIX_STACK_DEPTH': 0x80B2,
+ 'MAX_COLOR_MATRIX_STACK_DEPTH': 0x80B3,
+ 'POST_COLOR_MATRIX_RED_SCALE': 0x80B4,
+ 'POST_COLOR_MATRIX_GREEN_SCALE': 0x80B5,
+ 'POST_COLOR_MATRIX_BLUE_SCALE': 0x80B6,
+ 'POST_COLOR_MATRIX_ALPHA_SCALE': 0x80B7,
+ 'POST_COLOR_MATRIX_RED_BIAS': 0x80B8,
+ 'POST_COLOR_MATRIX_GREEN_BIAS': 0x80B9,
+ 'POST_COLOR_MATRIX_BLUE_BIAS': 0x80BA,
+ 'POST_COLOR_MATRIX_ALPHA_BIAS': 0x80BB,
+ 'COLOR_TABLE': 0x80D0,
+ 'POST_CONVOLUTION_COLOR_TABLE': 0x80D1,
+ 'POST_COLOR_MATRIX_COLOR_TABLE': 0x80D2,
+ 'PROXY_COLOR_TABLE': 0x80D3,
+ 'PROXY_POST_CONVOLUTION_COLOR_TABLE': 0x80D4,
+ 'PROXY_POST_COLOR_MATRIX_COLOR_TABLE': 0x80D5,
+ 'COLOR_TABLE_SCALE': 0x80D6,
+ 'COLOR_TABLE_BIAS': 0x80D7,
+ 'COLOR_TABLE_FORMAT': 0x80D8,
+ 'COLOR_TABLE_WIDTH': 0x80D9,
+ 'COLOR_TABLE_RED_SIZE': 0x80DA,
+ 'COLOR_TABLE_GREEN_SIZE': 0x80DB,
+ 'COLOR_TABLE_BLUE_SIZE': 0x80DC,
+ 'COLOR_TABLE_ALPHA_SIZE': 0x80DD,
+ 'COLOR_TABLE_LUMINANCE_SIZE': 0x80DE,
+ 'COLOR_TABLE_INTENSITY_SIZE': 0x80DF,
+ 'IGNORE_BORDER': 0x8150,
+ 'CONSTANT_BORDER': 0x8151,
+ 'WRAP_BORDER': 0x8152,
+ 'REPLICATE_BORDER': 0x8153,
+ 'CONVOLUTION_BORDER_COLOR': 0x8154,
+ 'VERTEX_ATTRIB_ARRAY_DIVISOR_ARB': 0x88FE,
+ 'MAP_READ_BIT': 0x0001,
+ 'MAP_WRITE_BIT': 0x0002,
+ 'MAP_INVALIDATE_RANGE_BIT': 0x0004,
+ 'MAP_INVALIDATE_BUFFER_BIT': 0x0008,
+ 'MAP_FLUSH_EXPLICIT_BIT': 0x0010,
+ 'MAP_UNSYNCHRONIZED_BIT': 0x0020,
+ 'MATRIX_PALETTE_ARB': 0x8840,
+ 'MAX_MATRIX_PALETTE_STACK_DEPTH_ARB': 0x8841,
+ 'MAX_PALETTE_MATRICES_ARB': 0x8842,
+ 'CURRENT_PALETTE_MATRIX_ARB': 0x8843,
+ 'MATRIX_INDEX_ARRAY_ARB': 0x8844,
+ 'CURRENT_MATRIX_INDEX_ARB': 0x8845,
+ 'MATRIX_INDEX_ARRAY_SIZE_ARB': 0x8846,
+ 'MATRIX_INDEX_ARRAY_TYPE_ARB': 0x8847,
+ 'MATRIX_INDEX_ARRAY_STRIDE_ARB': 0x8848,
+ 'MATRIX_INDEX_ARRAY_POINTER_ARB': 0x8849,
+ 'MULTISAMPLE_ARB': 0x809D,
+ 'SAMPLE_ALPHA_TO_COVERAGE_ARB': 0x809E,
+ 'SAMPLE_ALPHA_TO_ONE_ARB': 0x809F,
+ 'SAMPLE_COVERAGE_ARB': 0x80A0,
+ 'SAMPLE_BUFFERS_ARB': 0x80A8,
+ 'SAMPLES_ARB': 0x80A9,
+ 'SAMPLE_COVERAGE_VALUE_ARB': 0x80AA,
+ 'SAMPLE_COVERAGE_INVERT_ARB': 0x80AB,
+ 'MULTISAMPLE_BIT_ARB': 0x20000000,
+ 'TEXTURE0_ARB': 0x84C0,
+ 'TEXTURE1_ARB': 0x84C1,
+ 'TEXTURE2_ARB': 0x84C2,
+ 'TEXTURE3_ARB': 0x84C3,
+ 'TEXTURE4_ARB': 0x84C4,
+ 'TEXTURE5_ARB': 0x84C5,
+ 'TEXTURE6_ARB': 0x84C6,
+ 'TEXTURE7_ARB': 0x84C7,
+ 'TEXTURE8_ARB': 0x84C8,
+ 'TEXTURE9_ARB': 0x84C9,
+ 'TEXTURE10_ARB': 0x84CA,
+ 'TEXTURE11_ARB': 0x84CB,
+ 'TEXTURE12_ARB': 0x84CC,
+ 'TEXTURE13_ARB': 0x84CD,
+ 'TEXTURE14_ARB': 0x84CE,
+ 'TEXTURE15_ARB': 0x84CF,
+ 'TEXTURE16_ARB': 0x84D0,
+ 'TEXTURE17_ARB': 0x84D1,
+ 'TEXTURE18_ARB': 0x84D2,
+ 'TEXTURE19_ARB': 0x84D3,
+ 'TEXTURE20_ARB': 0x84D4,
+ 'TEXTURE21_ARB': 0x84D5,
+ 'TEXTURE22_ARB': 0x84D6,
+ 'TEXTURE23_ARB': 0x84D7,
+ 'TEXTURE24_ARB': 0x84D8,
+ 'TEXTURE25_ARB': 0x84D9,
+ 'TEXTURE26_ARB': 0x84DA,
+ 'TEXTURE27_ARB': 0x84DB,
+ 'TEXTURE28_ARB': 0x84DC,
+ 'TEXTURE29_ARB': 0x84DD,
+ 'TEXTURE30_ARB': 0x84DE,
+ 'TEXTURE31_ARB': 0x84DF,
+ 'ACTIVE_TEXTURE_ARB': 0x84E0,
+ 'CLIENT_ACTIVE_TEXTURE_ARB': 0x84E1,
+ 'MAX_TEXTURE_UNITS_ARB': 0x84E2,
+ 'QUERY_COUNTER_BITS_ARB': 0x8864,
+ 'CURRENT_QUERY_ARB': 0x8865,
+ 'QUERY_RESULT_ARB': 0x8866,
+ 'QUERY_RESULT_AVAILABLE_ARB': 0x8867,
+ 'SAMPLES_PASSED_ARB': 0x8914,
+ 'PIXEL_PACK_BUFFER_ARB': 0x88EB,
+ 'PIXEL_UNPACK_BUFFER_ARB': 0x88EC,
+ 'PIXEL_PACK_BUFFER_BINDING_ARB': 0x88ED,
+ 'PIXEL_UNPACK_BUFFER_BINDING_ARB': 0x88EF,
+ 'POINT_SIZE_MIN_ARB': 0x8126,
+ 'POINT_SIZE_MAX_ARB': 0x8127,
+ 'POINT_FADE_THRESHOLD_SIZE_ARB': 0x8128,
+ 'POINT_DISTANCE_ATTENUATION_ARB': 0x8129,
+ 'POINT_SPRITE_ARB': 0x8861,
+ 'COORD_REPLACE_ARB': 0x8862,
+ 'PROGRAM_OBJECT_ARB': 0x8B40,
+ 'SHADER_OBJECT_ARB': 0x8B48,
+ 'OBJECT_TYPE_ARB': 0x8B4E,
+ 'OBJECT_SUBTYPE_ARB': 0x8B4F,
+ 'FLOAT_VEC2_ARB': 0x8B50,
+ 'FLOAT_VEC3_ARB': 0x8B51,
+ 'FLOAT_VEC4_ARB': 0x8B52,
+ 'INT_VEC2_ARB': 0x8B53,
+ 'INT_VEC3_ARB': 0x8B54,
+ 'INT_VEC4_ARB': 0x8B55,
+ 'BOOL_ARB': 0x8B56,
+ 'BOOL_VEC2_ARB': 0x8B57,
+ 'BOOL_VEC3_ARB': 0x8B58,
+ 'BOOL_VEC4_ARB': 0x8B59,
+ 'FLOAT_MAT2_ARB': 0x8B5A,
+ 'FLOAT_MAT3_ARB': 0x8B5B,
+ 'FLOAT_MAT4_ARB': 0x8B5C,
+ 'SAMPLER_1D_ARB': 0x8B5D,
+ 'SAMPLER_2D_ARB': 0x8B5E,
+ 'SAMPLER_3D_ARB': 0x8B5F,
+ 'SAMPLER_CUBE_ARB': 0x8B60,
+ 'SAMPLER_1D_SHADOW_ARB': 0x8B61,
+ 'SAMPLER_2D_SHADOW_ARB': 0x8B62,
+ 'SAMPLER_2D_RECT_ARB': 0x8B63,
+ 'SAMPLER_2D_RECT_SHADOW_ARB': 0x8B64,
+ 'OBJECT_DELETE_STATUS_ARB': 0x8B80,
+ 'OBJECT_COMPILE_STATUS_ARB': 0x8B81,
+ 'OBJECT_LINK_STATUS_ARB': 0x8B82,
+ 'OBJECT_VALIDATE_STATUS_ARB': 0x8B83,
+ 'OBJECT_INFO_LOG_LENGTH_ARB': 0x8B84,
+ 'OBJECT_ATTACHED_OBJECTS_ARB': 0x8B85,
+ 'OBJECT_ACTIVE_UNIFORMS_ARB': 0x8B86,
+ 'OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB': 0x8B87,
+ 'OBJECT_SHADER_SOURCE_LENGTH_ARB': 0x8B88,
+ 'SHADING_LANGUAGE_VERSION_ARB': 0x8B8C,
+ 'TEXTURE_COMPARE_MODE_ARB': 0x884C,
+ 'TEXTURE_COMPARE_FUNC_ARB': 0x884D,
+ 'COMPARE_R_TO_TEXTURE_ARB': 0x884E,
+ 'TEXTURE_COMPARE_FAIL_VALUE_ARB': 0x80BF,
+ 'CLAMP_TO_BORDER_ARB': 0x812D,
+ 'TEXTURE_BUFFER_ARB': 0x8C2A,
+ 'MAX_TEXTURE_BUFFER_SIZE_ARB': 0x8C2B,
+ 'TEXTURE_BINDING_BUFFER_ARB': 0x8C2C,
+ 'TEXTURE_BUFFER_DATA_STORE_BINDING_ARB': 0x8C2D,
+ 'TEXTURE_BUFFER_FORMAT_ARB': 0x8C2E,
+ 'COMPRESSED_ALPHA_ARB': 0x84E9,
+ 'COMPRESSED_LUMINANCE_ARB': 0x84EA,
+ 'COMPRESSED_LUMINANCE_ALPHA_ARB': 0x84EB,
+ 'COMPRESSED_INTENSITY_ARB': 0x84EC,
+ 'COMPRESSED_RGB_ARB': 0x84ED,
+ 'COMPRESSED_RGBA_ARB': 0x84EE,
+ 'TEXTURE_COMPRESSION_HINT_ARB': 0x84EF,
+ 'TEXTURE_COMPRESSED_IMAGE_SIZE_ARB': 0x86A0,
+ 'TEXTURE_COMPRESSED_ARB': 0x86A1,
+ 'NUM_COMPRESSED_TEXTURE_FORMATS_ARB': 0x86A2,
+ 'COMPRESSED_TEXTURE_FORMATS_ARB': 0x86A3,
+ 'COMPRESSED_RED_RGTC1': 0x8DBB,
+ 'COMPRESSED_SIGNED_RED_RGTC1': 0x8DBC,
+ 'COMPRESSED_RG_RGTC2': 0x8DBD,
+ 'COMPRESSED_SIGNED_RG_RGTC2': 0x8DBE,
+ 'NORMAL_MAP_ARB': 0x8511,
+ 'REFLECTION_MAP_ARB': 0x8512,
+ 'TEXTURE_CUBE_MAP_ARB': 0x8513,
+ 'TEXTURE_BINDING_CUBE_MAP_ARB': 0x8514,
+ 'TEXTURE_CUBE_MAP_POSITIVE_X_ARB': 0x8515,
+ 'TEXTURE_CUBE_MAP_NEGATIVE_X_ARB': 0x8516,
+ 'TEXTURE_CUBE_MAP_POSITIVE_Y_ARB': 0x8517,
+ 'TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB': 0x8518,
+ 'TEXTURE_CUBE_MAP_POSITIVE_Z_ARB': 0x8519,
+ 'TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB': 0x851A,
+ 'PROXY_TEXTURE_CUBE_MAP_ARB': 0x851B,
+ 'MAX_CUBE_MAP_TEXTURE_SIZE_ARB': 0x851C,
+ 'SUBTRACT_ARB': 0x84E7,
+ 'COMBINE_ARB': 0x8570,
+ 'COMBINE_RGB_ARB': 0x8571,
+ 'COMBINE_ALPHA_ARB': 0x8572,
+ 'RGB_SCALE_ARB': 0x8573,
+ 'ADD_SIGNED_ARB': 0x8574,
+ 'INTERPOLATE_ARB': 0x8575,
+ 'CONSTANT_ARB': 0x8576,
+ 'PRIMARY_COLOR_ARB': 0x8577,
+ 'PREVIOUS_ARB': 0x8578,
+ 'SOURCE0_RGB_ARB': 0x8580,
+ 'SOURCE1_RGB_ARB': 0x8581,
+ 'SOURCE2_RGB_ARB': 0x8582,
+ 'SOURCE0_ALPHA_ARB': 0x8588,
+ 'SOURCE1_ALPHA_ARB': 0x8589,
+ 'SOURCE2_ALPHA_ARB': 0x858A,
+ 'OPERAND0_RGB_ARB': 0x8590,
+ 'OPERAND1_RGB_ARB': 0x8591,
+ 'OPERAND2_RGB_ARB': 0x8592,
+ 'OPERAND0_ALPHA_ARB': 0x8598,
+ 'OPERAND1_ALPHA_ARB': 0x8599,
+ 'OPERAND2_ALPHA_ARB': 0x859A,
+ 'DOT3_RGB_ARB': 0x86AE,
+ 'DOT3_RGBA_ARB': 0x86AF,
+ 'RGBA32F_ARB': 0x8814,
+ 'RGB32F_ARB': 0x8815,
+ 'ALPHA32F_ARB': 0x8816,
+ 'INTENSITY32F_ARB': 0x8817,
+ 'LUMINANCE32F_ARB': 0x8818,
+ 'LUMINANCE_ALPHA32F_ARB': 0x8819,
+ 'RGBA16F_ARB': 0x881A,
+ 'RGB16F_ARB': 0x881B,
+ 'ALPHA16F_ARB': 0x881C,
+ 'INTENSITY16F_ARB': 0x881D,
+ 'LUMINANCE16F_ARB': 0x881E,
+ 'LUMINANCE_ALPHA16F_ARB': 0x881F,
+ 'TEXTURE_RED_TYPE_ARB': 0x8C10,
+ 'TEXTURE_GREEN_TYPE_ARB': 0x8C11,
+ 'TEXTURE_BLUE_TYPE_ARB': 0x8C12,
+ 'TEXTURE_ALPHA_TYPE_ARB': 0x8C13,
+ 'TEXTURE_LUMINANCE_TYPE_ARB': 0x8C14,
+ 'TEXTURE_INTENSITY_TYPE_ARB': 0x8C15,
+ 'TEXTURE_DEPTH_TYPE_ARB': 0x8C16,
+ 'UNSIGNED_NORMALIZED_ARB': 0x8C17,
+ 'MIRRORED_REPEAT_ARB': 0x8370,
+ 'TEXTURE_RECTANGLE_ARB': 0x84F5,
+ 'TEXTURE_BINDING_RECTANGLE_ARB': 0x84F6,
+ 'PROXY_TEXTURE_RECTANGLE_ARB': 0x84F7,
+ 'MAX_RECTANGLE_TEXTURE_SIZE_ARB': 0x84F8,
+ 'SAMPLER_2D_RECT_ARB': 0x8B63,
+ 'SAMPLER_2D_RECT_SHADOW_ARB': 0x8B64,
+ 'RED': 0x1903,
+ 'RG': 0x8227,
+ 'RG_INTEGER': 0x8228,
+ 'R8': 0x8229,
+ 'R16': 0x822A,
+ 'RG8': 0x822B,
+ 'RG16': 0x822C,
+ 'R16F': 0x822D,
+ 'R32F': 0x822E,
+ 'RG16F': 0x822F,
+ 'RG32F': 0x8230,
+ 'R8I': 0x8231,
+ 'R8UI': 0x8232,
+ 'R16I': 0x8233,
+ 'R16UI': 0x8234,
+ 'R32I': 0x8235,
+ 'R32UI': 0x8236,
+ 'RG8I': 0x8237,
+ 'RG8UI': 0x8238,
+ 'RG16I': 0x8239,
+ 'RG16UI': 0x823A,
+ 'RG32I': 0x823B,
+ 'RG32UI': 0x823C,
+ 'TRANSPOSE_MODELVIEW_MATRIX_ARB': 0x84E3,
+ 'TRANSPOSE_PROJECTION_MATRIX_ARB': 0x84E4,
+ 'TRANSPOSE_TEXTURE_MATRIX_ARB': 0x84E5,
+ 'TRANSPOSE_COLOR_MATRIX_ARB': 0x84E6,
+ 'VERTEX_ARRAY_BINDING': 0x85B5,
+ 'MODELVIEW0_ARB': 0x1700,
+ 'MODELVIEW1_ARB': 0x850A,
+ 'MAX_VERTEX_UNITS_ARB': 0x86A4,
+ 'ACTIVE_VERTEX_UNITS_ARB': 0x86A5,
+ 'WEIGHT_SUM_UNITY_ARB': 0x86A6,
+ 'VERTEX_BLEND_ARB': 0x86A7,
+ 'CURRENT_WEIGHT_ARB': 0x86A8,
+ 'WEIGHT_ARRAY_TYPE_ARB': 0x86A9,
+ 'WEIGHT_ARRAY_STRIDE_ARB': 0x86AA,
+ 'WEIGHT_ARRAY_SIZE_ARB': 0x86AB,
+ 'WEIGHT_ARRAY_POINTER_ARB': 0x86AC,
+ 'WEIGHT_ARRAY_ARB': 0x86AD,
+ 'MODELVIEW2_ARB': 0x8722,
+ 'MODELVIEW3_ARB': 0x8723,
+ 'MODELVIEW4_ARB': 0x8724,
+ 'MODELVIEW5_ARB': 0x8725,
+ 'MODELVIEW6_ARB': 0x8726,
+ 'MODELVIEW7_ARB': 0x8727,
+ 'MODELVIEW8_ARB': 0x8728,
+ 'MODELVIEW9_ARB': 0x8729,
+ 'MODELVIEW10_ARB': 0x872A,
+ 'MODELVIEW11_ARB': 0x872B,
+ 'MODELVIEW12_ARB': 0x872C,
+ 'MODELVIEW13_ARB': 0x872D,
+ 'MODELVIEW14_ARB': 0x872E,
+ 'MODELVIEW15_ARB': 0x872F,
+ 'MODELVIEW16_ARB': 0x8730,
+ 'MODELVIEW17_ARB': 0x8731,
+ 'MODELVIEW18_ARB': 0x8732,
+ 'MODELVIEW19_ARB': 0x8733,
+ 'MODELVIEW20_ARB': 0x8734,
+ 'MODELVIEW21_ARB': 0x8735,
+ 'MODELVIEW22_ARB': 0x8736,
+ 'MODELVIEW23_ARB': 0x8737,
+ 'MODELVIEW24_ARB': 0x8738,
+ 'MODELVIEW25_ARB': 0x8739,
+ 'MODELVIEW26_ARB': 0x873A,
+ 'MODELVIEW27_ARB': 0x873B,
+ 'MODELVIEW28_ARB': 0x873C,
+ 'MODELVIEW29_ARB': 0x873D,
+ 'MODELVIEW30_ARB': 0x873E,
+ 'MODELVIEW31_ARB': 0x873F,
+ 'BUFFER_SIZE_ARB': 0x8764,
+ 'BUFFER_USAGE_ARB': 0x8765,
+ 'ARRAY_BUFFER_ARB': 0x8892,
+ 'ELEMENT_ARRAY_BUFFER_ARB': 0x8893,
+ 'ARRAY_BUFFER_BINDING_ARB': 0x8894,
+ 'ELEMENT_ARRAY_BUFFER_BINDING_ARB': 0x8895,
+ 'VERTEX_ARRAY_BUFFER_BINDING_ARB': 0x8896,
+ 'NORMAL_ARRAY_BUFFER_BINDING_ARB': 0x8897,
+ 'COLOR_ARRAY_BUFFER_BINDING_ARB': 0x8898,
+ 'INDEX_ARRAY_BUFFER_BINDING_ARB': 0x8899,
+ 'TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB': 0x889A,
+ 'EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB': 0x889B,
+ 'SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB': 0x889C,
+ 'FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB': 0x889D,
+ 'WEIGHT_ARRAY_BUFFER_BINDING_ARB': 0x889E,
+ 'VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB': 0x889F,
+ 'READ_ONLY_ARB': 0x88B8,
+ 'WRITE_ONLY_ARB': 0x88B9,
+ 'READ_WRITE_ARB': 0x88BA,
+ 'BUFFER_ACCESS_ARB': 0x88BB,
+ 'BUFFER_MAPPED_ARB': 0x88BC,
+ 'BUFFER_MAP_POINTER_ARB': 0x88BD,
+ 'STREAM_DRAW_ARB': 0x88E0,
+ 'STREAM_READ_ARB': 0x88E1,
+ 'STREAM_COPY_ARB': 0x88E2,
+ 'STATIC_DRAW_ARB': 0x88E4,
+ 'STATIC_READ_ARB': 0x88E5,
+ 'STATIC_COPY_ARB': 0x88E6,
+ 'DYNAMIC_DRAW_ARB': 0x88E8,
+ 'DYNAMIC_READ_ARB': 0x88E9,
+ 'DYNAMIC_COPY_ARB': 0x88EA,
+ 'COLOR_SUM_ARB': 0x8458,
+ 'VERTEX_PROGRAM_ARB': 0x8620,
+ 'VERTEX_ATTRIB_ARRAY_ENABLED_ARB': 0x8622,
+ 'VERTEX_ATTRIB_ARRAY_SIZE_ARB': 0x8623,
+ 'VERTEX_ATTRIB_ARRAY_STRIDE_ARB': 0x8624,
+ 'VERTEX_ATTRIB_ARRAY_TYPE_ARB': 0x8625,
+ 'CURRENT_VERTEX_ATTRIB_ARB': 0x8626,
+ 'PROGRAM_LENGTH_ARB': 0x8627,
+ 'PROGRAM_STRING_ARB': 0x8628,
+ 'MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB': 0x862E,
+ 'MAX_PROGRAM_MATRICES_ARB': 0x862F,
+ 'CURRENT_MATRIX_STACK_DEPTH_ARB': 0x8640,
+ 'CURRENT_MATRIX_ARB': 0x8641,
+ 'VERTEX_PROGRAM_POINT_SIZE_ARB': 0x8642,
+ 'VERTEX_PROGRAM_TWO_SIDE_ARB': 0x8643,
+ 'VERTEX_ATTRIB_ARRAY_POINTER_ARB': 0x8645,
+ 'PROGRAM_ERROR_POSITION_ARB': 0x864B,
+ 'PROGRAM_BINDING_ARB': 0x8677,
+ 'MAX_VERTEX_ATTRIBS_ARB': 0x8869,
+ 'VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB': 0x886A,
+ 'PROGRAM_ERROR_STRING_ARB': 0x8874,
+ 'PROGRAM_FORMAT_ASCII_ARB': 0x8875,
+ 'PROGRAM_FORMAT_ARB': 0x8876,
+ 'PROGRAM_INSTRUCTIONS_ARB': 0x88A0,
+ 'MAX_PROGRAM_INSTRUCTIONS_ARB': 0x88A1,
+ 'PROGRAM_NATIVE_INSTRUCTIONS_ARB': 0x88A2,
+ 'MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB': 0x88A3,
+ 'PROGRAM_TEMPORARIES_ARB': 0x88A4,
+ 'MAX_PROGRAM_TEMPORARIES_ARB': 0x88A5,
+ 'PROGRAM_NATIVE_TEMPORARIES_ARB': 0x88A6,
+ 'MAX_PROGRAM_NATIVE_TEMPORARIES_ARB': 0x88A7,
+ 'PROGRAM_PARAMETERS_ARB': 0x88A8,
+ 'MAX_PROGRAM_PARAMETERS_ARB': 0x88A9,
+ 'PROGRAM_NATIVE_PARAMETERS_ARB': 0x88AA,
+ 'MAX_PROGRAM_NATIVE_PARAMETERS_ARB': 0x88AB,
+ 'PROGRAM_ATTRIBS_ARB': 0x88AC,
+ 'MAX_PROGRAM_ATTRIBS_ARB': 0x88AD,
+ 'PROGRAM_NATIVE_ATTRIBS_ARB': 0x88AE,
+ 'MAX_PROGRAM_NATIVE_ATTRIBS_ARB': 0x88AF,
+ 'PROGRAM_ADDRESS_REGISTERS_ARB': 0x88B0,
+ 'MAX_PROGRAM_ADDRESS_REGISTERS_ARB': 0x88B1,
+ 'PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB': 0x88B2,
+ 'MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB': 0x88B3,
+ 'MAX_PROGRAM_LOCAL_PARAMETERS_ARB': 0x88B4,
+ 'MAX_PROGRAM_ENV_PARAMETERS_ARB': 0x88B5,
+ 'PROGRAM_UNDER_NATIVE_LIMITS_ARB': 0x88B6,
+ 'TRANSPOSE_CURRENT_MATRIX_ARB': 0x88B7,
+ 'MATRIX0_ARB': 0x88C0,
+ 'MATRIX1_ARB': 0x88C1,
+ 'MATRIX2_ARB': 0x88C2,
+ 'MATRIX3_ARB': 0x88C3,
+ 'MATRIX4_ARB': 0x88C4,
+ 'MATRIX5_ARB': 0x88C5,
+ 'MATRIX6_ARB': 0x88C6,
+ 'MATRIX7_ARB': 0x88C7,
+ 'MATRIX8_ARB': 0x88C8,
+ 'MATRIX9_ARB': 0x88C9,
+ 'MATRIX10_ARB': 0x88CA,
+ 'MATRIX11_ARB': 0x88CB,
+ 'MATRIX12_ARB': 0x88CC,
+ 'MATRIX13_ARB': 0x88CD,
+ 'MATRIX14_ARB': 0x88CE,
+ 'MATRIX15_ARB': 0x88CF,
+ 'MATRIX16_ARB': 0x88D0,
+ 'MATRIX17_ARB': 0x88D1,
+ 'MATRIX18_ARB': 0x88D2,
+ 'MATRIX19_ARB': 0x88D3,
+ 'MATRIX20_ARB': 0x88D4,
+ 'MATRIX21_ARB': 0x88D5,
+ 'MATRIX22_ARB': 0x88D6,
+ 'MATRIX23_ARB': 0x88D7,
+ 'MATRIX24_ARB': 0x88D8,
+ 'MATRIX25_ARB': 0x88D9,
+ 'MATRIX26_ARB': 0x88DA,
+ 'MATRIX27_ARB': 0x88DB,
+ 'MATRIX28_ARB': 0x88DC,
+ 'MATRIX29_ARB': 0x88DD,
+ 'MATRIX30_ARB': 0x88DE,
+ 'MATRIX31_ARB': 0x88DF,
+ 'VERTEX_SHADER_ARB': 0x8B31,
+ 'MAX_VERTEX_UNIFORM_COMPONENTS_ARB': 0x8B4A,
+ 'MAX_VARYING_FLOATS_ARB': 0x8B4B,
+ 'MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB': 0x8B4C,
+ 'MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB': 0x8B4D,
+ 'OBJECT_ACTIVE_ATTRIBUTES_ARB': 0x8B89,
+ 'OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB': 0x8B8A,
+ 'TEXTURE_POINT_MODE_ATIX': 0x60B0,
+ 'TEXTURE_POINT_ONE_COORD_ATIX': 0x60B1,
+ 'TEXTURE_POINT_SPRITE_ATIX': 0x60B2,
+ 'POINT_SPRITE_CULL_MODE_ATIX': 0x60B3,
+ 'POINT_SPRITE_CULL_CENTER_ATIX': 0x60B4,
+ 'POINT_SPRITE_CULL_CLIP_ATIX': 0x60B5,
+ 'MODULATE_ADD_ATIX': 0x8744,
+ 'MODULATE_SIGNED_ADD_ATIX': 0x8745,
+ 'MODULATE_SUBTRACT_ATIX': 0x8746,
+ 'SECONDARY_COLOR_ATIX': 0x8747,
+ 'TEXTURE_OUTPUT_RGB_ATIX': 0x8748,
+ 'TEXTURE_OUTPUT_ALPHA_ATIX': 0x8749,
+ 'OUTPUT_POINT_SIZE_ATIX': 0x610E,
+ 'MAX_DRAW_BUFFERS_ATI': 0x8824,
+ 'DRAW_BUFFER0_ATI': 0x8825,
+ 'DRAW_BUFFER1_ATI': 0x8826,
+ 'DRAW_BUFFER2_ATI': 0x8827,
+ 'DRAW_BUFFER3_ATI': 0x8828,
+ 'DRAW_BUFFER4_ATI': 0x8829,
+ 'DRAW_BUFFER5_ATI': 0x882A,
+ 'DRAW_BUFFER6_ATI': 0x882B,
+ 'DRAW_BUFFER7_ATI': 0x882C,
+ 'DRAW_BUFFER8_ATI': 0x882D,
+ 'DRAW_BUFFER9_ATI': 0x882E,
+ 'DRAW_BUFFER10_ATI': 0x882F,
+ 'DRAW_BUFFER11_ATI': 0x8830,
+ 'DRAW_BUFFER12_ATI': 0x8831,
+ 'DRAW_BUFFER13_ATI': 0x8832,
+ 'DRAW_BUFFER14_ATI': 0x8833,
+ 'DRAW_BUFFER15_ATI': 0x8834,
+ 'ELEMENT_ARRAY_ATI': 0x8768,
+ 'ELEMENT_ARRAY_TYPE_ATI': 0x8769,
+ 'ELEMENT_ARRAY_POINTER_ATI': 0x876A,
+ 'BUMP_ROT_MATRIX_ATI': 0x8775,
+ 'BUMP_ROT_MATRIX_SIZE_ATI': 0x8776,
+ 'BUMP_NUM_TEX_UNITS_ATI': 0x8777,
+ 'BUMP_TEX_UNITS_ATI': 0x8778,
+ 'DUDV_ATI': 0x8779,
+ 'DU8DV8_ATI': 0x877A,
+ 'BUMP_ENVMAP_ATI': 0x877B,
+ 'BUMP_TARGET_ATI': 0x877C,
+ 'RED_BIT_ATI': 0x00000001,
+ '2X_BIT_ATI': 0x00000001,
+ '4X_BIT_ATI': 0x00000002,
+ 'GREEN_BIT_ATI': 0x00000002,
+ 'COMP_BIT_ATI': 0x00000002,
+ 'BLUE_BIT_ATI': 0x00000004,
+ '8X_BIT_ATI': 0x00000004,
+ 'NEGATE_BIT_ATI': 0x00000004,
+ 'BIAS_BIT_ATI': 0x00000008,
+ 'HALF_BIT_ATI': 0x00000008,
+ 'QUARTER_BIT_ATI': 0x00000010,
+ 'EIGHTH_BIT_ATI': 0x00000020,
+ 'SATURATE_BIT_ATI': 0x00000040,
+ 'FRAGMENT_SHADER_ATI': 0x8920,
+ 'REG_0_ATI': 0x8921,
+ 'REG_1_ATI': 0x8922,
+ 'REG_2_ATI': 0x8923,
+ 'REG_3_ATI': 0x8924,
+ 'REG_4_ATI': 0x8925,
+ 'REG_5_ATI': 0x8926,
+ 'CON_0_ATI': 0x8941,
+ 'CON_1_ATI': 0x8942,
+ 'CON_2_ATI': 0x8943,
+ 'CON_3_ATI': 0x8944,
+ 'CON_4_ATI': 0x8945,
+ 'CON_5_ATI': 0x8946,
+ 'CON_6_ATI': 0x8947,
+ 'CON_7_ATI': 0x8948,
+ 'MOV_ATI': 0x8961,
+ 'ADD_ATI': 0x8963,
+ 'MUL_ATI': 0x8964,
+ 'SUB_ATI': 0x8965,
+ 'DOT3_ATI': 0x8966,
+ 'DOT4_ATI': 0x8967,
+ 'MAD_ATI': 0x8968,
+ 'LERP_ATI': 0x8969,
+ 'CND_ATI': 0x896A,
+ 'CND0_ATI': 0x896B,
+ 'DOT2_ADD_ATI': 0x896C,
+ 'SECONDARY_INTERPOLATOR_ATI': 0x896D,
+ 'NUM_FRAGMENT_REGISTERS_ATI': 0x896E,
+ 'NUM_FRAGMENT_CONSTANTS_ATI': 0x896F,
+ 'NUM_PASSES_ATI': 0x8970,
+ 'NUM_INSTRUCTIONS_PER_PASS_ATI': 0x8971,
+ 'NUM_INSTRUCTIONS_TOTAL_ATI': 0x8972,
+ 'NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI': 0x8973,
+ 'NUM_LOOPBACK_COMPONENTS_ATI': 0x8974,
+ 'COLOR_ALPHA_PAIRING_ATI': 0x8975,
+ 'SWIZZLE_STR_ATI': 0x8976,
+ 'SWIZZLE_STQ_ATI': 0x8977,
+ 'SWIZZLE_STR_DR_ATI': 0x8978,
+ 'SWIZZLE_STQ_DQ_ATI': 0x8979,
+ 'SWIZZLE_STRQ_ATI': 0x897A,
+ 'SWIZZLE_STRQ_DQ_ATI': 0x897B,
+ 'PN_TRIANGLES_ATI': 0x87F0,
+ 'MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI': 0x87F1,
+ 'PN_TRIANGLES_POINT_MODE_ATI': 0x87F2,
+ 'PN_TRIANGLES_NORMAL_MODE_ATI': 0x87F3,
+ 'PN_TRIANGLES_TESSELATION_LEVEL_ATI': 0x87F4,
+ 'PN_TRIANGLES_POINT_MODE_LINEAR_ATI': 0x87F5,
+ 'PN_TRIANGLES_POINT_MODE_CUBIC_ATI': 0x87F6,
+ 'PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI': 0x87F7,
+ 'PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI': 0x87F8,
+ 'STENCIL_BACK_FUNC_ATI': 0x8800,
+ 'STENCIL_BACK_FAIL_ATI': 0x8801,
+ 'STENCIL_BACK_PASS_DEPTH_FAIL_ATI': 0x8802,
+ 'STENCIL_BACK_PASS_DEPTH_PASS_ATI': 0x8803,
+ 'TEXT_FRAGMENT_SHADER_ATI': 0x8200,
+ 'COMPRESSED_LUMINANCE_ALPHA_3DC_ATI': 0x8837,
+ 'MODULATE_ADD_ATI': 0x8744,
+ 'MODULATE_SIGNED_ADD_ATI': 0x8745,
+ 'MODULATE_SUBTRACT_ATI': 0x8746,
+ 'RGBA_FLOAT32_ATI': 0x8814,
+ 'RGB_FLOAT32_ATI': 0x8815,
+ 'ALPHA_FLOAT32_ATI': 0x8816,
+ 'INTENSITY_FLOAT32_ATI': 0x8817,
+ 'LUMINANCE_FLOAT32_ATI': 0x8818,
+ 'LUMINANCE_ALPHA_FLOAT32_ATI': 0x8819,
+ 'RGBA_FLOAT16_ATI': 0x881A,
+ 'RGB_FLOAT16_ATI': 0x881B,
+ 'ALPHA_FLOAT16_ATI': 0x881C,
+ 'INTENSITY_FLOAT16_ATI': 0x881D,
+ 'LUMINANCE_FLOAT16_ATI': 0x881E,
+ 'LUMINANCE_ALPHA_FLOAT16_ATI': 0x881F,
+ 'MIRROR_CLAMP_ATI': 0x8742,
+ 'MIRROR_CLAMP_TO_EDGE_ATI': 0x8743,
+ 'STATIC_ATI': 0x8760,
+ 'DYNAMIC_ATI': 0x8761,
+ 'PRESERVE_ATI': 0x8762,
+ 'DISCARD_ATI': 0x8763,
+ 'OBJECT_BUFFER_SIZE_ATI': 0x8764,
+ 'OBJECT_BUFFER_USAGE_ATI': 0x8765,
+ 'ARRAY_OBJECT_BUFFER_ATI': 0x8766,
+ 'ARRAY_OBJECT_OFFSET_ATI': 0x8767,
+ 'MAX_VERTEX_STREAMS_ATI': 0x876B,
+ 'VERTEX_SOURCE_ATI': 0x876C,
+ 'VERTEX_STREAM0_ATI': 0x876D,
+ 'VERTEX_STREAM1_ATI': 0x876E,
+ 'VERTEX_STREAM2_ATI': 0x876F,
+ 'VERTEX_STREAM3_ATI': 0x8770,
+ 'VERTEX_STREAM4_ATI': 0x8771,
+ 'VERTEX_STREAM5_ATI': 0x8772,
+ 'VERTEX_STREAM6_ATI': 0x8773,
+ 'VERTEX_STREAM7_ATI': 0x8774,
+ '422_EXT': 0x80CC,
+ '422_REV_EXT': 0x80CD,
+ '422_AVERAGE_EXT': 0x80CE,
+ '422_REV_AVERAGE_EXT': 0x80CF,
+ 'CG_VERTEX_SHADER_EXT': 0x890E,
+ 'CG_FRAGMENT_SHADER_EXT': 0x890F,
+ 'ABGR_EXT': 0x8000,
+ 'BGR_EXT': 0x80E0,
+ 'BGRA_EXT': 0x80E1,
+ 'MAX_VERTEX_BINDABLE_UNIFORMS_EXT': 0x8DE2,
+ 'MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT': 0x8DE3,
+ 'MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT': 0x8DE4,
+ 'MAX_BINDABLE_UNIFORM_SIZE_EXT': 0x8DED,
+ 'UNIFORM_BUFFER_EXT': 0x8DEE,
+ 'UNIFORM_BUFFER_BINDING_EXT': 0x8DEF,
+ 'CONSTANT_COLOR_EXT': 0x8001,
+ 'ONE_MINUS_CONSTANT_COLOR_EXT': 0x8002,
+ 'CONSTANT_ALPHA_EXT': 0x8003,
+ 'ONE_MINUS_CONSTANT_ALPHA_EXT': 0x8004,
+ 'BLEND_COLOR_EXT': 0x8005,
+ 'BLEND_EQUATION_RGB_EXT': 0x8009,
+ 'BLEND_EQUATION_ALPHA_EXT': 0x883D,
+ 'BLEND_DST_RGB_EXT': 0x80C8,
+ 'BLEND_SRC_RGB_EXT': 0x80C9,
+ 'BLEND_DST_ALPHA_EXT': 0x80CA,
+ 'BLEND_SRC_ALPHA_EXT': 0x80CB,
+ 'FUNC_ADD_EXT': 0x8006,
+ 'MIN_EXT': 0x8007,
+ 'MAX_EXT': 0x8008,
+ 'BLEND_EQUATION_EXT': 0x8009,
+ 'FUNC_SUBTRACT_EXT': 0x800A,
+ 'FUNC_REVERSE_SUBTRACT_EXT': 0x800B,
+ 'CLIP_VOLUME_CLIPPING_HINT_EXT': 0x80F0,
+ 'CMYK_EXT': 0x800C,
+ 'CMYKA_EXT': 0x800D,
+ 'PACK_CMYK_HINT_EXT': 0x800E,
+ 'UNPACK_CMYK_HINT_EXT': 0x800F,
+ 'ARRAY_ELEMENT_LOCK_FIRST_EXT': 0x81A8,
+ 'ARRAY_ELEMENT_LOCK_COUNT_EXT': 0x81A9,
+ 'CONVOLUTION_1D_EXT': 0x8010,
+ 'CONVOLUTION_2D_EXT': 0x8011,
+ 'SEPARABLE_2D_EXT': 0x8012,
+ 'CONVOLUTION_BORDER_MODE_EXT': 0x8013,
+ 'CONVOLUTION_FILTER_SCALE_EXT': 0x8014,
+ 'CONVOLUTION_FILTER_BIAS_EXT': 0x8015,
+ 'REDUCE_EXT': 0x8016,
+ 'CONVOLUTION_FORMAT_EXT': 0x8017,
+ 'CONVOLUTION_WIDTH_EXT': 0x8018,
+ 'CONVOLUTION_HEIGHT_EXT': 0x8019,
+ 'MAX_CONVOLUTION_WIDTH_EXT': 0x801A,
+ 'MAX_CONVOLUTION_HEIGHT_EXT': 0x801B,
+ 'POST_CONVOLUTION_RED_SCALE_EXT': 0x801C,
+ 'POST_CONVOLUTION_GREEN_SCALE_EXT': 0x801D,
+ 'POST_CONVOLUTION_BLUE_SCALE_EXT': 0x801E,
+ 'POST_CONVOLUTION_ALPHA_SCALE_EXT': 0x801F,
+ 'POST_CONVOLUTION_RED_BIAS_EXT': 0x8020,
+ 'POST_CONVOLUTION_GREEN_BIAS_EXT': 0x8021,
+ 'POST_CONVOLUTION_BLUE_BIAS_EXT': 0x8022,
+ 'POST_CONVOLUTION_ALPHA_BIAS_EXT': 0x8023,
+ 'TANGENT_ARRAY_EXT': 0x8439,
+ 'BINORMAL_ARRAY_EXT': 0x843A,
+ 'CURRENT_TANGENT_EXT': 0x843B,
+ 'CURRENT_BINORMAL_EXT': 0x843C,
+ 'TANGENT_ARRAY_TYPE_EXT': 0x843E,
+ 'TANGENT_ARRAY_STRIDE_EXT': 0x843F,
+ 'BINORMAL_ARRAY_TYPE_EXT': 0x8440,
+ 'BINORMAL_ARRAY_STRIDE_EXT': 0x8441,
+ 'TANGENT_ARRAY_POINTER_EXT': 0x8442,
+ 'BINORMAL_ARRAY_POINTER_EXT': 0x8443,
+ 'MAP1_TANGENT_EXT': 0x8444,
+ 'MAP2_TANGENT_EXT': 0x8445,
+ 'MAP1_BINORMAL_EXT': 0x8446,
+ 'MAP2_BINORMAL_EXT': 0x8447,
+ 'DEPTH_BOUNDS_TEST_EXT': 0x8890,
+ 'DEPTH_BOUNDS_EXT': 0x8891,
+ 'PROGRAM_MATRIX_EXT': 0x8E2D,
+ 'TRANSPOSE_PROGRAM_MATRIX_EXT': 0x8E2E,
+ 'PROGRAM_MATRIX_STACK_DEPTH_EXT': 0x8E2F,
+ 'MAX_ELEMENTS_VERTICES': 0x80E8,
+ 'MAX_ELEMENTS_INDICES': 0x80E9,
+ 'FOG_COORDINATE_SOURCE_EXT': 0x8450,
+ 'FOG_COORDINATE_EXT': 0x8451,
+ 'FRAGMENT_DEPTH_EXT': 0x8452,
+ 'CURRENT_FOG_COORDINATE_EXT': 0x8453,
+ 'FOG_COORDINATE_ARRAY_TYPE_EXT': 0x8454,
+ 'FOG_COORDINATE_ARRAY_STRIDE_EXT': 0x8455,
+ 'FOG_COORDINATE_ARRAY_POINTER_EXT': 0x8456,
+ 'FOG_COORDINATE_ARRAY_EXT': 0x8457,
+ 'FRAGMENT_LIGHTING_EXT': 0x8400,
+ 'FRAGMENT_COLOR_MATERIAL_EXT': 0x8401,
+ 'FRAGMENT_COLOR_MATERIAL_FACE_EXT': 0x8402,
+ 'FRAGMENT_COLOR_MATERIAL_PARAMETER_EXT': 0x8403,
+ 'MAX_FRAGMENT_LIGHTS_EXT': 0x8404,
+ 'MAX_ACTIVE_LIGHTS_EXT': 0x8405,
+ 'CURRENT_RASTER_NORMAL_EXT': 0x8406,
+ 'LIGHT_ENV_MODE_EXT': 0x8407,
+ 'FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_EXT': 0x8408,
+ 'FRAGMENT_LIGHT_MODEL_TWO_SIDE_EXT': 0x8409,
+ 'FRAGMENT_LIGHT_MODEL_AMBIENT_EXT': 0x840A,
+ 'FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_EXT': 0x840B,
+ 'FRAGMENT_LIGHT0_EXT': 0x840C,
+ 'FRAGMENT_LIGHT7_EXT': 0x8413,
+ 'DRAW_FRAMEBUFFER_BINDING_EXT': 0x8CA6,
+ 'READ_FRAMEBUFFER_EXT': 0x8CA8,
+ 'DRAW_FRAMEBUFFER_EXT': 0x8CA9,
+ 'READ_FRAMEBUFFER_BINDING_EXT': 0x8CAA,
+ 'RENDERBUFFER_SAMPLES_EXT': 0x8CAB,
+ 'FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT': 0x8D56,
+ 'MAX_SAMPLES_EXT': 0x8D57,
+ 'INVALID_FRAMEBUFFER_OPERATION_EXT': 0x0506,
+ 'MAX_RENDERBUFFER_SIZE_EXT': 0x84E8,
+ 'FRAMEBUFFER_BINDING_EXT': 0x8CA6,
+ 'RENDERBUFFER_BINDING_EXT': 0x8CA7,
+ 'FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT': 0x8CD0,
+ 'FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT': 0x8CD1,
+ 'FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT': 0x8CD2,
+ 'FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT': 0x8CD3,
+ 'FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT': 0x8CD4,
+ 'FRAMEBUFFER_COMPLETE_EXT': 0x8CD5,
+ 'FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT': 0x8CD6,
+ 'FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT': 0x8CD7,
+ 'FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT': 0x8CD9,
+ 'FRAMEBUFFER_INCOMPLETE_FORMATS_EXT': 0x8CDA,
+ 'FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT': 0x8CDB,
+ 'FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT': 0x8CDC,
+ 'FRAMEBUFFER_UNSUPPORTED_EXT': 0x8CDD,
+ 'MAX_COLOR_ATTACHMENTS_EXT': 0x8CDF,
+ 'COLOR_ATTACHMENT0_EXT': 0x8CE0,
+ 'COLOR_ATTACHMENT1_EXT': 0x8CE1,
+ 'COLOR_ATTACHMENT2_EXT': 0x8CE2,
+ 'COLOR_ATTACHMENT3_EXT': 0x8CE3,
+ 'COLOR_ATTACHMENT4_EXT': 0x8CE4,
+ 'COLOR_ATTACHMENT5_EXT': 0x8CE5,
+ 'COLOR_ATTACHMENT6_EXT': 0x8CE6,
+ 'COLOR_ATTACHMENT7_EXT': 0x8CE7,
+ 'COLOR_ATTACHMENT8_EXT': 0x8CE8,
+ 'COLOR_ATTACHMENT9_EXT': 0x8CE9,
+ 'COLOR_ATTACHMENT10_EXT': 0x8CEA,
+ 'COLOR_ATTACHMENT11_EXT': 0x8CEB,
+ 'COLOR_ATTACHMENT12_EXT': 0x8CEC,
+ 'COLOR_ATTACHMENT13_EXT': 0x8CED,
+ 'COLOR_ATTACHMENT14_EXT': 0x8CEE,
+ 'COLOR_ATTACHMENT15_EXT': 0x8CEF,
+ 'DEPTH_ATTACHMENT_EXT': 0x8D00,
+ 'STENCIL_ATTACHMENT_EXT': 0x8D20,
+ 'FRAMEBUFFER_EXT': 0x8D40,
+ 'RENDERBUFFER_EXT': 0x8D41,
+ 'RENDERBUFFER_WIDTH_EXT': 0x8D42,
+ 'RENDERBUFFER_HEIGHT_EXT': 0x8D43,
+ 'RENDERBUFFER_INTERNAL_FORMAT_EXT': 0x8D44,
+ 'STENCIL_INDEX1_EXT': 0x8D46,
+ 'STENCIL_INDEX4_EXT': 0x8D47,
+ 'STENCIL_INDEX8_EXT': 0x8D48,
+ 'STENCIL_INDEX16_EXT': 0x8D49,
+ 'RENDERBUFFER_RED_SIZE_EXT': 0x8D50,
+ 'RENDERBUFFER_GREEN_SIZE_EXT': 0x8D51,
+ 'RENDERBUFFER_BLUE_SIZE_EXT': 0x8D52,
+ 'RENDERBUFFER_ALPHA_SIZE_EXT': 0x8D53,
+ 'RENDERBUFFER_DEPTH_SIZE_EXT': 0x8D54,
+ 'RENDERBUFFER_STENCIL_SIZE_EXT': 0x8D55,
+ 'FRAMEBUFFER_SRGB_EXT': 0x8DB9,
+ 'FRAMEBUFFER_SRGB_CAPABLE_EXT': 0x8DBA,
+ 'LINES_ADJACENCY_EXT': 0xA,
+ 'LINE_STRIP_ADJACENCY_EXT': 0xB,
+ 'TRIANGLES_ADJACENCY_EXT': 0xC,
+ 'TRIANGLE_STRIP_ADJACENCY_EXT': 0xD,
+ 'PROGRAM_POINT_SIZE_EXT': 0x8642,
+ 'MAX_VARYING_COMPONENTS_EXT': 0x8B4B,
+ 'MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT': 0x8C29,
+ 'FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT': 0x8CD4,
+ 'FRAMEBUFFER_ATTACHMENT_LAYERED_EXT': 0x8DA7,
+ 'FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT': 0x8DA8,
+ 'FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT': 0x8DA9,
+ 'GEOMETRY_SHADER_EXT': 0x8DD9,
+ 'GEOMETRY_VERTICES_OUT_EXT': 0x8DDA,
+ 'GEOMETRY_INPUT_TYPE_EXT': 0x8DDB,
+ 'GEOMETRY_OUTPUT_TYPE_EXT': 0x8DDC,
+ 'MAX_GEOMETRY_VARYING_COMPONENTS_EXT': 0x8DDD,
+ 'MAX_VERTEX_VARYING_COMPONENTS_EXT': 0x8DDE,
+ 'MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT': 0x8DDF,
+ 'MAX_GEOMETRY_OUTPUT_VERTICES_EXT': 0x8DE0,
+ 'MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT': 0x8DE1,
+ 'VERTEX_ATTRIB_ARRAY_INTEGER_EXT': 0x88FD,
+ 'SAMPLER_1D_ARRAY_EXT': 0x8DC0,
+ 'SAMPLER_2D_ARRAY_EXT': 0x8DC1,
+ 'SAMPLER_BUFFER_EXT': 0x8DC2,
+ 'SAMPLER_1D_ARRAY_SHADOW_EXT': 0x8DC3,
+ 'SAMPLER_2D_ARRAY_SHADOW_EXT': 0x8DC4,
+ 'SAMPLER_CUBE_SHADOW_EXT': 0x8DC5,
+ 'UNSIGNED_INT_VEC2_EXT': 0x8DC6,
+ 'UNSIGNED_INT_VEC3_EXT': 0x8DC7,
+ 'UNSIGNED_INT_VEC4_EXT': 0x8DC8,
+ 'INT_SAMPLER_1D_EXT': 0x8DC9,
+ 'INT_SAMPLER_2D_EXT': 0x8DCA,
+ 'INT_SAMPLER_3D_EXT': 0x8DCB,
+ 'INT_SAMPLER_CUBE_EXT': 0x8DCC,
+ 'INT_SAMPLER_2D_RECT_EXT': 0x8DCD,
+ 'INT_SAMPLER_1D_ARRAY_EXT': 0x8DCE,
+ 'INT_SAMPLER_2D_ARRAY_EXT': 0x8DCF,
+ 'INT_SAMPLER_BUFFER_EXT': 0x8DD0,
+ 'UNSIGNED_INT_SAMPLER_1D_EXT': 0x8DD1,
+ 'UNSIGNED_INT_SAMPLER_2D_EXT': 0x8DD2,
+ 'UNSIGNED_INT_SAMPLER_3D_EXT': 0x8DD3,
+ 'UNSIGNED_INT_SAMPLER_CUBE_EXT': 0x8DD4,
+ 'UNSIGNED_INT_SAMPLER_2D_RECT_EXT': 0x8DD5,
+ 'UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT': 0x8DD6,
+ 'UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT': 0x8DD7,
+ 'UNSIGNED_INT_SAMPLER_BUFFER_EXT': 0x8DD8,
+ 'HISTOGRAM_EXT': 0x8024,
+ 'PROXY_HISTOGRAM_EXT': 0x8025,
+ 'HISTOGRAM_WIDTH_EXT': 0x8026,
+ 'HISTOGRAM_FORMAT_EXT': 0x8027,
+ 'HISTOGRAM_RED_SIZE_EXT': 0x8028,
+ 'HISTOGRAM_GREEN_SIZE_EXT': 0x8029,
+ 'HISTOGRAM_BLUE_SIZE_EXT': 0x802A,
+ 'HISTOGRAM_ALPHA_SIZE_EXT': 0x802B,
+ 'HISTOGRAM_LUMINANCE_SIZE_EXT': 0x802C,
+ 'HISTOGRAM_SINK_EXT': 0x802D,
+ 'MINMAX_EXT': 0x802E,
+ 'MINMAX_FORMAT_EXT': 0x802F,
+ 'MINMAX_SINK_EXT': 0x8030,
+ 'FRAGMENT_MATERIAL_EXT': 0x8349,
+ 'FRAGMENT_NORMAL_EXT': 0x834A,
+ 'FRAGMENT_COLOR_EXT': 0x834C,
+ 'ATTENUATION_EXT': 0x834D,
+ 'SHADOW_ATTENUATION_EXT': 0x834E,
+ 'TEXTURE_APPLICATION_MODE_EXT': 0x834F,
+ 'TEXTURE_LIGHT_EXT': 0x8350,
+ 'TEXTURE_MATERIAL_FACE_EXT': 0x8351,
+ 'TEXTURE_MATERIAL_PARAMETER_EXT': 0x8352,
+ 'FRAGMENT_DEPTH_EXT': 0x8452,
+ 'MULTISAMPLE_EXT': 0x809D,
+ 'SAMPLE_ALPHA_TO_MASK_EXT': 0x809E,
+ 'SAMPLE_ALPHA_TO_ONE_EXT': 0x809F,
+ 'SAMPLE_MASK_EXT': 0x80A0,
+ '1PASS_EXT': 0x80A1,
+ '2PASS_0_EXT': 0x80A2,
+ '2PASS_1_EXT': 0x80A3,
+ '4PASS_0_EXT': 0x80A4,
+ '4PASS_1_EXT': 0x80A5,
+ '4PASS_2_EXT': 0x80A6,
+ '4PASS_3_EXT': 0x80A7,
+ 'SAMPLE_BUFFERS_EXT': 0x80A8,
+ 'SAMPLES_EXT': 0x80A9,
+ 'SAMPLE_MASK_VALUE_EXT': 0x80AA,
+ 'SAMPLE_MASK_INVERT_EXT': 0x80AB,
+ 'SAMPLE_PATTERN_EXT': 0x80AC,
+ 'MULTISAMPLE_BIT_EXT': 0x20000000,
+ 'DEPTH_STENCIL_EXT': 0x84F9,
+ 'UNSIGNED_INT_24_8_EXT': 0x84FA,
+ 'DEPTH24_STENCIL8_EXT': 0x88F0,
+ 'TEXTURE_STENCIL_SIZE_EXT': 0x88F1,
+ 'R11F_G11F_B10F_EXT': 0x8C3A,
+ 'UNSIGNED_INT_10F_11F_11F_REV_EXT': 0x8C3B,
+ 'RGBA_SIGNED_COMPONENTS_EXT': 0x8C3C,
+ 'UNSIGNED_BYTE_3_3_2_EXT': 0x8032,
+ 'UNSIGNED_SHORT_4_4_4_4_EXT': 0x8033,
+ 'UNSIGNED_SHORT_5_5_5_1_EXT': 0x8034,
+ 'UNSIGNED_INT_8_8_8_8_EXT': 0x8035,
+ 'UNSIGNED_INT_10_10_10_2_EXT': 0x8036,
+ 'TEXTURE_1D': 0x0DE0,
+ 'TEXTURE_2D': 0x0DE1,
+ 'PROXY_TEXTURE_1D': 0x8063,
+ 'PROXY_TEXTURE_2D': 0x8064,
+ 'TEXTURE_3D_EXT': 0x806F,
+ 'PROXY_TEXTURE_3D_EXT': 0x8070,
+ 'COLOR_TABLE_FORMAT_EXT': 0x80D8,
+ 'COLOR_TABLE_WIDTH_EXT': 0x80D9,
+ 'COLOR_TABLE_RED_SIZE_EXT': 0x80DA,
+ 'COLOR_TABLE_GREEN_SIZE_EXT': 0x80DB,
+ 'COLOR_TABLE_BLUE_SIZE_EXT': 0x80DC,
+ 'COLOR_TABLE_ALPHA_SIZE_EXT': 0x80DD,
+ 'COLOR_TABLE_LUMINANCE_SIZE_EXT': 0x80DE,
+ 'COLOR_TABLE_INTENSITY_SIZE_EXT': 0x80DF,
+ 'COLOR_INDEX1_EXT': 0x80E2,
+ 'COLOR_INDEX2_EXT': 0x80E3,
+ 'COLOR_INDEX4_EXT': 0x80E4,
+ 'COLOR_INDEX8_EXT': 0x80E5,
+ 'COLOR_INDEX12_EXT': 0x80E6,
+ 'COLOR_INDEX16_EXT': 0x80E7,
+ 'TEXTURE_INDEX_SIZE_EXT': 0x80ED,
+ 'TEXTURE_CUBE_MAP_ARB': 0x8513,
+ 'PROXY_TEXTURE_CUBE_MAP_ARB': 0x851B,
+ 'PIXEL_PACK_BUFFER_EXT': 0x88EB,
+ 'PIXEL_UNPACK_BUFFER_EXT': 0x88EC,
+ 'PIXEL_PACK_BUFFER_BINDING_EXT': 0x88ED,
+ 'PIXEL_UNPACK_BUFFER_BINDING_EXT': 0x88EF,
+ 'PIXEL_TRANSFORM_2D_EXT': 0x8330,
+ 'PIXEL_MAG_FILTER_EXT': 0x8331,
+ 'PIXEL_MIN_FILTER_EXT': 0x8332,
+ 'PIXEL_CUBIC_WEIGHT_EXT': 0x8333,
+ 'CUBIC_EXT': 0x8334,
+ 'AVERAGE_EXT': 0x8335,
+ 'PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT': 0x8336,
+ 'MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT': 0x8337,
+ 'PIXEL_TRANSFORM_2D_MATRIX_EXT': 0x8338,
+ 'POINT_SIZE_MIN_EXT': 0x8126,
+ 'POINT_SIZE_MAX_EXT': 0x8127,
+ 'POINT_FADE_THRESHOLD_SIZE_EXT': 0x8128,
+ 'DISTANCE_ATTENUATION_EXT': 0x8129,
+ 'POLYGON_OFFSET_EXT': 0x8037,
+ 'POLYGON_OFFSET_FACTOR_EXT': 0x8038,
+ 'POLYGON_OFFSET_BIAS_EXT': 0x8039,
+ 'RESCALE_NORMAL_EXT': 0x803A,
+ 'COLOR_SUM_EXT': 0x8458,
+ 'CURRENT_SECONDARY_COLOR_EXT': 0x8459,
+ 'SECONDARY_COLOR_ARRAY_SIZE_EXT': 0x845A,
+ 'SECONDARY_COLOR_ARRAY_TYPE_EXT': 0x845B,
+ 'SECONDARY_COLOR_ARRAY_STRIDE_EXT': 0x845C,
+ 'SECONDARY_COLOR_ARRAY_POINTER_EXT': 0x845D,
+ 'SECONDARY_COLOR_ARRAY_EXT': 0x845E,
+ 'LIGHT_MODEL_COLOR_CONTROL_EXT': 0x81F8,
+ 'SINGLE_COLOR_EXT': 0x81F9,
+ 'SEPARATE_SPECULAR_COLOR_EXT': 0x81FA,
+ 'SHARED_TEXTURE_PALETTE_EXT': 0x81FB,
+ 'STENCIL_TAG_BITS_EXT': 0x88F2,
+ 'STENCIL_CLEAR_TAG_VALUE_EXT': 0x88F3,
+ 'STENCIL_TEST_TWO_SIDE_EXT': 0x8910,
+ 'ACTIVE_STENCIL_FACE_EXT': 0x8911,
+ 'INCR_WRAP_EXT': 0x8507,
+ 'DECR_WRAP_EXT': 0x8508,
+ 'ALPHA4_EXT': 0x803B,
+ 'ALPHA8_EXT': 0x803C,
+ 'ALPHA12_EXT': 0x803D,
+ 'ALPHA16_EXT': 0x803E,
+ 'LUMINANCE4_EXT': 0x803F,
+ 'LUMINANCE8_EXT': 0x8040,
+ 'LUMINANCE12_EXT': 0x8041,
+ 'LUMINANCE16_EXT': 0x8042,
+ 'LUMINANCE4_ALPHA4_EXT': 0x8043,
+ 'LUMINANCE6_ALPHA2_EXT': 0x8044,
+ 'LUMINANCE8_ALPHA8_EXT': 0x8045,
+ 'LUMINANCE12_ALPHA4_EXT': 0x8046,
+ 'LUMINANCE12_ALPHA12_EXT': 0x8047,
+ 'LUMINANCE16_ALPHA16_EXT': 0x8048,
+ 'INTENSITY_EXT': 0x8049,
+ 'INTENSITY4_EXT': 0x804A,
+ 'INTENSITY8_EXT': 0x804B,
+ 'INTENSITY12_EXT': 0x804C,
+ 'INTENSITY16_EXT': 0x804D,
+ 'RGB2_EXT': 0x804E,
+ 'RGB4_EXT': 0x804F,
+ 'RGB5_EXT': 0x8050,
+ 'RGB8_EXT': 0x8051,
+ 'RGB10_EXT': 0x8052,
+ 'RGB12_EXT': 0x8053,
+ 'RGB16_EXT': 0x8054,
+ 'RGBA2_EXT': 0x8055,
+ 'RGBA4_EXT': 0x8056,
+ 'RGB5_A1_EXT': 0x8057,
+ 'RGBA8_EXT': 0x8058,
+ 'RGB10_A2_EXT': 0x8059,
+ 'RGBA12_EXT': 0x805A,
+ 'RGBA16_EXT': 0x805B,
+ 'TEXTURE_RED_SIZE_EXT': 0x805C,
+ 'TEXTURE_GREEN_SIZE_EXT': 0x805D,
+ 'TEXTURE_BLUE_SIZE_EXT': 0x805E,
+ 'TEXTURE_ALPHA_SIZE_EXT': 0x805F,
+ 'TEXTURE_LUMINANCE_SIZE_EXT': 0x8060,
+ 'TEXTURE_INTENSITY_SIZE_EXT': 0x8061,
+ 'REPLACE_EXT': 0x8062,
+ 'PROXY_TEXTURE_1D_EXT': 0x8063,
+ 'PROXY_TEXTURE_2D_EXT': 0x8064,
+ 'PACK_SKIP_IMAGES_EXT': 0x806B,
+ 'PACK_IMAGE_HEIGHT_EXT': 0x806C,
+ 'UNPACK_SKIP_IMAGES_EXT': 0x806D,
+ 'UNPACK_IMAGE_HEIGHT_EXT': 0x806E,
+ 'TEXTURE_3D_EXT': 0x806F,
+ 'PROXY_TEXTURE_3D_EXT': 0x8070,
+ 'TEXTURE_DEPTH_EXT': 0x8071,
+ 'TEXTURE_WRAP_R_EXT': 0x8072,
+ 'MAX_3D_TEXTURE_SIZE_EXT': 0x8073,
+ 'COMPARE_REF_DEPTH_TO_TEXTURE_EXT': 0x884E,
+ 'MAX_ARRAY_TEXTURE_LAYERS_EXT': 0x88FF,
+ 'TEXTURE_1D_ARRAY_EXT': 0x8C18,
+ 'PROXY_TEXTURE_1D_ARRAY_EXT': 0x8C19,
+ 'TEXTURE_2D_ARRAY_EXT': 0x8C1A,
+ 'PROXY_TEXTURE_2D_ARRAY_EXT': 0x8C1B,
+ 'TEXTURE_BINDING_1D_ARRAY_EXT': 0x8C1C,
+ 'TEXTURE_BINDING_2D_ARRAY_EXT': 0x8C1D,
+ 'TEXTURE_BUFFER_EXT': 0x8C2A,
+ 'MAX_TEXTURE_BUFFER_SIZE_EXT': 0x8C2B,
+ 'TEXTURE_BINDING_BUFFER_EXT': 0x8C2C,
+ 'TEXTURE_BUFFER_DATA_STORE_BINDING_EXT': 0x8C2D,
+ 'TEXTURE_BUFFER_FORMAT_EXT': 0x8C2E,
+ 'COMPRESSED_RGB_S3TC_DXT1_EXT': 0x83F0,
+ 'COMPRESSED_RGBA_S3TC_DXT1_EXT': 0x83F1,
+ 'COMPRESSED_LUMINANCE_LATC1_EXT': 0x8C70,
+ 'COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT': 0x8C71,
+ 'COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT': 0x8C72,
+ 'COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT': 0x8C73,
+ 'COMPRESSED_RED_RGTC1_EXT': 0x8DBB,
+ 'COMPRESSED_SIGNED_RED_RGTC1_EXT': 0x8DBC,
+ 'COMPRESSED_RED_GREEN_RGTC2_EXT': 0x8DBD,
+ 'COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT': 0x8DBE,
+ 'COMPRESSED_RGB_S3TC_DXT1_EXT': 0x83F0,
+ 'COMPRESSED_RGBA_S3TC_DXT1_EXT': 0x83F1,
+ 'COMPRESSED_RGBA_S3TC_DXT3_EXT': 0x83F2,
+ 'COMPRESSED_RGBA_S3TC_DXT5_EXT': 0x83F3,
+ 'NORMAL_MAP_EXT': 0x8511,
+ 'REFLECTION_MAP_EXT': 0x8512,
+ 'TEXTURE_CUBE_MAP_EXT': 0x8513,
+ 'TEXTURE_BINDING_CUBE_MAP_EXT': 0x8514,
+ 'TEXTURE_CUBE_MAP_POSITIVE_X_EXT': 0x8515,
+ 'TEXTURE_CUBE_MAP_NEGATIVE_X_EXT': 0x8516,
+ 'TEXTURE_CUBE_MAP_POSITIVE_Y_EXT': 0x8517,
+ 'TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT': 0x8518,
+ 'TEXTURE_CUBE_MAP_POSITIVE_Z_EXT': 0x8519,
+ 'TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT': 0x851A,
+ 'PROXY_TEXTURE_CUBE_MAP_EXT': 0x851B,
+ 'MAX_CUBE_MAP_TEXTURE_SIZE_EXT': 0x851C,
+ 'CLAMP_TO_EDGE_EXT': 0x812F,
+ 'COMBINE_EXT': 0x8570,
+ 'COMBINE_RGB_EXT': 0x8571,
+ 'COMBINE_ALPHA_EXT': 0x8572,
+ 'RGB_SCALE_EXT': 0x8573,
+ 'ADD_SIGNED_EXT': 0x8574,
+ 'INTERPOLATE_EXT': 0x8575,
+ 'CONSTANT_EXT': 0x8576,
+ 'PRIMARY_COLOR_EXT': 0x8577,
+ 'PREVIOUS_EXT': 0x8578,
+ 'SOURCE0_RGB_EXT': 0x8580,
+ 'SOURCE1_RGB_EXT': 0x8581,
+ 'SOURCE2_RGB_EXT': 0x8582,
+ 'SOURCE0_ALPHA_EXT': 0x8588,
+ 'SOURCE1_ALPHA_EXT': 0x8589,
+ 'SOURCE2_ALPHA_EXT': 0x858A,
+ 'OPERAND0_RGB_EXT': 0x8590,
+ 'OPERAND1_RGB_EXT': 0x8591,
+ 'OPERAND2_RGB_EXT': 0x8592,
+ 'OPERAND0_ALPHA_EXT': 0x8598,
+ 'OPERAND1_ALPHA_EXT': 0x8599,
+ 'OPERAND2_ALPHA_EXT': 0x859A,
+ 'DOT3_RGB_EXT': 0x8740,
+ 'DOT3_RGBA_EXT': 0x8741,
+ 'TEXTURE_MAX_ANISOTROPY_EXT': 0x84FE,
+ 'MAX_TEXTURE_MAX_ANISOTROPY_EXT': 0x84FF,
+ 'RGBA32UI_EXT': 0x8D70,
+ 'RGB32UI_EXT': 0x8D71,
+ 'ALPHA32UI_EXT': 0x8D72,
+ 'INTENSITY32UI_EXT': 0x8D73,
+ 'LUMINANCE32UI_EXT': 0x8D74,
+ 'LUMINANCE_ALPHA32UI_EXT': 0x8D75,
+ 'RGBA16UI_EXT': 0x8D76,
+ 'RGB16UI_EXT': 0x8D77,
+ 'ALPHA16UI_EXT': 0x8D78,
+ 'INTENSITY16UI_EXT': 0x8D79,
+ 'LUMINANCE16UI_EXT': 0x8D7A,
+ 'LUMINANCE_ALPHA16UI_EXT': 0x8D7B,
+ 'RGBA8UI_EXT': 0x8D7C,
+ 'RGB8UI_EXT': 0x8D7D,
+ 'ALPHA8UI_EXT': 0x8D7E,
+ 'INTENSITY8UI_EXT': 0x8D7F,
+ 'LUMINANCE8UI_EXT': 0x8D80,
+ 'LUMINANCE_ALPHA8UI_EXT': 0x8D81,
+ 'RGBA32I_EXT': 0x8D82,
+ 'RGB32I_EXT': 0x8D83,
+ 'ALPHA32I_EXT': 0x8D84,
+ 'INTENSITY32I_EXT': 0x8D85,
+ 'LUMINANCE32I_EXT': 0x8D86,
+ 'LUMINANCE_ALPHA32I_EXT': 0x8D87,
+ 'RGBA16I_EXT': 0x8D88,
+ 'RGB16I_EXT': 0x8D89,
+ 'ALPHA16I_EXT': 0x8D8A,
+ 'INTENSITY16I_EXT': 0x8D8B,
+ 'LUMINANCE16I_EXT': 0x8D8C,
+ 'LUMINANCE_ALPHA16I_EXT': 0x8D8D,
+ 'RGBA8I_EXT': 0x8D8E,
+ 'RGB8I_EXT': 0x8D8F,
+ 'ALPHA8I_EXT': 0x8D90,
+ 'INTENSITY8I_EXT': 0x8D91,
+ 'LUMINANCE8I_EXT': 0x8D92,
+ 'LUMINANCE_ALPHA8I_EXT': 0x8D93,
+ 'RED_INTEGER_EXT': 0x8D94,
+ 'GREEN_INTEGER_EXT': 0x8D95,
+ 'BLUE_INTEGER_EXT': 0x8D96,
+ 'ALPHA_INTEGER_EXT': 0x8D97,
+ 'RGB_INTEGER_EXT': 0x8D98,
+ 'RGBA_INTEGER_EXT': 0x8D99,
+ 'BGR_INTEGER_EXT': 0x8D9A,
+ 'BGRA_INTEGER_EXT': 0x8D9B,
+ 'LUMINANCE_INTEGER_EXT': 0x8D9C,
+ 'LUMINANCE_ALPHA_INTEGER_EXT': 0x8D9D,
+ 'RGBA_INTEGER_MODE_EXT': 0x8D9E,
+ 'MAX_TEXTURE_LOD_BIAS_EXT': 0x84FD,
+ 'TEXTURE_FILTER_CONTROL_EXT': 0x8500,
+ 'TEXTURE_LOD_BIAS_EXT': 0x8501,
+ 'MIRROR_CLAMP_EXT': 0x8742,
+ 'MIRROR_CLAMP_TO_EDGE_EXT': 0x8743,
+ 'MIRROR_CLAMP_TO_BORDER_EXT': 0x8912,
+ 'TEXTURE_PRIORITY_EXT': 0x8066,
+ 'TEXTURE_RESIDENT_EXT': 0x8067,
+ 'TEXTURE_1D_BINDING_EXT': 0x8068,
+ 'TEXTURE_2D_BINDING_EXT': 0x8069,
+ 'TEXTURE_3D_BINDING_EXT': 0x806A,
+ 'PERTURB_EXT': 0x85AE,
+ 'TEXTURE_NORMAL_EXT': 0x85AF,
+ 'TEXTURE_RECTANGLE_EXT': 0x84F5,
+ 'TEXTURE_BINDING_RECTANGLE_EXT': 0x84F6,
+ 'PROXY_TEXTURE_RECTANGLE_EXT': 0x84F7,
+ 'MAX_RECTANGLE_TEXTURE_SIZE_EXT': 0x84F8,
+ 'SRGB_EXT': 0x8C40,
+ 'SRGB8_EXT': 0x8C41,
+ 'SRGB_ALPHA_EXT': 0x8C42,
+ 'SRGB8_ALPHA8_EXT': 0x8C43,
+ 'SLUMINANCE_ALPHA_EXT': 0x8C44,
+ 'SLUMINANCE8_ALPHA8_EXT': 0x8C45,
+ 'SLUMINANCE_EXT': 0x8C46,
+ 'SLUMINANCE8_EXT': 0x8C47,
+ 'COMPRESSED_SRGB_EXT': 0x8C48,
+ 'COMPRESSED_SRGB_ALPHA_EXT': 0x8C49,
+ 'COMPRESSED_SLUMINANCE_EXT': 0x8C4A,
+ 'COMPRESSED_SLUMINANCE_ALPHA_EXT': 0x8C4B,
+ 'COMPRESSED_SRGB_S3TC_DXT1_EXT': 0x8C4C,
+ 'COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT': 0x8C4D,
+ 'COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT': 0x8C4E,
+ 'COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT': 0x8C4F,
+ 'RGB9_E5_EXT': 0x8C3D,
+ 'UNSIGNED_INT_5_9_9_9_REV_EXT': 0x8C3E,
+ 'TEXTURE_SHARED_SIZE_EXT': 0x8C3F,
+ 'TEXTURE_SWIZZLE_R_EXT': 0x8E42,
+ 'TEXTURE_SWIZZLE_G_EXT': 0x8E43,
+ 'TEXTURE_SWIZZLE_B_EXT': 0x8E44,
+ 'TEXTURE_SWIZZLE_A_EXT': 0x8E45,
+ 'TEXTURE_SWIZZLE_RGBA_EXT': 0x8E46,
+ 'TIME_ELAPSED_EXT': 0x88BF,
+ 'TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT': 0x8C76,
+ 'TRANSFORM_FEEDBACK_BUFFER_MODE_EXT': 0x8C7F,
+ 'MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT': 0x8C80,
+ 'TRANSFORM_FEEDBACK_VARYINGS_EXT': 0x8C83,
+ 'TRANSFORM_FEEDBACK_BUFFER_START_EXT': 0x8C84,
+ 'TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT': 0x8C85,
+ 'PRIMITIVES_GENERATED_EXT': 0x8C87,
+ 'TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT': 0x8C88,
+ 'RASTERIZER_DISCARD_EXT': 0x8C89,
+ 'MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT': 0x8C8A,
+ 'MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT': 0x8C8B,
+ 'INTERLEAVED_ATTRIBS_EXT': 0x8C8C,
+ 'SEPARATE_ATTRIBS_EXT': 0x8C8D,
+ 'TRANSFORM_FEEDBACK_BUFFER_EXT': 0x8C8E,
+ 'TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT': 0x8C8F,
+ 'DOUBLE_EXT': 0x140A,
+ 'VERTEX_ARRAY_EXT': 0x8074,
+ 'NORMAL_ARRAY_EXT': 0x8075,
+ 'COLOR_ARRAY_EXT': 0x8076,
+ 'INDEX_ARRAY_EXT': 0x8077,
+ 'TEXTURE_COORD_ARRAY_EXT': 0x8078,
+ 'EDGE_FLAG_ARRAY_EXT': 0x8079,
+ 'VERTEX_ARRAY_SIZE_EXT': 0x807A,
+ 'VERTEX_ARRAY_TYPE_EXT': 0x807B,
+ 'VERTEX_ARRAY_STRIDE_EXT': 0x807C,
+ 'VERTEX_ARRAY_COUNT_EXT': 0x807D,
+ 'NORMAL_ARRAY_TYPE_EXT': 0x807E,
+ 'NORMAL_ARRAY_STRIDE_EXT': 0x807F,
+ 'NORMAL_ARRAY_COUNT_EXT': 0x8080,
+ 'COLOR_ARRAY_SIZE_EXT': 0x8081,
+ 'COLOR_ARRAY_TYPE_EXT': 0x8082,
+ 'COLOR_ARRAY_STRIDE_EXT': 0x8083,
+ 'COLOR_ARRAY_COUNT_EXT': 0x8084,
+ 'INDEX_ARRAY_TYPE_EXT': 0x8085,
+ 'INDEX_ARRAY_STRIDE_EXT': 0x8086,
+ 'INDEX_ARRAY_COUNT_EXT': 0x8087,
+ 'TEXTURE_COORD_ARRAY_SIZE_EXT': 0x8088,
+ 'TEXTURE_COORD_ARRAY_TYPE_EXT': 0x8089,
+ 'TEXTURE_COORD_ARRAY_STRIDE_EXT': 0x808A,
+ 'TEXTURE_COORD_ARRAY_COUNT_EXT': 0x808B,
+ 'EDGE_FLAG_ARRAY_STRIDE_EXT': 0x808C,
+ 'EDGE_FLAG_ARRAY_COUNT_EXT': 0x808D,
+ 'VERTEX_ARRAY_POINTER_EXT': 0x808E,
+ 'NORMAL_ARRAY_POINTER_EXT': 0x808F,
+ 'COLOR_ARRAY_POINTER_EXT': 0x8090,
+ 'INDEX_ARRAY_POINTER_EXT': 0x8091,
+ 'TEXTURE_COORD_ARRAY_POINTER_EXT': 0x8092,
+ 'EDGE_FLAG_ARRAY_POINTER_EXT': 0x8093,
+ 'BGRA': 0x80E1,
+ 'VERTEX_SHADER_EXT': 0x8780,
+ 'VERTEX_SHADER_BINDING_EXT': 0x8781,
+ 'OP_INDEX_EXT': 0x8782,
+ 'OP_NEGATE_EXT': 0x8783,
+ 'OP_DOT3_EXT': 0x8784,
+ 'OP_DOT4_EXT': 0x8785,
+ 'OP_MUL_EXT': 0x8786,
+ 'OP_ADD_EXT': 0x8787,
+ 'OP_MADD_EXT': 0x8788,
+ 'OP_FRAC_EXT': 0x8789,
+ 'OP_MAX_EXT': 0x878A,
+ 'OP_MIN_EXT': 0x878B,
+ 'OP_SET_GE_EXT': 0x878C,
+ 'OP_SET_LT_EXT': 0x878D,
+ 'OP_CLAMP_EXT': 0x878E,
+ 'OP_FLOOR_EXT': 0x878F,
+ 'OP_ROUND_EXT': 0x8790,
+ 'OP_EXP_BASE_2_EXT': 0x8791,
+ 'OP_LOG_BASE_2_EXT': 0x8792,
+ 'OP_POWER_EXT': 0x8793,
+ 'OP_RECIP_EXT': 0x8794,
+ 'OP_RECIP_SQRT_EXT': 0x8795,
+ 'OP_SUB_EXT': 0x8796,
+ 'OP_CROSS_PRODUCT_EXT': 0x8797,
+ 'OP_MULTIPLY_MATRIX_EXT': 0x8798,
+ 'OP_MOV_EXT': 0x8799,
+ 'OUTPUT_VERTEX_EXT': 0x879A,
+ 'OUTPUT_COLOR0_EXT': 0x879B,
+ 'OUTPUT_COLOR1_EXT': 0x879C,
+ 'OUTPUT_TEXTURE_COORD0_EXT': 0x879D,
+ 'OUTPUT_TEXTURE_COORD1_EXT': 0x879E,
+ 'OUTPUT_TEXTURE_COORD2_EXT': 0x879F,
+ 'OUTPUT_TEXTURE_COORD3_EXT': 0x87A0,
+ 'OUTPUT_TEXTURE_COORD4_EXT': 0x87A1,
+ 'OUTPUT_TEXTURE_COORD5_EXT': 0x87A2,
+ 'OUTPUT_TEXTURE_COORD6_EXT': 0x87A3,
+ 'OUTPUT_TEXTURE_COORD7_EXT': 0x87A4,
+ 'OUTPUT_TEXTURE_COORD8_EXT': 0x87A5,
+ 'OUTPUT_TEXTURE_COORD9_EXT': 0x87A6,
+ 'OUTPUT_TEXTURE_COORD10_EXT': 0x87A7,
+ 'OUTPUT_TEXTURE_COORD11_EXT': 0x87A8,
+ 'OUTPUT_TEXTURE_COORD12_EXT': 0x87A9,
+ 'OUTPUT_TEXTURE_COORD13_EXT': 0x87AA,
+ 'OUTPUT_TEXTURE_COORD14_EXT': 0x87AB,
+ 'OUTPUT_TEXTURE_COORD15_EXT': 0x87AC,
+ 'OUTPUT_TEXTURE_COORD16_EXT': 0x87AD,
+ 'OUTPUT_TEXTURE_COORD17_EXT': 0x87AE,
+ 'OUTPUT_TEXTURE_COORD18_EXT': 0x87AF,
+ 'OUTPUT_TEXTURE_COORD19_EXT': 0x87B0,
+ 'OUTPUT_TEXTURE_COORD20_EXT': 0x87B1,
+ 'OUTPUT_TEXTURE_COORD21_EXT': 0x87B2,
+ 'OUTPUT_TEXTURE_COORD22_EXT': 0x87B3,
+ 'OUTPUT_TEXTURE_COORD23_EXT': 0x87B4,
+ 'OUTPUT_TEXTURE_COORD24_EXT': 0x87B5,
+ 'OUTPUT_TEXTURE_COORD25_EXT': 0x87B6,
+ 'OUTPUT_TEXTURE_COORD26_EXT': 0x87B7,
+ 'OUTPUT_TEXTURE_COORD27_EXT': 0x87B8,
+ 'OUTPUT_TEXTURE_COORD28_EXT': 0x87B9,
+ 'OUTPUT_TEXTURE_COORD29_EXT': 0x87BA,
+ 'OUTPUT_TEXTURE_COORD30_EXT': 0x87BB,
+ 'OUTPUT_TEXTURE_COORD31_EXT': 0x87BC,
+ 'OUTPUT_FOG_EXT': 0x87BD,
+ 'SCALAR_EXT': 0x87BE,
+ 'VECTOR_EXT': 0x87BF,
+ 'MATRIX_EXT': 0x87C0,
+ 'VARIANT_EXT': 0x87C1,
+ 'INVARIANT_EXT': 0x87C2,
+ 'LOCAL_CONSTANT_EXT': 0x87C3,
+ 'LOCAL_EXT': 0x87C4,
+ 'MAX_VERTEX_SHADER_INSTRUCTIONS_EXT': 0x87C5,
+ 'MAX_VERTEX_SHADER_VARIANTS_EXT': 0x87C6,
+ 'MAX_VERTEX_SHADER_INVARIANTS_EXT': 0x87C7,
+ 'MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT': 0x87C8,
+ 'MAX_VERTEX_SHADER_LOCALS_EXT': 0x87C9,
+ 'MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT': 0x87CA,
+ 'MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT': 0x87CB,
+ 'MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT': 0x87CC,
+ 'MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT': 0x87CD,
+ 'MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT': 0x87CE,
+ 'VERTEX_SHADER_INSTRUCTIONS_EXT': 0x87CF,
+ 'VERTEX_SHADER_VARIANTS_EXT': 0x87D0,
+ 'VERTEX_SHADER_INVARIANTS_EXT': 0x87D1,
+ 'VERTEX_SHADER_LOCAL_CONSTANTS_EXT': 0x87D2,
+ 'VERTEX_SHADER_LOCALS_EXT': 0x87D3,
+ 'VERTEX_SHADER_OPTIMIZED_EXT': 0x87D4,
+ 'X_EXT': 0x87D5,
+ 'Y_EXT': 0x87D6,
+ 'Z_EXT': 0x87D7,
+ 'W_EXT': 0x87D8,
+ 'NEGATIVE_X_EXT': 0x87D9,
+ 'NEGATIVE_Y_EXT': 0x87DA,
+ 'NEGATIVE_Z_EXT': 0x87DB,
+ 'NEGATIVE_W_EXT': 0x87DC,
+ 'ZERO_EXT': 0x87DD,
+ 'ONE_EXT': 0x87DE,
+ 'NEGATIVE_ONE_EXT': 0x87DF,
+ 'NORMALIZED_RANGE_EXT': 0x87E0,
+ 'FULL_RANGE_EXT': 0x87E1,
+ 'CURRENT_VERTEX_EXT': 0x87E2,
+ 'MVP_MATRIX_EXT': 0x87E3,
+ 'VARIANT_VALUE_EXT': 0x87E4,
+ 'VARIANT_DATATYPE_EXT': 0x87E5,
+ 'VARIANT_ARRAY_STRIDE_EXT': 0x87E6,
+ 'VARIANT_ARRAY_TYPE_EXT': 0x87E7,
+ 'VARIANT_ARRAY_EXT': 0x87E8,
+ 'VARIANT_ARRAY_POINTER_EXT': 0x87E9,
+ 'INVARIANT_VALUE_EXT': 0x87EA,
+ 'INVARIANT_DATATYPE_EXT': 0x87EB,
+ 'LOCAL_CONSTANT_VALUE_EXT': 0x87EC,
+ 'LOCAL_CONSTANT_DATATYPE_EXT': 0x87ED,
+ 'MODELVIEW0_STACK_DEPTH_EXT': 0x0BA3,
+ 'MODELVIEW0_MATRIX_EXT': 0x0BA6,
+ 'MODELVIEW0_EXT': 0x1700,
+ 'MODELVIEW1_STACK_DEPTH_EXT': 0x8502,
+ 'MODELVIEW1_MATRIX_EXT': 0x8506,
+ 'VERTEX_WEIGHTING_EXT': 0x8509,
+ 'MODELVIEW1_EXT': 0x850A,
+ 'CURRENT_VERTEX_WEIGHT_EXT': 0x850B,
+ 'VERTEX_WEIGHT_ARRAY_EXT': 0x850C,
+ 'VERTEX_WEIGHT_ARRAY_SIZE_EXT': 0x850D,
+ 'VERTEX_WEIGHT_ARRAY_TYPE_EXT': 0x850E,
+ 'VERTEX_WEIGHT_ARRAY_STRIDE_EXT': 0x850F,
+ 'VERTEX_WEIGHT_ARRAY_POINTER_EXT': 0x8510,
+ 'OCCLUSION_TEST_HP': 0x8165,
+ 'OCCLUSION_TEST_RESULT_HP': 0x8166,
+ 'MIRRORED_REPEAT_IBM': 0x8370,
+ 'RED_MIN_CLAMP_INGR': 0x8560,
+ 'GREEN_MIN_CLAMP_INGR': 0x8561,
+ 'BLUE_MIN_CLAMP_INGR': 0x8562,
+ 'ALPHA_MIN_CLAMP_INGR': 0x8563,
+ 'RED_MAX_CLAMP_INGR': 0x8564,
+ 'GREEN_MAX_CLAMP_INGR': 0x8565,
+ 'BLUE_MAX_CLAMP_INGR': 0x8566,
+ 'ALPHA_MAX_CLAMP_INGR': 0x8567,
+ 'INTERLACE_READ_INGR': 0x8568,
+ 'PARALLEL_ARRAYS_INTEL': 0x83F4,
+ 'VERTEX_ARRAY_PARALLEL_POINTERS_INTEL': 0x83F5,
+ 'NORMAL_ARRAY_PARALLEL_POINTERS_INTEL': 0x83F6,
+ 'COLOR_ARRAY_PARALLEL_POINTERS_INTEL': 0x83F7,
+ 'TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL': 0x83F8,
+ 'KTX_FRONT_REGION': 0x0,
+ 'KTX_BACK_REGION': 0x1,
+ 'KTX_Z_REGION': 0x2,
+ 'KTX_STENCIL_REGION': 0x3,
+ 'TEXTURE_1D_STACK_MESAX': 0x8759,
+ 'TEXTURE_2D_STACK_MESAX': 0x875A,
+ 'PROXY_TEXTURE_1D_STACK_MESAX': 0x875B,
+ 'PROXY_TEXTURE_2D_STACK_MESAX': 0x875C,
+ 'TEXTURE_1D_STACK_BINDING_MESAX': 0x875D,
+ 'TEXTURE_2D_STACK_BINDING_MESAX': 0x875E,
+ 'PACK_INVERT_MESA': 0x8758,
+ 'UNSIGNED_SHORT_8_8_MESA': 0x85BA,
+ 'UNSIGNED_SHORT_8_8_REV_MESA': 0x85BB,
+ 'YCBCR_MESA': 0x8757,
+ 'QUERY_WAIT_NV': 0x8E13,
+ 'QUERY_NO_WAIT_NV': 0x8E14,
+ 'QUERY_BY_REGION_WAIT_NV': 0x8E15,
+ 'QUERY_BY_REGION_NO_WAIT_NV': 0x8E16,
+ 'DEPTH_STENCIL_TO_RGBA_NV': 0x886E,
+ 'DEPTH_STENCIL_TO_BGRA_NV': 0x886F,
+ 'DEPTH_COMPONENT32F_NV': 0x8DAB,
+ 'DEPTH32F_STENCIL8_NV': 0x8DAC,
+ 'FLOAT_32_UNSIGNED_INT_24_8_REV_NV': 0x8DAD,
+ 'DEPTH_BUFFER_FLOAT_MODE_NV': 0x8DAF,
+ 'DEPTH_CLAMP_NV': 0x864F,
+ 'SAMPLE_COUNT_BITS_NV': 0x8864,
+ 'CURRENT_SAMPLE_COUNT_QUERY_NV': 0x8865,
+ 'QUERY_RESULT_NV': 0x8866,
+ 'QUERY_RESULT_AVAILABLE_NV': 0x8867,
+ 'SAMPLE_COUNT_NV': 0x8914,
+ 'EVAL_2D_NV': 0x86C0,
+ 'EVAL_TRIANGULAR_2D_NV': 0x86C1,
+ 'MAP_TESSELLATION_NV': 0x86C2,
+ 'MAP_ATTRIB_U_ORDER_NV': 0x86C3,
+ 'MAP_ATTRIB_V_ORDER_NV': 0x86C4,
+ 'EVAL_FRACTIONAL_TESSELLATION_NV': 0x86C5,
+ 'EVAL_VERTEX_ATTRIB0_NV': 0x86C6,
+ 'EVAL_VERTEX_ATTRIB1_NV': 0x86C7,
+ 'EVAL_VERTEX_ATTRIB2_NV': 0x86C8,
+ 'EVAL_VERTEX_ATTRIB3_NV': 0x86C9,
+ 'EVAL_VERTEX_ATTRIB4_NV': 0x86CA,
+ 'EVAL_VERTEX_ATTRIB5_NV': 0x86CB,
+ 'EVAL_VERTEX_ATTRIB6_NV': 0x86CC,
+ 'EVAL_VERTEX_ATTRIB7_NV': 0x86CD,
+ 'EVAL_VERTEX_ATTRIB8_NV': 0x86CE,
+ 'EVAL_VERTEX_ATTRIB9_NV': 0x86CF,
+ 'EVAL_VERTEX_ATTRIB10_NV': 0x86D0,
+ 'EVAL_VERTEX_ATTRIB11_NV': 0x86D1,
+ 'EVAL_VERTEX_ATTRIB12_NV': 0x86D2,
+ 'EVAL_VERTEX_ATTRIB13_NV': 0x86D3,
+ 'EVAL_VERTEX_ATTRIB14_NV': 0x86D4,
+ 'EVAL_VERTEX_ATTRIB15_NV': 0x86D5,
+ 'MAX_MAP_TESSELLATION_NV': 0x86D6,
+ 'MAX_RATIONAL_EVAL_ORDER_NV': 0x86D7,
+ 'SAMPLE_POSITION_NV': 0x8E50,
+ 'SAMPLE_MASK_NV': 0x8E51,
+ 'SAMPLE_MASK_VALUE_NV': 0x8E52,
+ 'TEXTURE_BINDING_RENDERBUFFER_NV': 0x8E53,
+ 'TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV': 0x8E54,
+ 'TEXTURE_RENDERBUFFER_NV': 0x8E55,
+ 'SAMPLER_RENDERBUFFER_NV': 0x8E56,
+ 'INT_SAMPLER_RENDERBUFFER_NV': 0x8E57,
+ 'UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV': 0x8E58,
+ 'MAX_SAMPLE_MASK_WORDS_NV': 0x8E59,
+ 'ALL_COMPLETED_NV': 0x84F2,
+ 'FENCE_STATUS_NV': 0x84F3,
+ 'FENCE_CONDITION_NV': 0x84F4,
+ 'FLOAT_R_NV': 0x8880,
+ 'FLOAT_RG_NV': 0x8881,
+ 'FLOAT_RGB_NV': 0x8882,
+ 'FLOAT_RGBA_NV': 0x8883,
+ 'FLOAT_R16_NV': 0x8884,
+ 'FLOAT_R32_NV': 0x8885,
+ 'FLOAT_RG16_NV': 0x8886,
+ 'FLOAT_RG32_NV': 0x8887,
+ 'FLOAT_RGB16_NV': 0x8888,
+ 'FLOAT_RGB32_NV': 0x8889,
+ 'FLOAT_RGBA16_NV': 0x888A,
+ 'FLOAT_RGBA32_NV': 0x888B,
+ 'TEXTURE_FLOAT_COMPONENTS_NV': 0x888C,
+ 'FLOAT_CLEAR_COLOR_VALUE_NV': 0x888D,
+ 'FLOAT_RGBA_MODE_NV': 0x888E,
+ 'FOG_DISTANCE_MODE_NV': 0x855A,
+ 'EYE_RADIAL_NV': 0x855B,
+ 'EYE_PLANE_ABSOLUTE_NV': 0x855C,
+ 'MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV': 0x8868,
+ 'FRAGMENT_PROGRAM_NV': 0x8870,
+ 'MAX_TEXTURE_COORDS_NV': 0x8871,
+ 'MAX_TEXTURE_IMAGE_UNITS_NV': 0x8872,
+ 'FRAGMENT_PROGRAM_BINDING_NV': 0x8873,
+ 'PROGRAM_ERROR_STRING_NV': 0x8874,
+ 'MAX_PROGRAM_EXEC_INSTRUCTIONS_NV': 0x88F4,
+ 'MAX_PROGRAM_CALL_DEPTH_NV': 0x88F5,
+ 'MAX_PROGRAM_IF_DEPTH_NV': 0x88F6,
+ 'MAX_PROGRAM_LOOP_DEPTH_NV': 0x88F7,
+ 'MAX_PROGRAM_LOOP_COUNT_NV': 0x88F8,
+ 'RENDERBUFFER_COVERAGE_SAMPLES_NV': 0x8CAB,
+ 'RENDERBUFFER_COLOR_SAMPLES_NV': 0x8E10,
+ 'MAX_MULTISAMPLE_COVERAGE_MODES_NV': 0x8E11,
+ 'MULTISAMPLE_COVERAGE_MODES_NV': 0x8E12,
+ 'GEOMETRY_PROGRAM_NV': 0x8C26,
+ 'MAX_PROGRAM_OUTPUT_VERTICES_NV': 0x8C27,
+ 'MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV': 0x8C28,
+ 'MIN_PROGRAM_TEXEL_OFFSET_NV': 0x8904,
+ 'MAX_PROGRAM_TEXEL_OFFSET_NV': 0x8905,
+ 'PROGRAM_ATTRIB_COMPONENTS_NV': 0x8906,
+ 'PROGRAM_RESULT_COMPONENTS_NV': 0x8907,
+ 'MAX_PROGRAM_ATTRIB_COMPONENTS_NV': 0x8908,
+ 'MAX_PROGRAM_RESULT_COMPONENTS_NV': 0x8909,
+ 'MAX_PROGRAM_GENERIC_ATTRIBS_NV': 0x8DA5,
+ 'MAX_PROGRAM_GENERIC_RESULTS_NV': 0x8DA6,
+ 'HALF_FLOAT_NV': 0x140B,
+ 'MAX_SHININESS_NV': 0x8504,
+ 'MAX_SPOT_EXPONENT_NV': 0x8505,
+ 'MULTISAMPLE_FILTER_HINT_NV': 0x8534,
+ 'PIXEL_COUNTER_BITS_NV': 0x8864,
+ 'CURRENT_OCCLUSION_QUERY_ID_NV': 0x8865,
+ 'PIXEL_COUNT_NV': 0x8866,
+ 'PIXEL_COUNT_AVAILABLE_NV': 0x8867,
+ 'DEPTH_STENCIL_NV': 0x84F9,
+ 'UNSIGNED_INT_24_8_NV': 0x84FA,
+ 'MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV': 0x8DA0,
+ 'MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV': 0x8DA1,
+ 'VERTEX_PROGRAM_PARAMETER_BUFFER_NV': 0x8DA2,
+ 'GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV': 0x8DA3,
+ 'FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV': 0x8DA4,
+ 'WRITE_PIXEL_DATA_RANGE_NV': 0x8878,
+ 'READ_PIXEL_DATA_RANGE_NV': 0x8879,
+ 'WRITE_PIXEL_DATA_RANGE_LENGTH_NV': 0x887A,
+ 'READ_PIXEL_DATA_RANGE_LENGTH_NV': 0x887B,
+ 'WRITE_PIXEL_DATA_RANGE_POINTER_NV': 0x887C,
+ 'READ_PIXEL_DATA_RANGE_POINTER_NV': 0x887D,
+ 'POINT_SPRITE_NV': 0x8861,
+ 'COORD_REPLACE_NV': 0x8862,
+ 'POINT_SPRITE_R_MODE_NV': 0x8863,
+ 'FRAME_NV': 0x8E26,
+ 'FIELDS_NV': 0x8E27,
+ 'CURRENT_TIME_NV': 0x8E28,
+ 'NUM_FILL_STREAMS_NV': 0x8E29,
+ 'PRESENT_TIME_NV': 0x8E2A,
+ 'PRESENT_DURATION_NV': 0x8E2B,
+ 'PRIMITIVE_RESTART_NV': 0x8558,
+ 'PRIMITIVE_RESTART_INDEX_NV': 0x8559,
+ 'REGISTER_COMBINERS_NV': 0x8522,
+ 'VARIABLE_A_NV': 0x8523,
+ 'VARIABLE_B_NV': 0x8524,
+ 'VARIABLE_C_NV': 0x8525,
+ 'VARIABLE_D_NV': 0x8526,
+ 'VARIABLE_E_NV': 0x8527,
+ 'VARIABLE_F_NV': 0x8528,
+ 'VARIABLE_G_NV': 0x8529,
+ 'CONSTANT_COLOR0_NV': 0x852A,
+ 'CONSTANT_COLOR1_NV': 0x852B,
+ 'PRIMARY_COLOR_NV': 0x852C,
+ 'SECONDARY_COLOR_NV': 0x852D,
+ 'SPARE0_NV': 0x852E,
+ 'SPARE1_NV': 0x852F,
+ 'DISCARD_NV': 0x8530,
+ 'E_TIMES_F_NV': 0x8531,
+ 'SPARE0_PLUS_SECONDARY_COLOR_NV': 0x8532,
+ 'UNSIGNED_IDENTITY_NV': 0x8536,
+ 'UNSIGNED_INVERT_NV': 0x8537,
+ 'EXPAND_NORMAL_NV': 0x8538,
+ 'EXPAND_NEGATE_NV': 0x8539,
+ 'HALF_BIAS_NORMAL_NV': 0x853A,
+ 'HALF_BIAS_NEGATE_NV': 0x853B,
+ 'SIGNED_IDENTITY_NV': 0x853C,
+ 'SIGNED_NEGATE_NV': 0x853D,
+ 'SCALE_BY_TWO_NV': 0x853E,
+ 'SCALE_BY_FOUR_NV': 0x853F,
+ 'SCALE_BY_ONE_HALF_NV': 0x8540,
+ 'BIAS_BY_NEGATIVE_ONE_HALF_NV': 0x8541,
+ 'COMBINER_INPUT_NV': 0x8542,
+ 'COMBINER_MAPPING_NV': 0x8543,
+ 'COMBINER_COMPONENT_USAGE_NV': 0x8544,
+ 'COMBINER_AB_DOT_PRODUCT_NV': 0x8545,
+ 'COMBINER_CD_DOT_PRODUCT_NV': 0x8546,
+ 'COMBINER_MUX_SUM_NV': 0x8547,
+ 'COMBINER_SCALE_NV': 0x8548,
+ 'COMBINER_BIAS_NV': 0x8549,
+ 'COMBINER_AB_OUTPUT_NV': 0x854A,
+ 'COMBINER_CD_OUTPUT_NV': 0x854B,
+ 'COMBINER_SUM_OUTPUT_NV': 0x854C,
+ 'MAX_GENERAL_COMBINERS_NV': 0x854D,
+ 'NUM_GENERAL_COMBINERS_NV': 0x854E,
+ 'COLOR_SUM_CLAMP_NV': 0x854F,
+ 'COMBINER0_NV': 0x8550,
+ 'COMBINER1_NV': 0x8551,
+ 'COMBINER2_NV': 0x8552,
+ 'COMBINER3_NV': 0x8553,
+ 'COMBINER4_NV': 0x8554,
+ 'COMBINER5_NV': 0x8555,
+ 'COMBINER6_NV': 0x8556,
+ 'COMBINER7_NV': 0x8557,
+ 'PER_STAGE_CONSTANTS_NV': 0x8535,
+ 'EMBOSS_LIGHT_NV': 0x855D,
+ 'EMBOSS_CONSTANT_NV': 0x855E,
+ 'EMBOSS_MAP_NV': 0x855F,
+ 'NORMAL_MAP_NV': 0x8511,
+ 'REFLECTION_MAP_NV': 0x8512,
+ 'COMBINE4_NV': 0x8503,
+ 'SOURCE3_RGB_NV': 0x8583,
+ 'SOURCE3_ALPHA_NV': 0x858B,
+ 'OPERAND3_RGB_NV': 0x8593,
+ 'OPERAND3_ALPHA_NV': 0x859B,
+ 'TEXTURE_UNSIGNED_REMAP_MODE_NV': 0x888F,
+ 'TEXTURE_RECTANGLE_NV': 0x84F5,
+ 'TEXTURE_BINDING_RECTANGLE_NV': 0x84F6,
+ 'PROXY_TEXTURE_RECTANGLE_NV': 0x84F7,
+ 'MAX_RECTANGLE_TEXTURE_SIZE_NV': 0x84F8,
+ 'OFFSET_TEXTURE_RECTANGLE_NV': 0x864C,
+ 'OFFSET_TEXTURE_RECTANGLE_SCALE_NV': 0x864D,
+ 'DOT_PRODUCT_TEXTURE_RECTANGLE_NV': 0x864E,
+ 'RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV': 0x86D9,
+ 'UNSIGNED_INT_S8_S8_8_8_NV': 0x86DA,
+ 'UNSIGNED_INT_8_8_S8_S8_REV_NV': 0x86DB,
+ 'DSDT_MAG_INTENSITY_NV': 0x86DC,
+ 'SHADER_CONSISTENT_NV': 0x86DD,
+ 'TEXTURE_SHADER_NV': 0x86DE,
+ 'SHADER_OPERATION_NV': 0x86DF,
+ 'CULL_MODES_NV': 0x86E0,
+ 'OFFSET_TEXTURE_2D_MATRIX_NV': 0x86E1,
+ 'OFFSET_TEXTURE_MATRIX_NV': 0x86E1,
+ 'OFFSET_TEXTURE_2D_SCALE_NV': 0x86E2,
+ 'OFFSET_TEXTURE_SCALE_NV': 0x86E2,
+ 'OFFSET_TEXTURE_BIAS_NV': 0x86E3,
+ 'OFFSET_TEXTURE_2D_BIAS_NV': 0x86E3,
+ 'PREVIOUS_TEXTURE_INPUT_NV': 0x86E4,
+ 'CONST_EYE_NV': 0x86E5,
+ 'PASS_THROUGH_NV': 0x86E6,
+ 'CULL_FRAGMENT_NV': 0x86E7,
+ 'OFFSET_TEXTURE_2D_NV': 0x86E8,
+ 'DEPENDENT_AR_TEXTURE_2D_NV': 0x86E9,
+ 'DEPENDENT_GB_TEXTURE_2D_NV': 0x86EA,
+ 'DOT_PRODUCT_NV': 0x86EC,
+ 'DOT_PRODUCT_DEPTH_REPLACE_NV': 0x86ED,
+ 'DOT_PRODUCT_TEXTURE_2D_NV': 0x86EE,
+ 'DOT_PRODUCT_TEXTURE_CUBE_MAP_NV': 0x86F0,
+ 'DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV': 0x86F1,
+ 'DOT_PRODUCT_REFLECT_CUBE_MAP_NV': 0x86F2,
+ 'DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV': 0x86F3,
+ 'HILO_NV': 0x86F4,
+ 'DSDT_NV': 0x86F5,
+ 'DSDT_MAG_NV': 0x86F6,
+ 'DSDT_MAG_VIB_NV': 0x86F7,
+ 'HILO16_NV': 0x86F8,
+ 'SIGNED_HILO_NV': 0x86F9,
+ 'SIGNED_HILO16_NV': 0x86FA,
+ 'SIGNED_RGBA_NV': 0x86FB,
+ 'SIGNED_RGBA8_NV': 0x86FC,
+ 'SIGNED_RGB_NV': 0x86FE,
+ 'SIGNED_RGB8_NV': 0x86FF,
+ 'SIGNED_LUMINANCE_NV': 0x8701,
+ 'SIGNED_LUMINANCE8_NV': 0x8702,
+ 'SIGNED_LUMINANCE_ALPHA_NV': 0x8703,
+ 'SIGNED_LUMINANCE8_ALPHA8_NV': 0x8704,
+ 'SIGNED_ALPHA_NV': 0x8705,
+ 'SIGNED_ALPHA8_NV': 0x8706,
+ 'SIGNED_INTENSITY_NV': 0x8707,
+ 'SIGNED_INTENSITY8_NV': 0x8708,
+ 'DSDT8_NV': 0x8709,
+ 'DSDT8_MAG8_NV': 0x870A,
+ 'DSDT8_MAG8_INTENSITY8_NV': 0x870B,
+ 'SIGNED_RGB_UNSIGNED_ALPHA_NV': 0x870C,
+ 'SIGNED_RGB8_UNSIGNED_ALPHA8_NV': 0x870D,
+ 'HI_SCALE_NV': 0x870E,
+ 'LO_SCALE_NV': 0x870F,
+ 'DS_SCALE_NV': 0x8710,
+ 'DT_SCALE_NV': 0x8711,
+ 'MAGNITUDE_SCALE_NV': 0x8712,
+ 'VIBRANCE_SCALE_NV': 0x8713,
+ 'HI_BIAS_NV': 0x8714,
+ 'LO_BIAS_NV': 0x8715,
+ 'DS_BIAS_NV': 0x8716,
+ 'DT_BIAS_NV': 0x8717,
+ 'MAGNITUDE_BIAS_NV': 0x8718,
+ 'VIBRANCE_BIAS_NV': 0x8719,
+ 'TEXTURE_BORDER_VALUES_NV': 0x871A,
+ 'TEXTURE_HI_SIZE_NV': 0x871B,
+ 'TEXTURE_LO_SIZE_NV': 0x871C,
+ 'TEXTURE_DS_SIZE_NV': 0x871D,
+ 'TEXTURE_DT_SIZE_NV': 0x871E,
+ 'TEXTURE_MAG_SIZE_NV': 0x871F,
+ 'UNSIGNED_INT_S8_S8_8_8_NV': 0x86DA,
+ 'UNSIGNED_INT_8_8_S8_S8_REV_NV': 0x86DB,
+ 'DSDT_MAG_INTENSITY_NV': 0x86DC,
+ 'DOT_PRODUCT_TEXTURE_3D_NV': 0x86EF,
+ 'HILO_NV': 0x86F4,
+ 'DSDT_NV': 0x86F5,
+ 'DSDT_MAG_NV': 0x86F6,
+ 'DSDT_MAG_VIB_NV': 0x86F7,
+ 'HILO16_NV': 0x86F8,
+ 'SIGNED_HILO_NV': 0x86F9,
+ 'SIGNED_HILO16_NV': 0x86FA,
+ 'SIGNED_RGBA_NV': 0x86FB,
+ 'SIGNED_RGBA8_NV': 0x86FC,
+ 'SIGNED_RGB_NV': 0x86FE,
+ 'SIGNED_RGB8_NV': 0x86FF,
+ 'SIGNED_LUMINANCE_NV': 0x8701,
+ 'SIGNED_LUMINANCE8_NV': 0x8702,
+ 'SIGNED_LUMINANCE_ALPHA_NV': 0x8703,
+ 'SIGNED_LUMINANCE8_ALPHA8_NV': 0x8704,
+ 'SIGNED_ALPHA_NV': 0x8705,
+ 'SIGNED_ALPHA8_NV': 0x8706,
+ 'SIGNED_INTENSITY_NV': 0x8707,
+ 'SIGNED_INTENSITY8_NV': 0x8708,
+ 'DSDT8_NV': 0x8709,
+ 'DSDT8_MAG8_NV': 0x870A,
+ 'DSDT8_MAG8_INTENSITY8_NV': 0x870B,
+ 'SIGNED_RGB_UNSIGNED_ALPHA_NV': 0x870C,
+ 'SIGNED_RGB8_UNSIGNED_ALPHA8_NV': 0x870D,
+ 'OFFSET_PROJECTIVE_TEXTURE_2D_NV': 0x8850,
+ 'OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV': 0x8851,
+ 'OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV': 0x8852,
+ 'OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV': 0x8853,
+ 'OFFSET_HILO_TEXTURE_2D_NV': 0x8854,
+ 'OFFSET_HILO_TEXTURE_RECTANGLE_NV': 0x8855,
+ 'OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV': 0x8856,
+ 'OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV': 0x8857,
+ 'DEPENDENT_HILO_TEXTURE_2D_NV': 0x8858,
+ 'DEPENDENT_RGB_TEXTURE_3D_NV': 0x8859,
+ 'DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV': 0x885A,
+ 'DOT_PRODUCT_PASS_THROUGH_NV': 0x885B,
+ 'DOT_PRODUCT_TEXTURE_1D_NV': 0x885C,
+ 'DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV': 0x885D,
+ 'HILO8_NV': 0x885E,
+ 'SIGNED_HILO8_NV': 0x885F,
+ 'FORCE_BLUE_TO_ONE_NV': 0x8860,
+ 'BACK_PRIMARY_COLOR_NV': 0x8C77,
+ 'BACK_SECONDARY_COLOR_NV': 0x8C78,
+ 'TEXTURE_COORD_NV': 0x8C79,
+ 'CLIP_DISTANCE_NV': 0x8C7A,
+ 'VERTEX_ID_NV': 0x8C7B,
+ 'PRIMITIVE_ID_NV': 0x8C7C,
+ 'GENERIC_ATTRIB_NV': 0x8C7D,
+ 'TRANSFORM_FEEDBACK_ATTRIBS_NV': 0x8C7E,
+ 'TRANSFORM_FEEDBACK_BUFFER_MODE_NV': 0x8C7F,
+ 'MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV': 0x8C80,
+ 'ACTIVE_VARYINGS_NV': 0x8C81,
+ 'ACTIVE_VARYING_MAX_LENGTH_NV': 0x8C82,
+ 'TRANSFORM_FEEDBACK_VARYINGS_NV': 0x8C83,
+ 'TRANSFORM_FEEDBACK_BUFFER_START_NV': 0x8C84,
+ 'TRANSFORM_FEEDBACK_BUFFER_SIZE_NV': 0x8C85,
+ 'TRANSFORM_FEEDBACK_RECORD_NV': 0x8C86,
+ 'PRIMITIVES_GENERATED_NV': 0x8C87,
+ 'TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV': 0x8C88,
+ 'RASTERIZER_DISCARD_NV': 0x8C89,
+ 'MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV': 0x8C8A,
+ 'MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV': 0x8C8B,
+ 'INTERLEAVED_ATTRIBS_NV': 0x8C8C,
+ 'SEPARATE_ATTRIBS_NV': 0x8C8D,
+ 'TRANSFORM_FEEDBACK_BUFFER_NV': 0x8C8E,
+ 'TRANSFORM_FEEDBACK_BUFFER_BINDING_NV': 0x8C8F,
+ 'VERTEX_ARRAY_RANGE_NV': 0x851D,
+ 'VERTEX_ARRAY_RANGE_LENGTH_NV': 0x851E,
+ 'VERTEX_ARRAY_RANGE_VALID_NV': 0x851F,
+ 'MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV': 0x8520,
+ 'VERTEX_ARRAY_RANGE_POINTER_NV': 0x8521,
+ 'VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV': 0x8533,
+ 'VERTEX_PROGRAM_NV': 0x8620,
+ 'VERTEX_STATE_PROGRAM_NV': 0x8621,
+ 'ATTRIB_ARRAY_SIZE_NV': 0x8623,
+ 'ATTRIB_ARRAY_STRIDE_NV': 0x8624,
+ 'ATTRIB_ARRAY_TYPE_NV': 0x8625,
+ 'CURRENT_ATTRIB_NV': 0x8626,
+ 'PROGRAM_LENGTH_NV': 0x8627,
+ 'PROGRAM_STRING_NV': 0x8628,
+ 'MODELVIEW_PROJECTION_NV': 0x8629,
+ 'IDENTITY_NV': 0x862A,
+ 'INVERSE_NV': 0x862B,
+ 'TRANSPOSE_NV': 0x862C,
+ 'INVERSE_TRANSPOSE_NV': 0x862D,
+ 'MAX_TRACK_MATRIX_STACK_DEPTH_NV': 0x862E,
+ 'MAX_TRACK_MATRICES_NV': 0x862F,
+ 'MATRIX0_NV': 0x8630,
+ 'MATRIX1_NV': 0x8631,
+ 'MATRIX2_NV': 0x8632,
+ 'MATRIX3_NV': 0x8633,
+ 'MATRIX4_NV': 0x8634,
+ 'MATRIX5_NV': 0x8635,
+ 'MATRIX6_NV': 0x8636,
+ 'MATRIX7_NV': 0x8637,
+ 'CURRENT_MATRIX_STACK_DEPTH_NV': 0x8640,
+ 'CURRENT_MATRIX_NV': 0x8641,
+ 'VERTEX_PROGRAM_POINT_SIZE_NV': 0x8642,
+ 'VERTEX_PROGRAM_TWO_SIDE_NV': 0x8643,
+ 'PROGRAM_PARAMETER_NV': 0x8644,
+ 'ATTRIB_ARRAY_POINTER_NV': 0x8645,
+ 'PROGRAM_TARGET_NV': 0x8646,
+ 'PROGRAM_RESIDENT_NV': 0x8647,
+ 'TRACK_MATRIX_NV': 0x8648,
+ 'TRACK_MATRIX_TRANSFORM_NV': 0x8649,
+ 'VERTEX_PROGRAM_BINDING_NV': 0x864A,
+ 'PROGRAM_ERROR_POSITION_NV': 0x864B,
+ 'VERTEX_ATTRIB_ARRAY0_NV': 0x8650,
+ 'VERTEX_ATTRIB_ARRAY1_NV': 0x8651,
+ 'VERTEX_ATTRIB_ARRAY2_NV': 0x8652,
+ 'VERTEX_ATTRIB_ARRAY3_NV': 0x8653,
+ 'VERTEX_ATTRIB_ARRAY4_NV': 0x8654,
+ 'VERTEX_ATTRIB_ARRAY5_NV': 0x8655,
+ 'VERTEX_ATTRIB_ARRAY6_NV': 0x8656,
+ 'VERTEX_ATTRIB_ARRAY7_NV': 0x8657,
+ 'VERTEX_ATTRIB_ARRAY8_NV': 0x8658,
+ 'VERTEX_ATTRIB_ARRAY9_NV': 0x8659,
+ 'VERTEX_ATTRIB_ARRAY10_NV': 0x865A,
+ 'VERTEX_ATTRIB_ARRAY11_NV': 0x865B,
+ 'VERTEX_ATTRIB_ARRAY12_NV': 0x865C,
+ 'VERTEX_ATTRIB_ARRAY13_NV': 0x865D,
+ 'VERTEX_ATTRIB_ARRAY14_NV': 0x865E,
+ 'VERTEX_ATTRIB_ARRAY15_NV': 0x865F,
+ 'MAP1_VERTEX_ATTRIB0_4_NV': 0x8660,
+ 'MAP1_VERTEX_ATTRIB1_4_NV': 0x8661,
+ 'MAP1_VERTEX_ATTRIB2_4_NV': 0x8662,
+ 'MAP1_VERTEX_ATTRIB3_4_NV': 0x8663,
+ 'MAP1_VERTEX_ATTRIB4_4_NV': 0x8664,
+ 'MAP1_VERTEX_ATTRIB5_4_NV': 0x8665,
+ 'MAP1_VERTEX_ATTRIB6_4_NV': 0x8666,
+ 'MAP1_VERTEX_ATTRIB7_4_NV': 0x8667,
+ 'MAP1_VERTEX_ATTRIB8_4_NV': 0x8668,
+ 'MAP1_VERTEX_ATTRIB9_4_NV': 0x8669,
+ 'MAP1_VERTEX_ATTRIB10_4_NV': 0x866A,
+ 'MAP1_VERTEX_ATTRIB11_4_NV': 0x866B,
+ 'MAP1_VERTEX_ATTRIB12_4_NV': 0x866C,
+ 'MAP1_VERTEX_ATTRIB13_4_NV': 0x866D,
+ 'MAP1_VERTEX_ATTRIB14_4_NV': 0x866E,
+ 'MAP1_VERTEX_ATTRIB15_4_NV': 0x866F,
+ 'MAP2_VERTEX_ATTRIB0_4_NV': 0x8670,
+ 'MAP2_VERTEX_ATTRIB1_4_NV': 0x8671,
+ 'MAP2_VERTEX_ATTRIB2_4_NV': 0x8672,
+ 'MAP2_VERTEX_ATTRIB3_4_NV': 0x8673,
+ 'MAP2_VERTEX_ATTRIB4_4_NV': 0x8674,
+ 'MAP2_VERTEX_ATTRIB5_4_NV': 0x8675,
+ 'MAP2_VERTEX_ATTRIB6_4_NV': 0x8676,
+ 'MAP2_VERTEX_ATTRIB7_4_NV': 0x8677,
+ 'MAP2_VERTEX_ATTRIB8_4_NV': 0x8678,
+ 'MAP2_VERTEX_ATTRIB9_4_NV': 0x8679,
+ 'MAP2_VERTEX_ATTRIB10_4_NV': 0x867A,
+ 'MAP2_VERTEX_ATTRIB11_4_NV': 0x867B,
+ 'MAP2_VERTEX_ATTRIB12_4_NV': 0x867C,
+ 'MAP2_VERTEX_ATTRIB13_4_NV': 0x867D,
+ 'MAP2_VERTEX_ATTRIB14_4_NV': 0x867E,
+ 'MAP2_VERTEX_ATTRIB15_4_NV': 0x867F,
+ 'MAX_PROGRAM_EXEC_INSTRUCTIONS_NV': 0x88F4,
+ 'MAX_PROGRAM_CALL_DEPTH_NV': 0x88F5,
+ 'MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB': 0x8B4C,
+ 'BYTE': 0x1400,
+ 'PALETTE4_RGB8_OES': 0x8B90,
+ 'PALETTE4_RGBA8_OES': 0x8B91,
+ 'PALETTE4_R5_G6_B5_OES': 0x8B92,
+ 'PALETTE4_RGBA4_OES': 0x8B93,
+ 'PALETTE4_RGB5_A1_OES': 0x8B94,
+ 'PALETTE8_RGB8_OES': 0x8B95,
+ 'PALETTE8_RGBA8_OES': 0x8B96,
+ 'PALETTE8_R5_G6_B5_OES': 0x8B97,
+ 'PALETTE8_RGBA4_OES': 0x8B98,
+ 'PALETTE8_RGB5_A1_OES': 0x8B99,
+ 'IMPLEMENTATION_COLOR_READ_TYPE_OES': 0x8B9A,
+ 'IMPLEMENTATION_COLOR_READ_FORMAT_OES': 0x8B9B,
+ 'INTERLACE_OML': 0x8980,
+ 'INTERLACE_READ_OML': 0x8981,
+ 'PACK_RESAMPLE_OML': 0x8984,
+ 'UNPACK_RESAMPLE_OML': 0x8985,
+ 'RESAMPLE_REPLICATE_OML': 0x8986,
+ 'RESAMPLE_ZERO_FILL_OML': 0x8987,
+ 'RESAMPLE_AVERAGE_OML': 0x8988,
+ 'RESAMPLE_DECIMATE_OML': 0x8989,
+ 'FORMAT_SUBSAMPLE_24_24_OML': 0x8982,
+ 'FORMAT_SUBSAMPLE_244_244_OML': 0x8983,
+ 'VERTEX23_BIT_PGI': 0x00000004,
+ 'VERTEX4_BIT_PGI': 0x00000008,
+ 'COLOR3_BIT_PGI': 0x00010000,
+ 'COLOR4_BIT_PGI': 0x00020000,
+ 'EDGEFLAG_BIT_PGI': 0x00040000,
+ 'INDEX_BIT_PGI': 0x00080000,
+ 'MAT_AMBIENT_BIT_PGI': 0x00100000,
+ 'MAT_AMBIENT_AND_DIFFUSE_BIT_PGI': 0x00200000,
+ 'MAT_DIFFUSE_BIT_PGI': 0x00400000,
+ 'MAT_EMISSION_BIT_PGI': 0x00800000,
+ 'MAT_COLOR_INDEXES_BIT_PGI': 0x01000000,
+ 'MAT_SHININESS_BIT_PGI': 0x02000000,
+ 'MAT_SPECULAR_BIT_PGI': 0x04000000,
+ 'NORMAL_BIT_PGI': 0x08000000,
+ 'TEXCOORD1_BIT_PGI': 0x10000000,
+ 'TEXCOORD2_BIT_PGI': 0x20000000,
+ 'TEXCOORD3_BIT_PGI': 0x40000000,
+ 'TEXCOORD4_BIT_PGI': 0x80000000,
+ 'SCREEN_COORDINATES_REND': 0x8490,
+ 'INVERTED_SCREEN_W_REND': 0x8491,
+ 'RGB_S3TC': 0x83A0,
+ 'RGB4_S3TC': 0x83A1,
+ 'RGBA_S3TC': 0x83A2,
+ 'RGBA4_S3TC': 0x83A3,
+ 'RGBA_DXT5_S3TC': 0x83A4,
+ 'RGBA4_DXT5_S3TC': 0x83A5,
+ 'EXTENDED_RANGE_SGIS': 0x85A5,
+ 'MIN_RED_SGIS': 0x85A6,
+ 'MAX_RED_SGIS': 0x85A7,
+ 'MIN_GREEN_SGIS': 0x85A8,
+ 'MAX_GREEN_SGIS': 0x85A9,
+ 'MIN_BLUE_SGIS': 0x85AA,
+ 'MAX_BLUE_SGIS': 0x85AB,
+ 'MIN_ALPHA_SGIS': 0x85AC,
+ 'MAX_ALPHA_SGIS': 0x85AD,
+ 'GENERATE_MIPMAP_SGIS': 0x8191,
+ 'GENERATE_MIPMAP_HINT_SGIS': 0x8192,
+ 'MULTISAMPLE_SGIS': 0x809D,
+ 'SAMPLE_ALPHA_TO_MASK_SGIS': 0x809E,
+ 'SAMPLE_ALPHA_TO_ONE_SGIS': 0x809F,
+ 'SAMPLE_MASK_SGIS': 0x80A0,
+ '1PASS_SGIS': 0x80A1,
+ '2PASS_0_SGIS': 0x80A2,
+ '2PASS_1_SGIS': 0x80A3,
+ '4PASS_0_SGIS': 0x80A4,
+ '4PASS_1_SGIS': 0x80A5,
+ '4PASS_2_SGIS': 0x80A6,
+ '4PASS_3_SGIS': 0x80A7,
+ 'SAMPLE_BUFFERS_SGIS': 0x80A8,
+ 'SAMPLES_SGIS': 0x80A9,
+ 'SAMPLE_MASK_VALUE_SGIS': 0x80AA,
+ 'SAMPLE_MASK_INVERT_SGIS': 0x80AB,
+ 'SAMPLE_PATTERN_SGIS': 0x80AC,
+ 'MULTISAMPLE_BIT_EXT': 0x20000000,
+ 'EYE_DISTANCE_TO_POINT_SGIS': 0x81F0,
+ 'OBJECT_DISTANCE_TO_POINT_SGIS': 0x81F1,
+ 'EYE_DISTANCE_TO_LINE_SGIS': 0x81F2,
+ 'OBJECT_DISTANCE_TO_LINE_SGIS': 0x81F3,
+ 'EYE_POINT_SGIS': 0x81F4,
+ 'OBJECT_POINT_SGIS': 0x81F5,
+ 'EYE_LINE_SGIS': 0x81F6,
+ 'OBJECT_LINE_SGIS': 0x81F7,
+ 'CLAMP_TO_BORDER_SGIS': 0x812D,
+ 'CLAMP_TO_EDGE_SGIS': 0x812F,
+ 'TEXTURE_MIN_LOD_SGIS': 0x813A,
+ 'TEXTURE_MAX_LOD_SGIS': 0x813B,
+ 'TEXTURE_BASE_LEVEL_SGIS': 0x813C,
+ 'TEXTURE_MAX_LEVEL_SGIS': 0x813D,
+ 'ASYNC_MARKER_SGIX': 0x8329,
+ 'ASYNC_HISTOGRAM_SGIX': 0x832C,
+ 'MAX_ASYNC_HISTOGRAM_SGIX': 0x832D,
+ 'ASYNC_TEX_IMAGE_SGIX': 0x835C,
+ 'ASYNC_DRAW_PIXELS_SGIX': 0x835D,
+ 'ASYNC_READ_PIXELS_SGIX': 0x835E,
+ 'MAX_ASYNC_TEX_IMAGE_SGIX': 0x835F,
+ 'MAX_ASYNC_DRAW_PIXELS_SGIX': 0x8360,
+ 'MAX_ASYNC_READ_PIXELS_SGIX': 0x8361,
+ 'ALPHA_MIN_SGIX': 0x8320,
+ 'ALPHA_MAX_SGIX': 0x8321,
+ 'CONVOLUTION_HINT_SGIX': 0x8316,
+ 'DEPTH_COMPONENT16_SGIX': 0x81A5,
+ 'DEPTH_COMPONENT24_SGIX': 0x81A6,
+ 'DEPTH_COMPONENT32_SGIX': 0x81A7,
+ 'FOG_OFFSET_SGIX': 0x8198,
+ 'FOG_OFFSET_VALUE_SGIX': 0x8199,
+ 'INTERLACE_SGIX': 0x8094,
+ 'PACK_RESAMPLE_SGIX': 0x842E,
+ 'UNPACK_RESAMPLE_SGIX': 0x842F,
+ 'RESAMPLE_DECIMATE_SGIX': 0x8430,
+ 'RESAMPLE_REPLICATE_SGIX': 0x8433,
+ 'RESAMPLE_ZERO_FILL_SGIX': 0x8434,
+ 'TEXTURE_COMPARE_SGIX': 0x819A,
+ 'TEXTURE_COMPARE_OPERATOR_SGIX': 0x819B,
+ 'TEXTURE_LEQUAL_R_SGIX': 0x819C,
+ 'TEXTURE_GEQUAL_R_SGIX': 0x819D,
+ 'SHADOW_AMBIENT_SGIX': 0x80BF,
+ 'TEXTURE_MAX_CLAMP_S_SGIX': 0x8369,
+ 'TEXTURE_MAX_CLAMP_T_SGIX': 0x836A,
+ 'TEXTURE_MAX_CLAMP_R_SGIX': 0x836B,
+ 'TEXTURE_MULTI_BUFFER_HINT_SGIX': 0x812E,
+ 'RGB_SIGNED_SGIX': 0x85E0,
+ 'RGBA_SIGNED_SGIX': 0x85E1,
+ 'ALPHA_SIGNED_SGIX': 0x85E2,
+ 'LUMINANCE_SIGNED_SGIX': 0x85E3,
+ 'INTENSITY_SIGNED_SGIX': 0x85E4,
+ 'LUMINANCE_ALPHA_SIGNED_SGIX': 0x85E5,
+ 'RGB16_SIGNED_SGIX': 0x85E6,
+ 'RGBA16_SIGNED_SGIX': 0x85E7,
+ 'ALPHA16_SIGNED_SGIX': 0x85E8,
+ 'LUMINANCE16_SIGNED_SGIX': 0x85E9,
+ 'INTENSITY16_SIGNED_SGIX': 0x85EA,
+ 'LUMINANCE16_ALPHA16_SIGNED_SGIX': 0x85EB,
+ 'RGB_EXTENDED_RANGE_SGIX': 0x85EC,
+ 'RGBA_EXTENDED_RANGE_SGIX': 0x85ED,
+ 'ALPHA_EXTENDED_RANGE_SGIX': 0x85EE,
+ 'LUMINANCE_EXTENDED_RANGE_SGIX': 0x85EF,
+ 'INTENSITY_EXTENDED_RANGE_SGIX': 0x85F0,
+ 'LUMINANCE_ALPHA_EXTENDED_RANGE_SGIX': 0x85F1,
+ 'RGB16_EXTENDED_RANGE_SGIX': 0x85F2,
+ 'RGBA16_EXTENDED_RANGE_SGIX': 0x85F3,
+ 'ALPHA16_EXTENDED_RANGE_SGIX': 0x85F4,
+ 'LUMINANCE16_EXTENDED_RANGE_SGIX': 0x85F5,
+ 'INTENSITY16_EXTENDED_RANGE_SGIX': 0x85F6,
+ 'LUMINANCE16_ALPHA16_EXTENDED_RANGE_SGIX': 0x85F7,
+ 'MIN_LUMINANCE_SGIS': 0x85F8,
+ 'MAX_LUMINANCE_SGIS': 0x85F9,
+ 'MIN_INTENSITY_SGIS': 0x85FA,
+ 'MAX_INTENSITY_SGIS': 0x85FB,
+ 'POST_TEXTURE_FILTER_BIAS_SGIX': 0x8179,
+ 'POST_TEXTURE_FILTER_SCALE_SGIX': 0x817A,
+ 'POST_TEXTURE_FILTER_BIAS_RANGE_SGIX': 0x817B,
+ 'POST_TEXTURE_FILTER_SCALE_RANGE_SGIX': 0x817C,
+ 'VERTEX_PRECLIP_SGIX': 0x83EE,
+ 'VERTEX_PRECLIP_HINT_SGIX': 0x83EF,
+ 'VERTEX_PRECLIP_SGIX': 0x83EE,
+ 'VERTEX_PRECLIP_HINT_SGIX': 0x83EF,
+ 'COLOR_MATRIX_SGI': 0x80B1,
+ 'COLOR_MATRIX_STACK_DEPTH_SGI': 0x80B2,
+ 'MAX_COLOR_MATRIX_STACK_DEPTH_SGI': 0x80B3,
+ 'POST_COLOR_MATRIX_RED_SCALE_SGI': 0x80B4,
+ 'POST_COLOR_MATRIX_GREEN_SCALE_SGI': 0x80B5,
+ 'POST_COLOR_MATRIX_BLUE_SCALE_SGI': 0x80B6,
+ 'POST_COLOR_MATRIX_ALPHA_SCALE_SGI': 0x80B7,
+ 'POST_COLOR_MATRIX_RED_BIAS_SGI': 0x80B8,
+ 'POST_COLOR_MATRIX_GREEN_BIAS_SGI': 0x80B9,
+ 'POST_COLOR_MATRIX_BLUE_BIAS_SGI': 0x80BA,
+ 'POST_COLOR_MATRIX_ALPHA_BIAS_SGI': 0x80BB,
+ 'COLOR_TABLE_SGI': 0x80D0,
+ 'POST_CONVOLUTION_COLOR_TABLE_SGI': 0x80D1,
+ 'POST_COLOR_MATRIX_COLOR_TABLE_SGI': 0x80D2,
+ 'PROXY_COLOR_TABLE_SGI': 0x80D3,
+ 'PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI': 0x80D4,
+ 'PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI': 0x80D5,
+ 'COLOR_TABLE_SCALE_SGI': 0x80D6,
+ 'COLOR_TABLE_BIAS_SGI': 0x80D7,
+ 'COLOR_TABLE_FORMAT_SGI': 0x80D8,
+ 'COLOR_TABLE_WIDTH_SGI': 0x80D9,
+ 'COLOR_TABLE_RED_SIZE_SGI': 0x80DA,
+ 'COLOR_TABLE_GREEN_SIZE_SGI': 0x80DB,
+ 'COLOR_TABLE_BLUE_SIZE_SGI': 0x80DC,
+ 'COLOR_TABLE_ALPHA_SIZE_SGI': 0x80DD,
+ 'COLOR_TABLE_LUMINANCE_SIZE_SGI': 0x80DE,
+ 'COLOR_TABLE_INTENSITY_SIZE_SGI': 0x80DF,
+ 'TEXTURE_COLOR_TABLE_SGI': 0x80BC,
+ 'PROXY_TEXTURE_COLOR_TABLE_SGI': 0x80BD,
+ 'UNPACK_CONSTANT_DATA_SUNX': 0x81D5,
+ 'TEXTURE_CONSTANT_DATA_SUNX': 0x81D6,
+ 'WRAP_BORDER_SUN': 0x81D4,
+ 'GLOBAL_ALPHA_SUN': 0x81D9,
+ 'GLOBAL_ALPHA_FACTOR_SUN': 0x81DA,
+ 'QUAD_MESH_SUN': 0x8614,
+ 'TRIANGLE_MESH_SUN': 0x8615,
+ 'SLICE_ACCUM_SUN': 0x85CC,
+ 'RESTART_SUN': 0x01,
+ 'REPLACE_MIDDLE_SUN': 0x02,
+ 'REPLACE_OLDEST_SUN': 0x03,
+ 'TRIANGLE_LIST_SUN': 0x81D7,
+ 'REPLACEMENT_CODE_SUN': 0x81D8,
+ 'REPLACEMENT_CODE_ARRAY_SUN': 0x85C0,
+ 'REPLACEMENT_CODE_ARRAY_TYPE_SUN': 0x85C1,
+ 'REPLACEMENT_CODE_ARRAY_STRIDE_SUN': 0x85C2,
+ 'REPLACEMENT_CODE_ARRAY_POINTER_SUN': 0x85C3,
+ 'R1UI_V3F_SUN': 0x85C4,
+ 'R1UI_C4UB_V3F_SUN': 0x85C5,
+ 'R1UI_C3F_V3F_SUN': 0x85C6,
+ 'R1UI_N3F_V3F_SUN': 0x85C7,
+ 'R1UI_C4F_N3F_V3F_SUN': 0x85C8,
+ 'R1UI_T2F_V3F_SUN': 0x85C9,
+ 'R1UI_T2F_N3F_V3F_SUN': 0x85CA,
+ 'R1UI_T2F_C4F_N3F_V3F_SUN': 0x85CB,
+ 'PHONG_WIN': 0x80EA,
+ 'PHONG_HINT_WIN': 0x80EB,
+ 'FOG_SPECULAR_TEXTURE_WIN': 0x80EC
+};
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/resources/js-test-post.js b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/js-test-post.js
new file mode 100644
index 000000000..ae4031cba
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/js-test-post.js
@@ -0,0 +1,29 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+shouldBeTrue("successfullyParsed");
+_addSpan('<br /><span class="pass">TEST COMPLETE</span>');
+if (_jsTestPreVerboseLogging) {
+ _logToConsole('TEST COMPLETE');
+}
+notifyFinishedToHarness()
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/resources/js-test-pre.js b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/js-test-pre.js
new file mode 100644
index 000000000..6067e0d46
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/js-test-pre.js
@@ -0,0 +1,521 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+(function() {
+ var testHarnessInitialized = false;
+
+ var initNonKhronosFramework = function() {
+ if (testHarnessInitialized) {
+ return;
+ }
+ testHarnessInitialized = true;
+
+ /* -- plaform specific code -- */
+
+ // WebKit Specific code. Add your code here.
+ if (window.testRunner && !window.layoutTestController) {
+ window.layoutTestController = window.testRunner;
+ }
+
+ if (window.layoutTestController) {
+ layoutTestController.overridePreference("WebKitWebGLEnabled", "1");
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+ }
+ if (window.internals) {
+ // The WebKit testing system compares console output.
+ // Because the output of the WebGL Tests is GPU dependent
+ // we turn off console messages.
+ window.console.log = function() { };
+ window.console.error = function() { };
+ window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
+
+ // RAF doesn't work in LayoutTests. Disable it so the tests will
+ // use setTimeout instead.
+ window.requestAnimationFrame = undefined;
+ window.webkitRequestAnimationFrame = undefined;
+ }
+
+ /* -- end platform specific code --*/
+ }
+
+ this.initTestingHarness = function() {
+ initNonKhronosFramework();
+ }
+}());
+
+function nonKhronosFrameworkNotifyDone() {
+ // WebKit Specific code. Add your code here.
+ if (window.layoutTestController) {
+ layoutTestController.notifyDone();
+ }
+}
+
+(function() {
+ var WPT_TEST_ID = 0;
+
+ // Store the current WPT test harness `test` function
+ // if found, since it's overriden by some tests.
+ var wpt_test = window.test;
+ var wpt_assert_true = window.assert_true;
+
+
+ window.reportTestResultsToHarness = function reportTestResultsToHarness(success, msg) {
+ if (window.parent.webglTestHarness) {
+ window.parent.webglTestHarness.reportResults(window.location.pathname, success, msg);
+ } else if (wpt_test) { // WPT test harness
+ wpt_test(function () {
+ wpt_assert_true(success, msg);
+ }, "WebGL test #" + (WPT_TEST_ID++) + ": " + msg);
+ }
+ }
+}())
+
+function notifyFinishedToHarness() {
+ if (window.parent.webglTestHarness) {
+ window.parent.webglTestHarness.notifyFinished(window.location.pathname);
+ }
+ if (window.nonKhronosFrameworkNotifyDone) {
+ window.nonKhronosFrameworkNotifyDone();
+ }
+}
+
+function _logToConsole(msg)
+{
+ if (window.console)
+ window.console.log(msg);
+}
+
+var _jsTestPreVerboseLogging = true;
+
+function enableJSTestPreVerboseLogging()
+{
+ _jsTestPreVerboseLogging = true;
+}
+
+function description(msg)
+{
+ initTestingHarness();
+ if (msg === undefined) {
+ msg = document.title;
+ }
+ _logToConsole("DESCRIPTION: " + msg);
+}
+
+function _addSpan(contents)
+{
+}
+
+function debug(msg)
+{
+ _addSpan(msg);
+ if (_jsTestPreVerboseLogging) {
+ _logToConsole(msg);
+ }
+}
+
+function escapeHTML(text)
+{
+ return text.replace(/&/g, "&amp;").replace(/</g, "&lt;");
+}
+
+function testPassed(msg)
+{
+ reportTestResultsToHarness(true, msg);
+ _addSpan('<span><span class="pass">PASS</span> ' + escapeHTML(msg) + '</span>');
+ if (_jsTestPreVerboseLogging) {
+ _logToConsole('PASS ' + msg);
+ }
+}
+
+function testFailed(msg)
+{
+ reportTestResultsToHarness(false, msg);
+ _addSpan('<span><span class="fail">FAIL</span> ' + escapeHTML(msg) + '</span>');
+ _logToConsole('FAIL ' + msg);
+}
+
+function areArraysEqual(_a, _b)
+{
+ try {
+ if (_a.length !== _b.length)
+ return false;
+ for (var i = 0; i < _a.length; i++)
+ if (_a[i] !== _b[i])
+ return false;
+ } catch (ex) {
+ return false;
+ }
+ return true;
+}
+
+function isMinusZero(n)
+{
+ // the only way to tell 0 from -0 in JS is the fact that 1/-0 is
+ // -Infinity instead of Infinity
+ return n === 0 && 1/n < 0;
+}
+
+function isResultCorrect(_actual, _expected)
+{
+ if (_expected === 0)
+ return _actual === _expected && (1/_actual) === (1/_expected);
+ if (_actual === _expected)
+ return true;
+ if (typeof(_expected) == "number" && isNaN(_expected))
+ return typeof(_actual) == "number" && isNaN(_actual);
+ if (Object.prototype.toString.call(_expected) == Object.prototype.toString.call([]))
+ return areArraysEqual(_actual, _expected);
+ return false;
+}
+
+function stringify(v)
+{
+ if (v === 0 && 1/v < 0)
+ return "-0";
+ else return "" + v;
+}
+
+function evalAndLog(_a)
+{
+ if (typeof _a != "string")
+ debug("WARN: tryAndLog() expects a string argument");
+
+ // Log first in case things go horribly wrong or this causes a sync event.
+ debug(_a);
+
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ testFailed(_a + " threw exception " + e);
+ }
+ return _av;
+}
+
+function shouldBe(_a, _b, quiet)
+{
+ if (typeof _a != "string" || typeof _b != "string")
+ debug("WARN: shouldBe() expects string arguments");
+ var exception;
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ exception = e;
+ }
+ var _bv = eval(_b);
+
+ if (exception)
+ testFailed(_a + " should be " + _bv + ". Threw exception " + exception);
+ else if (isResultCorrect(_av, _bv)) {
+ if (!quiet) {
+ testPassed(_a + " is " + _b);
+ }
+ } else if (typeof(_av) == typeof(_bv))
+ testFailed(_a + " should be " + _bv + ". Was " + stringify(_av) + ".");
+ else
+ testFailed(_a + " should be " + _bv + " (of type " + typeof _bv + "). Was " + _av + " (of type " + typeof _av + ").");
+}
+
+function shouldNotBe(_a, _b, quiet)
+{
+ if (typeof _a != "string" || typeof _b != "string")
+ debug("WARN: shouldNotBe() expects string arguments");
+ var exception;
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ exception = e;
+ }
+ var _bv = eval(_b);
+
+ if (exception)
+ testFailed(_a + " should not be " + _bv + ". Threw exception " + exception);
+ else if (!isResultCorrect(_av, _bv)) {
+ if (!quiet) {
+ testPassed(_a + " is not " + _b);
+ }
+ } else
+ testFailed(_a + " should not be " + _bv + ".");
+}
+
+function shouldBeTrue(_a) { shouldBe(_a, "true"); }
+function shouldBeFalse(_a) { shouldBe(_a, "false"); }
+function shouldBeNaN(_a) { shouldBe(_a, "NaN"); }
+function shouldBeNull(_a) { shouldBe(_a, "null"); }
+
+function shouldBeEqualToString(a, b)
+{
+ var unevaledString = '"' + b.replace(/"/g, "\"") + '"';
+ shouldBe(a, unevaledString);
+}
+
+function shouldEvaluateTo(actual, expected) {
+ // A general-purpose comparator. 'actual' should be a string to be
+ // evaluated, as for shouldBe(). 'expected' may be any type and will be
+ // used without being eval'ed.
+ if (expected == null) {
+ // Do this before the object test, since null is of type 'object'.
+ shouldBeNull(actual);
+ } else if (typeof expected == "undefined") {
+ shouldBeUndefined(actual);
+ } else if (typeof expected == "function") {
+ // All this fuss is to avoid the string-arg warning from shouldBe().
+ try {
+ actualValue = eval(actual);
+ } catch (e) {
+ testFailed("Evaluating " + actual + ": Threw exception " + e);
+ return;
+ }
+ shouldBe("'" + actualValue.toString().replace(/\n/g, "") + "'",
+ "'" + expected.toString().replace(/\n/g, "") + "'");
+ } else if (typeof expected == "object") {
+ shouldBeTrue(actual + " == '" + expected + "'");
+ } else if (typeof expected == "string") {
+ shouldBe(actual, expected);
+ } else if (typeof expected == "boolean") {
+ shouldBe("typeof " + actual, "'boolean'");
+ if (expected)
+ shouldBeTrue(actual);
+ else
+ shouldBeFalse(actual);
+ } else if (typeof expected == "number") {
+ shouldBe(actual, stringify(expected));
+ } else {
+ debug(expected + " is unknown type " + typeof expected);
+ shouldBeTrue(actual, "'" +expected.toString() + "'");
+ }
+}
+
+function shouldBeNonZero(_a)
+{
+ var exception;
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ exception = e;
+ }
+
+ if (exception)
+ testFailed(_a + " should be non-zero. Threw exception " + exception);
+ else if (_av != 0)
+ testPassed(_a + " is non-zero.");
+ else
+ testFailed(_a + " should be non-zero. Was " + _av);
+}
+
+function shouldBeNonNull(_a)
+{
+ var exception;
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ exception = e;
+ }
+
+ if (exception)
+ testFailed(_a + " should be non-null. Threw exception " + exception);
+ else if (_av != null)
+ testPassed(_a + " is non-null.");
+ else
+ testFailed(_a + " should be non-null. Was " + _av);
+}
+
+function shouldBeUndefined(_a)
+{
+ var exception;
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ exception = e;
+ }
+
+ if (exception)
+ testFailed(_a + " should be undefined. Threw exception " + exception);
+ else if (typeof _av == "undefined")
+ testPassed(_a + " is undefined.");
+ else
+ testFailed(_a + " should be undefined. Was " + _av);
+}
+
+function shouldBeDefined(_a)
+{
+ var exception;
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ exception = e;
+ }
+
+ if (exception)
+ testFailed(_a + " should be defined. Threw exception " + exception);
+ else if (_av !== undefined)
+ testPassed(_a + " is defined.");
+ else
+ testFailed(_a + " should be defined. Was " + _av);
+}
+
+function shouldBeGreaterThanOrEqual(_a, _b) {
+ if (typeof _a != "string" || typeof _b != "string")
+ debug("WARN: shouldBeGreaterThanOrEqual expects string arguments");
+
+ var exception;
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ exception = e;
+ }
+ var _bv = eval(_b);
+
+ if (exception)
+ testFailed(_a + " should be >= " + _b + ". Threw exception " + exception);
+ else if (typeof _av == "undefined" || _av < _bv)
+ testFailed(_a + " should be >= " + _b + ". Was " + _av + " (of type " + typeof _av + ").");
+ else
+ testPassed(_a + " is >= " + _b);
+}
+
+function expectTrue(v, msg) {
+ if (v) {
+ testPassed(msg);
+ } else {
+ testFailed(msg);
+ }
+}
+
+function shouldThrow(_a, _e)
+{
+ var exception;
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ exception = e;
+ }
+
+ var _ev;
+ if (_e)
+ _ev = eval(_e);
+
+ if (exception) {
+ if (typeof _e == "undefined" || exception == _ev)
+ testPassed(_a + " threw exception " + exception + ".");
+ else
+ testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Threw exception " + exception + ".");
+ } else if (typeof _av == "undefined")
+ testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Was undefined.");
+ else
+ testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Was " + _av + ".");
+}
+
+function shouldBeType(_a, _type) {
+ var exception;
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ exception = e;
+ }
+
+ var _typev = eval(_type);
+
+ if(_typev === Number){
+ if(_av instanceof Number){
+ testPassed(_a + " is an instance of Number");
+ }
+ else if(typeof(_av) === 'number'){
+ testPassed(_a + " is an instance of Number");
+ }
+ else{
+ testFailed(_a + " is not an instance of Number");
+ }
+ }
+ else if (_av instanceof _typev) {
+ testPassed(_a + " is an instance of " + _type);
+ } else {
+ testFailed(_a + " is not an instance of " + _type);
+ }
+}
+
+function assertMsg(assertion, msg) {
+ if (assertion) {
+ testPassed(msg);
+ } else {
+ testFailed(msg);
+ }
+}
+
+function gc() {
+ if (window.GCController) {
+ window.GCController.collect();
+ return;
+ }
+
+ if (window.opera && window.opera.collect) {
+ window.opera.collect();
+ return;
+ }
+
+ try {
+ window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
+ .getInterface(Components.interfaces.nsIDOMWindowUtils)
+ .garbageCollect();
+ return;
+ } catch(e) {}
+
+ function gcRec(n) {
+ if (n < 1)
+ return {};
+ var temp = {i: "ab" + i + (i / 100000)};
+ temp += "foo";
+ gcRec(n-1);
+ }
+ for (var i = 0; i < 1000; i++)
+ gcRec(10);
+}
+
+function finishTest() {
+ successfullyParsed = true;
+ var epilogue = document.createElement("script");
+ var basePath = "";
+ var expectedBase = "js-test-pre.js";
+ var scripts = document.getElementsByTagName('script');
+ for (var script, i = 0; script = scripts[i]; i++) {
+ var src = script.src;
+ var l = src.length;
+ if (src.substr(l - expectedBase.length) == expectedBase) {
+ basePath = src.substr(0, l - expectedBase.length);
+ break;
+ }
+ }
+ epilogue.src = basePath + "js-test-post.js";
+ document.body.appendChild(epilogue);
+}
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/resources/js-test-style.css b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/js-test-style.css
new file mode 100644
index 000000000..f12147ca4
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/js-test-style.css
@@ -0,0 +1,12 @@
+.pass {
+ font-weight: bold;
+ color: green;
+}
+.fail {
+ font-weight: bold;
+ color: red;
+}
+#console {
+ white-space: pre-wrap;
+ font-family: monospace;
+}
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/resources/test-eval.js b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/test-eval.js
new file mode 100644
index 000000000..2d863239e
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/test-eval.js
@@ -0,0 +1,32 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+/**
+ * Calls eval.
+ *
+ * This is here so other modules can use "use strict":
+ */
+TestEval = function(str) {
+ return eval(str);
+};
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/resources/webgl-logo.png b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/webgl-logo.png
new file mode 100644
index 000000000..b9b22e1ab
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/webgl-logo.png
Binary files differ
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/resources/webgl-test-harness.js b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/webgl-test-harness.js
new file mode 100644
index 000000000..1bf7283aa
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/resources/webgl-test-harness.js
@@ -0,0 +1,662 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// This is a test harness for running javascript tests in the browser.
+// The only identifier exposed by this harness is WebGLTestHarnessModule.
+//
+// To use it make an HTML page with an iframe. Then call the harness like this
+//
+// function reportResults(type, msg, success) {
+// ...
+// return true;
+// }
+//
+// var fileListURL = '00_test_list.txt';
+// var testHarness = new WebGLTestHarnessModule.TestHarness(
+// iframe,
+// fileListURL,
+// reportResults,
+// options);
+//
+// The harness will load the fileListURL and parse it for the URLs, one URL
+// per line preceded by options, see below. URLs should be on the same domain
+// and at the same folder level or below the main html file. If any URL ends
+// in .txt it will be parsed as well so you can nest .txt files. URLs inside a
+// .txt file should be relative to that text file.
+//
+// During startup, for each page found the reportFunction will be called with
+// WebGLTestHarnessModule.TestHarness.reportType.ADD_PAGE and msg will be
+// the URL of the test.
+//
+// Each test is required to call testHarness.reportResults. This is most easily
+// accomplished by storing that value on the main window with
+//
+// window.webglTestHarness = testHarness
+//
+// and then adding these to functions to your tests.
+//
+// function reportTestResultsToHarness(success, msg) {
+// if (window.parent.webglTestHarness) {
+// window.parent.webglTestHarness.reportResults(success, msg);
+// }
+// }
+//
+// function notifyFinishedToHarness() {
+// if (window.parent.webglTestHarness) {
+// window.parent.webglTestHarness.notifyFinished();
+// }
+// }
+//
+// This way your tests will still run without the harness and you can use
+// any testing framework you want.
+//
+// Each test should call reportTestResultsToHarness with true for success if it
+// succeeded and false if it fail followed and any message it wants to
+// associate with the test. If your testing framework supports checking for
+// timeout you can call it with success equal to undefined in that case.
+//
+// To run the tests, call testHarness.runTests(options);
+//
+// For each test run, before the page is loaded the reportFunction will be
+// called with WebGLTestHarnessModule.TestHarness.reportType.START_PAGE and msg
+// will be the URL of the test. You may return false if you want the test to be
+// skipped.
+//
+// For each test completed the reportFunction will be called with
+// with WebGLTestHarnessModule.TestHarness.reportType.TEST_RESULT,
+// success = true on success, false on failure, undefined on timeout
+// and msg is any message the test choose to pass on.
+//
+// When all the tests on the page have finished your page must call
+// notifyFinishedToHarness. If notifyFinishedToHarness is not called
+// the harness will assume the test timed out.
+//
+// When all the tests on a page have finished OR the page as timed out the
+// reportFunction will be called with
+// WebGLTestHarnessModule.TestHarness.reportType.FINISH_PAGE
+// where success = true if the page has completed or undefined if the page timed
+// out.
+//
+// Finally, when all the tests have completed the reportFunction will be called
+// with WebGLTestHarnessModule.TestHarness.reportType.FINISHED_ALL_TESTS.
+//
+// Harness Options
+//
+// These are passed in to the TestHarness as a JavaScript object
+//
+// version: (required!)
+//
+// Specifies a version used to filter tests. Tests marked as requiring
+// a version greater than this version will not be included.
+//
+// example: new TestHarness(...., {version: "3.1.2"});
+//
+// minVersion:
+//
+// Specifies the minimum version a test must require to be included.
+// This basically flips the filter so that only tests marked with
+// --min-version will be included if they are at this minVersion or
+// greater.
+//
+// example: new TestHarness(...., {minVersion: "2.3.1"});
+//
+// maxVersion:
+//
+// Specifies the maximum version a test must require to be included.
+// This basically flips the filter so that only tests marked with
+// --max-version will be included if they are at this maxVersion or
+// less.
+//
+// example: new TestHarness(...., {maxVersion: "2.3.1"});
+//
+// fast:
+//
+// Specifies to skip any tests marked as slow.
+//
+// example: new TestHarness(..., {fast: true});
+//
+// Test Options:
+//
+// Any test URL or .txt file can be prefixed by the following options
+//
+// min-version:
+//
+// Sets the minimum version required to include this test. A version is
+// passed into the harness options. Any test marked as requiring a
+// min-version greater than the version passed to the harness is skipped.
+// This allows you to add new tests to a suite of tests for a future
+// version of the suite without including the test in the current version.
+// If no -min-version is specified it is inheriited from the .txt file
+// including it. The default is 1.0.0
+//
+// example: --min-version 2.1.3 sometest.html
+//
+// max-version:
+//
+// Sets the maximum version required to include this test. A version is
+// passed into the harness options. Any test marked as requiring a
+// max-version less than the version passed to the harness is skipped.
+// This allows you to test functionality that has been removed from later
+// versions of the suite.
+// If no -max-version is specified it is inherited from the .txt file
+// including it.
+//
+// example: --max-version 1.9.9 sometest.html
+//
+// slow:
+//
+// Marks a test as slow. Slow tests can be skipped by passing fastOnly: true
+// to the TestHarness. Of course you need to pass all tests but sometimes
+// you'd like to test quickly and run only the fast subset of tests.
+//
+// example: --slow some-test-that-takes-2-mins.html
+//
+
+WebGLTestHarnessModule = function() {
+
+/**
+ * Wrapped logging function.
+ */
+var log = function(msg) {
+ if (window.console && window.console.log) {
+ window.console.log(msg);
+ }
+};
+
+/**
+ * Loads text from an external file. This function is synchronous.
+ * @param {string} url The url of the external file.
+ * @param {!function(bool, string): void} callback that is sent a bool for
+ * success and the string.
+ */
+var loadTextFileAsynchronous = function(url, callback) {
+ log ("loading: " + url);
+ var error = 'loadTextFileSynchronous failed to load url "' + url + '"';
+ var request;
+ if (window.XMLHttpRequest) {
+ request = new XMLHttpRequest();
+ if (request.overrideMimeType) {
+ request.overrideMimeType('text/plain');
+ }
+ } else {
+ throw 'XMLHttpRequest is disabled';
+ }
+ try {
+ request.open('GET', url, true);
+ request.onreadystatechange = function() {
+ if (request.readyState == 4) {
+ var text = '';
+ // HTTP reports success with a 200 status. The file protocol reports
+ // success with zero. HTTP does not use zero as a status code (they
+ // start at 100).
+ // https://developer.mozilla.org/En/Using_XMLHttpRequest
+ var success = request.status == 200 || request.status == 0;
+ if (success) {
+ text = request.responseText;
+ }
+ log("loaded: " + url);
+ callback(success, text);
+ }
+ };
+ request.send(null);
+ } catch (e) {
+ log("failed to load: " + url);
+ callback(false, '');
+ }
+};
+
+/**
+ * @param {string} versionString WebGL version string.
+ * @return {number} Integer containing the WebGL major version.
+ */
+var getMajorVersion = function(versionString) {
+ if (!versionString) {
+ return 1;
+ }
+ return parseInt(versionString.split(" ")[0].split(".")[0], 10);
+};
+
+/**
+ * @param {string} url Base URL of the test.
+ * @param {number} webglVersion Integer containing the WebGL major version.
+ * @param {boolean} dumpShaders add dumpShader query parameter if true.
+ * @return {string} URL that will run the test with the given WebGL version.
+ */
+var getURLWithOptions = function(url, webglVersion, dumpShaders) {
+ var queryArgs = 0;
+
+ if (webglVersion) {
+ url += "?webglVersion=" + webglVersion;
+ queryArgs++;
+ }
+
+ if (dumpShaders) {
+ url += queryArgs ? "&" : "?";
+ url += "dumpShaders=1";
+ }
+
+ return url;
+};
+
+/**
+ * Compare version strings.
+ */
+var greaterThanOrEqualToVersion = function(have, want) {
+ have = have.split(" ")[0].split(".");
+ want = want.split(" ")[0].split(".");
+
+ //have 1.2.3 want 1.1
+ //have 1.1.1 want 1.1
+ //have 1.0.9 want 1.1
+ //have 1.1 want 1.1.1
+
+ for (var ii = 0; ii < want.length; ++ii) {
+ var wantNum = parseInt(want[ii]);
+ var haveNum = have[ii] ? parseInt(have[ii]) : 0
+ if (haveNum > wantNum) {
+ return true; // 2.0.0 is greater than 1.2.3
+ }
+ if (haveNum < wantNum) {
+ return false;
+ }
+ }
+ return true;
+};
+
+/**
+ * Reads a file, recursively adding files referenced inside.
+ *
+ * Each line of URL is parsed, comments starting with '#' or ';'
+ * or '//' are stripped.
+ *
+ * arguments beginning with -- are extracted
+ *
+ * lines that end in .txt are recursively scanned for more files
+ * other lines are added to the list of files.
+ *
+ * @param {string} url The url of the file to read.
+ * @param {void function(boolean, !Array.<string>)} callback.
+ * Callback that is called with true for success and an
+ * array of filenames.
+ * @param {Object} options. Optional options
+ *
+ * Options:
+ * version: {string} The version of the conformance test.
+ * Tests with the argument --min-version <version> will
+ * be ignored version is less then <version>
+ *
+ */
+var getFileList = function(url, callback, options) {
+ var files = [];
+
+ var copyObject = function(obj) {
+ return JSON.parse(JSON.stringify(obj));
+ };
+
+ var toCamelCase = function(str) {
+ return str.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase() });
+ };
+
+ var globalOptions = copyObject(options);
+ globalOptions.defaultVersion = "1.0";
+ globalOptions.defaultMaxVersion = null;
+
+ var getFileListImpl = function(prefix, line, lineNum, hierarchicalOptions, callback) {
+ var files = [];
+
+ var args = line.split(/\s+/);
+ var nonOptions = [];
+ var useTest = true;
+ var testOptions = {};
+ for (var jj = 0; jj < args.length; ++jj) {
+ var arg = args[jj];
+ if (arg[0] == '-') {
+ if (arg[1] != '-') {
+ throw ("bad option at in " + url + ":" + lineNum + ": " + arg);
+ }
+ var option = arg.substring(2);
+ switch (option) {
+ // no argument options.
+ case 'slow':
+ testOptions[toCamelCase(option)] = true;
+ break;
+ // one argument options.
+ case 'min-version':
+ case 'max-version':
+ ++jj;
+ testOptions[toCamelCase(option)] = args[jj];
+ break;
+ default:
+ throw ("bad unknown option '" + option + "' at in " + url + ":" + lineNum + ": " + arg);
+ }
+ } else {
+ nonOptions.push(arg);
+ }
+ }
+ var url = prefix + nonOptions.join(" ");
+
+ if (url.substr(url.length - 4) != '.txt') {
+ var minVersion = testOptions.minVersion;
+ if (!minVersion) {
+ minVersion = hierarchicalOptions.defaultVersion;
+ }
+ var maxVersion = testOptions.maxVersion;
+ if (!maxVersion) {
+ maxVersion = hierarchicalOptions.defaultMaxVersion;
+ }
+ var slow = testOptions.slow;
+ if (!slow) {
+ slow = hierarchicalOptions.defaultSlow;
+ }
+
+ if (globalOptions.fast && slow) {
+ useTest = false;
+ } else if (globalOptions.minVersion) {
+ useTest = greaterThanOrEqualToVersion(minVersion, globalOptions.minVersion);
+ } else if (globalOptions.maxVersion && maxVersion) {
+ useTest = greaterThanOrEqualToVersion(globalOptions.maxVersion, maxVersion);
+ } else {
+ useTest = greaterThanOrEqualToVersion(globalOptions.version, minVersion);
+ if (maxVersion) {
+ useTest = useTest && greaterThanOrEqualToVersion(maxVersion, globalOptions.version);
+ }
+ }
+ }
+
+ if (!useTest) {
+ callback(true, []);
+ return;
+ }
+
+ if (url.substr(url.length - 4) == '.txt') {
+ // If a version was explicity specified pass it down.
+ if (testOptions.minVersion) {
+ hierarchicalOptions.defaultVersion = testOptions.minVersion;
+ }
+ if (testOptions.maxVersion) {
+ hierarchicalOptions.defaultMaxVersion = testOptions.maxVersion;
+ }
+ if (testOptions.slow) {
+ hierarchicalOptions.defaultSlow = testOptions.slow;
+ }
+ loadTextFileAsynchronous(url, function() {
+ return function(success, text) {
+ if (!success) {
+ callback(false, '');
+ return;
+ }
+ var lines = text.split('\n');
+ var prefix = '';
+ var lastSlash = url.lastIndexOf('/');
+ if (lastSlash >= 0) {
+ prefix = url.substr(0, lastSlash + 1);
+ }
+ var fail = false;
+ var count = 1;
+ var index = 0;
+ for (var ii = 0; ii < lines.length; ++ii) {
+ var str = lines[ii].replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+ if (str.length > 4 &&
+ str[0] != '#' &&
+ str[0] != ";" &&
+ str.substr(0, 2) != "//") {
+ ++count;
+ getFileListImpl(prefix, str, ii + 1, copyObject(hierarchicalOptions), function(index) {
+ return function(success, new_files) {
+ //log("got files: " + new_files.length);
+ if (success) {
+ files[index] = new_files;
+ }
+ finish(success);
+ };
+ }(index++));
+ }
+ }
+ finish(true);
+
+ function finish(success) {
+ if (!success) {
+ fail = true;
+ }
+ --count;
+ //log("count: " + count);
+ if (!count) {
+ callback(!fail, files);
+ }
+ }
+ }
+ }());
+ } else {
+ files.push(url);
+ callback(true, files);
+ }
+ };
+
+ getFileListImpl('', url, 1, globalOptions, function(success, files) {
+ // flatten
+ var flat = [];
+ flatten(files);
+ function flatten(files) {
+ for (var ii = 0; ii < files.length; ++ii) {
+ var value = files[ii];
+ if (typeof(value) == "string") {
+ flat.push(value);
+ } else {
+ flatten(value);
+ }
+ }
+ }
+ callback(success, flat);
+ });
+};
+
+var FilterURL = (function() {
+ var prefix = window.location.pathname;
+ prefix = prefix.substring(0, prefix.lastIndexOf("/") + 1);
+ return function(url) {
+ if (url.substring(0, prefix.length) == prefix) {
+ url = url.substring(prefix.length);
+ }
+ return url;
+ };
+}());
+
+var TestFile = function(url) {
+ this.url = url;
+};
+
+var Test = function(file) {
+ this.file = file;
+};
+
+var TestHarness = function(iframe, filelistUrl, reportFunc, options) {
+ this.window = window;
+ this.iframes = iframe.length ? iframe : [iframe];
+ this.reportFunc = reportFunc;
+ this.timeoutDelay = 20000;
+ this.files = [];
+ this.allowSkip = options.allowSkip;
+ this.webglVersion = getMajorVersion(options.version);
+ this.dumpShaders = options.dumpShaders;
+
+ var that = this;
+ getFileList(filelistUrl, function() {
+ return function(success, files) {
+ that.addFiles_(success, files);
+ };
+ }(), options);
+
+};
+
+TestHarness.reportType = {
+ ADD_PAGE: 1,
+ READY: 2,
+ START_PAGE: 3,
+ TEST_RESULT: 4,
+ FINISH_PAGE: 5,
+ FINISHED_ALL_TESTS: 6
+};
+
+TestHarness.prototype.addFiles_ = function(success, files) {
+ if (!success) {
+ this.reportFunc(
+ TestHarness.reportType.FINISHED_ALL_TESTS,
+ '',
+ 'Unable to load tests. Are you running locally?\n' +
+ 'You need to run from a server or configure your\n' +
+ 'browser to allow access to local files (not recommended).\n\n' +
+ 'Note: An easy way to run from a server:\n\n' +
+ '\tcd path_to_tests\n' +
+ '\tpython -m SimpleHTTPServer\n\n' +
+ 'then point your browser to ' +
+ '<a href="http://localhost:8000/webgl-conformance-tests.html">' +
+ 'http://localhost:8000/webgl-conformance-tests.html</a>',
+ false)
+ return;
+ }
+ log("total files: " + files.length);
+ for (var ii = 0; ii < files.length; ++ii) {
+ log("" + ii + ": " + files[ii]);
+ this.files.push(new TestFile(files[ii]));
+ this.reportFunc(TestHarness.reportType.ADD_PAGE, '', files[ii], undefined);
+ }
+ this.reportFunc(TestHarness.reportType.READY, '', undefined, undefined);
+}
+
+TestHarness.prototype.runTests = function(opt_options) {
+ var options = opt_options || { };
+ options.start = options.start || 0;
+ options.count = options.count || this.files.length;
+
+ this.idleIFrames = this.iframes.slice(0);
+ this.runningTests = {};
+ var testsToRun = [];
+ for (var ii = 0; ii < options.count; ++ii) {
+ testsToRun.push(ii + options.start);
+ }
+ this.numTestsRemaining = options.count;
+ this.testsToRun = testsToRun;
+ this.startNextTest();
+};
+
+TestHarness.prototype.setTimeout = function(test) {
+ var that = this;
+ test.timeoutId = this.window.setTimeout(function() {
+ that.timeout(test);
+ }, this.timeoutDelay);
+};
+
+TestHarness.prototype.clearTimeout = function(test) {
+ this.window.clearTimeout(test.timeoutId);
+};
+
+TestHarness.prototype.startNextTest = function() {
+ if (this.numTestsRemaining == 0) {
+ log("done");
+ this.reportFunc(TestHarness.reportType.FINISHED_ALL_TESTS,
+ '', '', true);
+ } else {
+ while (this.testsToRun.length > 0 && this.idleIFrames.length > 0) {
+ var testId = this.testsToRun.shift();
+ var iframe = this.idleIFrames.shift();
+ this.startTest(iframe, this.files[testId], this.webglVersion);
+ }
+ }
+};
+
+TestHarness.prototype.startTest = function(iframe, testFile, webglVersion) {
+ var test = {
+ iframe: iframe,
+ testFile: testFile
+ };
+ var url = testFile.url;
+ this.runningTests[url] = test;
+ log("loading: " + url);
+ if (this.reportFunc(TestHarness.reportType.START_PAGE, url, url, undefined)) {
+ if (this.dumpShaders == 1)
+ iframe.src = getURLWithOptions(url, webglVersion, true);
+ else
+ iframe.src = getURLWithOptions(url, webglVersion);
+ this.setTimeout(test);
+ } else {
+ this.reportResults(url, !!this.allowSkip, "skipped", true);
+ this.notifyFinished(url);
+ }
+};
+
+TestHarness.prototype.getTest = function(url) {
+ var test = this.runningTests[FilterURL(url)];
+ if (!test) {
+ throw("unknown test:" + url);
+ }
+ return test;
+};
+
+TestHarness.prototype.reportResults = function(url, success, msg, skipped) {
+ url = FilterURL(url);
+ var test = this.getTest(url);
+ this.clearTimeout(test);
+ log(success ? "PASS" : "FAIL", msg);
+ this.reportFunc(TestHarness.reportType.TEST_RESULT, url, msg, success, skipped);
+ // For each result we get, reset the timeout
+ this.setTimeout(test);
+};
+
+TestHarness.prototype.dequeTest = function(test) {
+ this.clearTimeout(test);
+ this.idleIFrames.push(test.iframe);
+ delete this.runningTests[test.testFile.url];
+ --this.numTestsRemaining;
+}
+
+TestHarness.prototype.notifyFinished = function(url) {
+ url = FilterURL(url);
+ var test = this.getTest(url);
+ log(url + ": finished");
+ this.dequeTest(test);
+ this.reportFunc(TestHarness.reportType.FINISH_PAGE, url, url, true);
+ this.startNextTest();
+};
+
+TestHarness.prototype.timeout = function(test) {
+ this.dequeTest(test);
+ var url = test.testFile.url;
+ log(url + ": timeout");
+ this.reportFunc(TestHarness.reportType.FINISH_PAGE, url, url, undefined);
+ this.startNextTest();
+};
+
+TestHarness.prototype.setTimeoutDelay = function(x) {
+ this.timeoutDelay = x;
+};
+
+return {
+ 'TestHarness': TestHarness,
+ 'getMajorVersion': getMajorVersion,
+ 'getURLWithOptions': getURLWithOptions
+ };
+
+}();
+
+
+
diff --git a/testing/web-platform/tests/webgl/conformance-1.0.3/test-guidelines.md b/testing/web-platform/tests/webgl/conformance-1.0.3/test-guidelines.md
new file mode 100644
index 000000000..9c4de558b
--- /dev/null
+++ b/testing/web-platform/tests/webgl/conformance-1.0.3/test-guidelines.md
@@ -0,0 +1,174 @@
+Contributing WebGL conformance tests Guidelines
+===============================================
+
+Thank you for contributing to the WebGL conformance tests.
+Please try to follow these guidelines when submitting a test.
+
+* If you're new to git [here's a terse set of instructions](http://www.khronos.org/webgl/wiki/Using_Github_To_Contribute "Using Github to Contribute").
+
+* All changes and/or new tests should go in the sdk/tests/conformance folder
+
+The tests under conformance-suites are snapshots and are only to be updated by
+the WebGL Working Group when "official" snapshots are taken.
+
+* Please use the Khronos Group License (MIT)
+
+These lines appears at the top of every html and js file under sdk/tests/conformance
+
+ <!--
+ /*
+ ** Copyright (c) 2014 The Khronos Group Inc.
+ **
+ ** Permission is hereby granted, free of charge, to any person obtaining a
+ ** copy of this software and/or associated documentation files (the
+ ** "Materials"), to deal in the Materials without restriction, including
+ ** without limitation the rights to use, copy, modify, merge, publish,
+ ** distribute, sublicense, and/or sell copies of the Materials, and to
+ ** permit persons to whom the Materials are furnished to do so, subject to
+ ** the following conditions:
+ **
+ ** The above copyright notice and this permission notice shall be included
+ ** in all copies or substantial portions of the Materials.
+ **
+ ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ */
+ -->
+
+* Please use code similar to the code in existing tests
+
+ Ideally, copy an existing test and modify it for your new test. Try not to duplicate
+ code that already exists where appropriate. In particular
+
+ * use the functions in WebGLTestUtils rather than duplicating functionality.
+
+ In particular, as much as possible, keep the WebGL code in your test specific
+ to the issue being tested and try to use the helper functions to handle
+ common setup.
+
+ Examples:
+
+ * to create a WebGL context call `WebGLTestUtils.create3DContext`. Passed nothing
+ it will create an offscreen canvas. Passed a canvas element it will create
+ a context on that element. Passed a string it will look up the canvas element
+ with the matching id and create a context from that element.
+
+ * use `WebGLTestUtils.checkCanvas` or `WebGLTestUtils.checkCanvasRect` rather
+ than checking rendering results by hand.
+
+ * use the various quad and draw functions
+
+ * `WebGLTestUtils.setupUnitQuad` and `WebGLTestUtils.clearAndDrawUnitQuad` for
+ simple drawing.
+
+ * `WebGLTestUtils.setupColorQuad`, `WebGLTestUtils.drawFloatColorQuad`, and
+ `WebGLTestUilts.drawUByteColorQuad` for drawing in a particular color.
+
+ * `WebGLTestUtils.setupIndexedQuad` and `WebGLTestUtils.clearAndDrawIndexedQuad`
+ if you need a higher subdivision of vertices and/or vertex colors.
+
+ * use `WebgLTestUtils.setupTexturedQuad` if you need a unit quad with texture coords.
+ By default the positions will be at location 0 and the texture coords at location 1.
+
+ * If you need a custom shader use `WebGLTestUtils.setupProgram`. Note that it takes
+ the following arguments. `gl`, `shaders`, `opt_attribs`, `opt_locations` where:
+
+ `gl` is the WebGL context.
+
+ `shaders` are an array of either script element ids, shader source, or WebGLShader
+ objects. The first element in the array is the vertex shader, the second the fragment
+ shader.
+
+ `opt_attribs` is an optional array of attribute names. If provided the named attributes
+ will have their locations bound to their index in this array.
+
+ `opt_locations` is an optional array of attribute locations. If provided each attribute
+ name in `opt_attribs` is bound to the corresponding location in `opt_locations`.
+
+ * If you need to wait for a composite call `WebGLTestUtils.waitForComposite`.
+ As compositing is a browser specific thing this provides a central place to
+ update all tests that rely on compositing to function.
+
+ * Code/Tag Order
+
+ Most tests run inline. They don't use window.onload or the load event. This works by placing
+ the script tag inside the body, *after* the canvas and required divs.
+
+ <canvas id="example"></canvas>
+ <div id="description"></div>
+ <div id="console"></div>
+ <script>
+ var wtu = WebGLDebugUtils;
+ var gl = wtu.create3DContext("example");
+ ...
+
+ * Ending Tests
+
+ * Tests that are short and run synchronously end with
+
+ <script src="../../resources/js-test-post.js"></script>
+
+ * Tests that take a long time use setTimeout so as not to freeze the browser.
+
+ Many browsers will terminate JavaScript that takes more than a few seconds to execute
+ without returning control to the browser. The workaround is code like this
+
+ var numTests = 10;
+ var currenTest = 0;
+ function runNextTest() {
+ if (currentTest == numTests) {
+ finishTest(); // Tells the harness you're done.
+ return;
+ }
+ // Run your test.
+ ...
+ ++currentTest;
+ setTimeout(runNextTest, 100);
+ }
+ runNextTest();
+
+ Remember the tests need to run without timing out even and slow mobile devices.
+ The harness resets the timeout timer every time a test reports success or failure
+ so as long as some part of your test calls `testPassed` or `testFailed` or one of the
+ many wrappers (`shouldXXX`, `glErrorShouldBe`, `WebGLTestUtils.checkCanvasXXX`, etc..)
+ every so often the harness will not timeout your test.
+
+ * The test harness requires the global variable `successfullyParse` to be set to true.
+ This usually appears at the end of a file.
+
+ var successfullyParsed = true;
+
+ * Do not use browser specific code.
+
+ * Do not check the browser version. Use feature detection.
+
+ * If you do need feature detection consider putting it into WebGLTestUtils so that
+ other tests can go through the same abstraction and the workaround is isolated
+ to one place.
+
+ * Vendors may place test harness specific code in the testing infrastructure.
+
+ resources/js-test-pre.js
+ conformance/more/unit.js
+
+ * Indent with spaces not tabs. (not everyone uses your tab settings).
+
+ * All HTML files must have a `<!DOCTYPE html>`
+
+ * All HTML files must have a `<meta charset="utf-8">`
+
+ * All JavaScript must start with "use strict";
+
+* If adding a new test edit the appropriate 00_test_list.txt file
+
+ Each folder has a 00_test_list.txt file that lists the test in that folder.
+ Each new test should be prefixed with the option `--min-version <version>` where
+ version is 1 more than the newest official version. At the time of this writing
+ all new tests should be prefixed with `--min-version 1.0.2`
+
+